gr-mcp/grc/gui_qt/resources/language/add-translation.txt

18 lines
662 B
Plaintext

# Adding a Translation
1. Add new locale directory - <locale>/LC_MESSAGES
2. Copy grc.pot to <locale>/LC_MESSAGES/grc.po
3. Update fields
4. Convert to compiled version:
cd <locale>/LC_MESSAGES/; msgfmt -o grc.mo grc.po
# Updating Translatable Strings
1. Go to project root
2. Mark translatable strings with _():
print ("example") --> print(_("example"))
3. Run xgettext:
xgettext -L Python --keyword=_ -d grc -o grc/gui_qt/resources/language/grc.pot `find . -name "*.py"`
4. Open grc/gui_qt/resources/language/en_US/LC_MESSAGES/grc.po using Poedit or similar
5. Translation -> Update from POT file -> choose grc/gui_qt/resources/language/grc.pot