-
Notifications
You must be signed in to change notification settings - Fork 10
Translation and Customisation
You can easily create your own translation files for WPKG-GP Client if its missing a translation for your native language or you just want to customize the current text for your organisation or environment.
The easiest way is to use one of the GNU Gettext translation editors like Easy PO or PoEdit.
Get the latest WPKG-GP-Client.pot which
contains all text parts which can be translated and open it up in the translation editor.
Translate every string (or only the ones you want to customize), save it as *.po file for future modifications and
finally generate a catalog *.mo file.
This file then needs to be named wpkg-gp-client.mo
and placed in the following folder of your WPKG-GP Client
installation:
.\locale\%COUNTRYCODE%\LC_MESSAGES\
Look at the gnuttext manual for the 2 character code of your country. 4 character codes seperated by "_" can also be used (e.g. de_at for German - Austria or en_GB for English - Britain).
While doing a translation you will encounter some special characters like "/n" "{}" or "%" and should be preserved in the translation, otherwise i could break the insertion of values or layout related elements.
e.g.:
#: WPKG-GP-Client.py:109
msgid ""
"System should be updated!\n"
"\n"
"System wasn't updated in over {} days."
msgstr ""
"\n" indicates a line break, the double "\n" in this example will turn the text "System should be updated!" into the heading of this dialog window. The curly brackets will be replace with a value by the application, in this case the last update interval set in the configuration file.
Dialog with heading (2x "\n" after title):
Dialog without heading:
You should always try to preserve the line breaks, not every part of the UI is scaling correctly to the length of the text strings at the moment.
#: WPKG-GP-Client.py:474
msgid "System will reboot in %TIME% seconds."
msgstr ""
"%TIME%" is a variable in this string and should be preserved in the translation, it will be replaced with configured value you set in the configuration file. These variables mustn't be translated and have to be preserved.
If you have created a translation for your language please submit the *.po and *.mo file by creating a new issue and attaching those files. You will be credited on the "Help" info of the program and the readme file, unless you don't want to be.