Support msgctxt in po files instead of a vertical bar in the msgid

For developers, an extra optional context parameter has been
added to the gettext functions. For example, _('point size|pt')
should now be written as _('pt', 'point size').

For translators this would appear in the message catalog as:

msgctxt "point size"
msgid "pt"
msgstr "pt"

Implements #3416.
This commit is contained in:
Nick Hall
2020-08-30 18:36:28 +01:00
parent 01403a0d03
commit cc7ca7ff99
177 changed files with 34950 additions and 18995 deletions

View File

@@ -426,7 +426,8 @@ def retrieve():
os.system('''%(xgettext)s -F -c -j --directory=./ -d gramps '''
'''-L Python -o gramps.pot --files-from=python.txt '''
'''--debug --keyword=_ --keyword=ngettext '''
'''--keyword=_T_ --keyword=trans_text '''
'''--keyword=_T_ --keyword=trans_text:1,2c '''
'''--keyword=_:1,2c --keyword=_T_:1,2c '''
'''--keyword=sgettext --from-code=UTF-8''' % {'xgettext': xgettextCmd}
)