-
Notifications
You must be signed in to change notification settings - Fork 351
Translating
The translation of TXS is based on Qt's translation framework. There are two ways of editing translations:
- the web service transifex
- the program QtLinguist
Probably the easiest way of translating TeXstudio is online editing the TeXstudio project on transifex.
The translation of TXS is based on Qt's translation framework. For more details see: http://doc.qt.io/qt-5/qtlinguist-index.html
Basically, what you want to do, is editing the .ts
file of your language with QtLinguist. It's fine if you just update that file.
On a broader scope, a little bit more has to be done to update the inputs in the .ts
file from the code and to finally create the translated data files (.qm
) which the application will use later on. The complete translation process is described in the following sections.
- Call
texstudio --update-translations
and copy the generatedadditionaltranslations.cpp
to your source folder. This may be omitted, because changes to TXS that need this step are rare. See Additional Translations for details. - Call
lupdate
: This extracts translatable strings from the sources to a .ts file (or updates an existing one). - Edit translations in .ts file using QtLinguist.
- Call
lrelease
: This compiles .ts files to .qm files. - Provide the .ts and .qm file (either create a pull request or send them to us via email).
lupdate
only looks for translations in source files. However there are other strings that need to be translated (e.g. from uiconfig.xml, color names, qnfa format names). Calling texstudio --update-translations
in a debug build of TXS generates a file additionaltranslations.cpp
that defines these strings, so they can be integrated in the translation process. Note: When you use shadow building, the file is generated in the build folder. You have to manually copy it to your source folder.
There have been lots of string changes recently, which only unify the capitalization or correct typos. By design of the Qt translation mechanism this creates a new string to translate, even though the translation might not be changed. It's helpful to sort the strings in QtLingust alphabetically (just click on the column head). That way, the old and new version will appear next to each other and you can copy the translation from the old string to the new one.