Incorrect javascript-format on plasma-pa messages

Harald Sitter sitter at kde.org
Wed Sep 16 23:45:33 BST 2026


Hey!

I've only had time for a quick glance but it looks to me like this may
be a bug in gettext. Do we know which version of gettext is in use? Do
we know the exact command it runs?

on gettext 1.0 I utterly fail to reproduce the problem and also don't
see how we would end up in the code that produces that error :/


On Wed, Sep 16, 2026 at 6:40 PM Yoann Laissus <yoann.laissus at gmail.com> wrote:
>
> Hello,
>
> This morning, our daily scatter script failed due to SVN pre-commit hook:
>>
>> <stdin>:109: 'msgstr' is not a valid JavaScript format string, unlike 'msgid'. Reason: The character that terminates the directive number 1
>> is not a valid conversion specifier
>
>
> It's related to "javascript-format" added to some messages of plasma-pa.
> The failed message (maybe others) is in plasma_applet_org.kde.plasma.volume.po :
>>
>> #: main.qml:96
>> #, fuzzy, javascript-format
>> #| msgid "Volume at %1%"
>> msgid "Volume at %1%"
>> msgstr "Volume à %1 %"
>
>
> In French (and some other languages), we need to add a non-breaking space before %. It fails because msgfmt considers this invalid with "javascript-format".
>
> Last night, scripty changed a lot of format metadata in plasma-pa templates after a change to the gettext command (--language=JavaScript added to Messages.sh) :
> https://invent.kde.org/plasma/plasma-pa/-/commit/10f9d90348eb59e1914d14da629dc1a21ad9cc2e
> Template diff : https://invent.kde.org/localization/l10n-templates/-/commit/9fd452f8ecbe8df3e66a89657490005849746820?file_path=trunk6%2Fmessages%2Fplasma-pa%2Fplasma_applet_org.kde.plasma.volume.pot#line_a210c819d_115
>
> After some testing with gettext, "javascript-format" is added because of the trailing % in the message. There are multiple occurrences in the qml files of plasma-pa.
>
> I'm not really sure of the best way to fix it.
> We could add some format override to gettext in Messages.sh or before the problematic i18n* calls but the problem can also appear on other projects using --language=JavaScript.
>
> What do you think ?
>
> Cheers,
> --
> Yoann Laissus


More information about the kde-i18n-doc mailing list