Translate pgModeler's user interface requires the use of three tools called
lrelease, all them being part of the Qt framework. The
lupdate command will scan the pgModeler's source code directory extracting the terms that can be translated and store them in a file called dictionary. The
linguist program is the one used to open the dictionaries generated by
lupdate and provide the translation of the terms present in that files. Finally, we use the
lrelease to generate a compiled version of the translated dictionaries in order to be interpreted by pgModeler at startup. A few steps must be executed in a specific in order to achieve the correct result:
Use the most recent pgModeler's source code. You can get it from the download page.
pgmodeler-intl.proand add the name of your language file in the form
[language]_[TERRITORY].ts. This format is similar to the locale information used by POSIX systems. The
.profile is used by the
lupdatecommand to scan the source code directory and extract the translatable terms. Make sure to add the name of your language file in the variable
TRANSLATIONS = lang/pt_BR.ts lang/zh_CN.ts \ lang/fr_FR.ts \ lang/[language]_[TERRYTORY].ts
Now we need to generate the dictionaries (.ts files) by running the command below. Once executed you can check the folder lang which will contain the .ts files for each language listed on the
TRANSALATIONS variable in
lupdate -no-obsolete pgmodeler-intl.pro
Once generated the dictionaries we need to open the desired file in the Qt Linguist application, to do so run the command:
Source textfield. The translated term must be informed on the
[Language] translationfield on the middle of the highlight portion on the image below. Finally, you can provide optional comments on the last field. You can get detailed information about Qt Linguist usage on the Qt documentation.
lreleaseso the output files will be named in the form
You can now test the generated dictionary for your native language by normally running pgModeler. If, for any reason, you notice that the translation is not being correctly loaded you must check your system's current language configuration or manually change the language on pgModeler's general settings. Additional guidance and advanced information about the topics described in this chapter can be retrieved directly from the pgModeler's author. It'll be a pleasure to assist anyone who are willing to collaborate with pgModeler.
Qt Linguist manual