You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just recently added support for localizations using the gettext module from Python. See: ee6d690
I haven't finished making all the strings in the application into gettext-strings, so that should be done first of all.
This is done by simple adding the _( prefix and )suffix to strings.
An example: "This is a string in Python" becomes _("This is a string in Python!").
When all that is done, it's time to translate the strings into new languages.
I have added two tools for making it easier to create the .po files for translations.
https://github.com/marcusmoller/pyorpg-client/blob/master/tools/convert-po.sh converts the created AND TRANSLATED messages.po from src/ into a .mo-file which is then able to be read by the client. Please note that you should edit convert-po.sh so that it's not ouputting messages_en.mo but rather you localization of choice, say messages_de.mo.
The text was updated successfully, but these errors were encountered:
I just recently added support for localizations using the
gettext
module from Python. See: ee6d690I haven't finished making all the strings in the application into gettext-strings, so that should be done first of all.
This is done by simple adding the
_(
prefix and)
suffix to strings.An example:
"This is a string in Python"
becomes_("This is a string in Python!")
.When all that is done, it's time to translate the strings into new languages.
I have added two tools for making it easier to create the
.po
files for translations.messages.po
which allows for easy translating.messages.po
from src/ into a.mo
-file which is then able to be read by the client. Please note that you should editconvert-po.sh
so that it's not ouputtingmessages_en.mo
but rather you localization of choice, saymessages_de.mo
.The text was updated successfully, but these errors were encountered: