I’m working on parsing user input in GNOME Calendar. When the user enters a 12-hour time, the AM/PM part has different conventions in different languages. In English, “a.m.” and “am” are both common. In Japanese, people only use “午前”, “午.前.” is incorrect.
The gitlab thread on my PR discussing this issue.
In the above thread I suggested a solution:
Ask localizers to annotate in msgstr
(or some other field) whether the translation allows punctuation, e.g.
msgid "AM"
msgstr "pΠΜ"
...
msgid "AM"
msgstr "P午後"
The first char in msgstr
will indicate if punctuation is optional (p) or nonoptional (P). Optional punctuation will be inserted in code rather than in the translation, so the translation should have no punctuation if it is optional.
Any feedback for my suggestion or other solutions would be appreciated