GNU gettext - Bugs: bug #60947, Do not strip unknown PO flags
You are not allowed to post comments on this tracker with your current authentication level.
bug #60947: Do not strip unknown PO flags
Submitter: | Florent Angly <fangly> | ||
Submitted: | Tue 20 Jul 2021 06:52:35 AM UTC | ||
Category: | Translator tools | Severity: | 3 - Normal |
Item Group: | None | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
I am working with an unpublished programming language, which is not in the list of programming languages supported by gettext (https://www.gnu.org/software/gettext/manual/html_node/Translators-for-other-Languages.html#Translators-for-other-Languages). My translation workflow tools add the zoe-format flag to PO messages containing a Zoe format string, e.g.:
$ cat catalog.po
#, zoe-format, fuzzy
msgid "Hello #{name}"
msgstr "Bonjour #{name}"
But the gettext utilities unfortunately remove all unknown flags:
$ msgcat.exe catalog.po
#, fuzzy
msgid "Hello #{name}"
msgstr "Bonjour #{name}"
I see value in non-standard flags because they can be used in non-standard workflows to support custom features and unpublished programming languages. To support this flexibility, I suggest that gettext should leave alone all flags that it doesn't recognize. This issue was first raised on the Poedit bug tracker (https://github.com/vslavik/poedit/issues/708), where the author also liked the idea.
Complementary to not removing unknown PO flags, the documentation could be amended to describe how to implement support for published or unpublished programming languages. This would help developers implement new languages.