Skip to content

Translating

sunderme edited this page Nov 30, 2017 · 3 revisions

The translation of TXS is based on Qt's translation framework. For more details see: http://developer.qt.nokia.com/doc/qt-4.8/linguist-manual.html

How to Update a Translation

  1. Call texstudio --update-translations and copy the generated additionaltranslations.cpp to your source folder. This may be omitted, because changes to TXS that need this step are rare. See #Additional Translations for details.
  2. Call lupdate: This extracts translatable strings from the sources to a .ts file (or updates an existing one).
  3. Edit translations in .ts file using QtLinguist.
  4. Call lrelease: This compiles .ts files to .qm files.
  5. Provide the .ts and .qm file (either push to the mercurial repository or send it to us via email).

Additional Translations

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.

Easily Translating Corrected Strings

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.

Clone this wiki locally