Incorrect javascript-format on plasma-pa messages

Yoann Laissus yoann.laissus at gmail.com
Wed Sep 16 17:40:22 BST 2026


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20260916/a979e0f0/attachment.htm>


More information about the kde-i18n-doc mailing list