Difference between revisions of "WebIssues/Translation"

From MiMec
Jump to: navigation, search
(Translation Files)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
WebIssues use the Qt Linguist application for translating both the desktop client and the web client applications. In both cases the process looks very similar.
+
'''NOTE: This Wiki is related to old versions of WebIssues which are no longer developed. For information about the current version of WebIssues, please see the [https://webissues.mimec.org official website], the [https://github.com/mimecorg/webissues GitHub repository] and the [https://doc.mimec.org/webissues-guide/ WebIssues Guide].'''
 +
 
 +
Current translations for version 2.0 of WebIssues are managed using https://crowdin.com/project/webissues.
 +
 
 +
== Transifex ==
 +
 
 +
Starting with version 1.1, WebIssues uses the Transifex online platform to facilitate translations. You can visit the WebIssues project site at https://www.transifex.com/projects/p/webissues/. You can sign up and join any existing translation teams or request a new language to be added to the list. You can then edit translate all strings online, without having to use Qt Linguist.
 +
 
 +
Note, however, that if you want to test your translation, you will still need the tools described below to generate the .qm file for the client and .phm file for the server.
  
 
== Translation Files ==
 
== Translation Files ==
  
Translators operate mainly on the .ts files which are located in <tt>translations</tt> directory in case of the Desktop Client and <tt>common/data/translations</tt> directory in case of the Web Client. There is one .ts file for each language, for example webissues_pl.ts for Polish and webissues_pt_BR.ts for Brazilian Portuguese translation. There is also one webissues_untranslated.ts file which can be used for creating new translations.
+
WebIssues uses the Qt Linguist application for translating the Desktop Client and the Web Client applications. In both cases the process looks very similar.
 +
 
 +
Translators operate mainly on the .ts files which are located in <tt>translations</tt> directory in case of the Desktop Client and <tt>common/data/translations</tt> directory in case of the Web Client. There is one .ts file for each language, for example webissues_pl.ts for Polish and webissues_pt_BR.ts for Brazilian Portuguese translation.
  
 
In order to translate phrases in the .ts file you will need the Qt Linguist application which is shipped with the Qt Framework and available for all platforms including Linux, Windows and Mac OS. The detailed user guide can be found in the [http://doc.trolltech.com/4.6/linguist-translators.html Qt documentation].
 
In order to translate phrases in the .ts file you will need the Qt Linguist application which is shipped with the Qt Framework and available for all platforms including Linux, Windows and Mac OS. The detailed user guide can be found in the [http://doc.trolltech.com/4.6/linguist-translators.html Qt documentation].
Line 11: Line 21:
 
== Translation Process ==
 
== Translation Process ==
  
A week or two before a planned release a "string freeze" is announced, meaning that code cannot be added or modified if that changes any user visible strings. All .ts files are updated to reflect changes in the code made since the previous version and that causes some new untranslated strings to appear. The updated .ts files are sent to the translators responsible for each language and they should send back the completed files. Finally, binary files are generated from the .ts files and included in the release packages.
+
A week or two before a planned release a "string freeze" is announced, meaning that code cannot be added or modified if that changes any user visible strings. All .ts files are updated to reflect changes in the code made since the previous version and that causes some new untranslated strings to appear. The updated .ts files are uploaded to Transifex and/or sent to the translators responsible for each language and they should send back the completed files. Finally, binary files are generated from the .ts files and included in the release packages.
 +
 
 +
== Adding a New Language ==
  
=== Desktop Client ===
+
New translations can be created by copying and renaming the <tt>webissues_untranslated.ts</tt> file. In addition, the <tt>locale.ini</tt> file must be updated with the code and name of the language. In case of the Desktop Client, this file is located in the <tt>translations</tt> directory. In case of the Web Client, the file is located in <tt>common/data</tt> and besides the list of languages it also contains culture information. A section with the same name as the language code must be created, containing the format of numbers, dates and times and the first day of week (counting Sunday as 0) for that culture. Available formats are listed in the <tt>formats.ini</tt> file.
  
In case of the desktop client, standard lupdate and lrelease tools from Qt Framework are used to update and compile the translation files. For testing purposes translators can manually release the translation files (this can be done directly using the Qt Linguist). The latest version of the sources must be then downloaded from the SVN repository and recompiled.
+
In order to add a new language using Transifex, simply sign up and request a new language to be added to the WebIssues project.
  
When translation for a new language is created, the new .ts file needs to be added to the TRANSLATIONS list in the <tt>src/src.pro</tt> project file. Also the name and code of the language must be added to <tt>src/dialogs/settingsdialog.cpp</tt>, near line 70, where the addLanguage function is called for each language.
+
== Testing Translations ==
  
=== Web Client ===
+
When testing translation with a development version, it must be downloaded from the SVN repository and compiled (in case of the Desktop Client) or installed (in case of the Web Client).
  
A special set of tools, called lupdatephp and lreleasephp, were created to support translation of the web client application (for the development version of WebIssues 1.0). They work almost the same as their standard counterparts, but they understand the coding conventions used in the PHP application and use a different format of the compiled file (which is more efficient to use with PHP that the binary format). These tools can be found in the trunk/tools directory in the SVN repository. You can also download Windows binaries if you don't want to compile them manually: [http://wiki.mimec.org/files/9/94/LinguistPhp.zip LinguistPhp.zip].
+
Standard lupdate and lrelease tools from Qt Framework are used to update and compile the translation files for the Desktop Client. For testing purposes translators can manually release the completed translation files (this can be done directly using the Qt Linguist).
  
When a new translation is created, the <tt>common/data/locale.ini</tt> file on the server needs to be modified with additional information. The code and name of the new language must be added to the languages section. Also a section with the same name as the language code must be created, containing the format of numbers, dates and times and the first day of week (counting Sunday as 0) for that culture.
+
A special set of tools, called lupdatephp and lreleasephp, was created to support translation of the Web Client application. They work almost the same as their standard counterparts, but they understand the coding conventions used in the PHP application and use a different format of the compiled file (which is more efficient to use with PHP that the standard binary format). These tools can be found in the <tt>trunk/tools/linguistphp</tt> directory in the SVN repository. You can also download Windows binaries if you don't want to compile them manually: [http://wiki.mimec.org/files/9/94/LinguistPhp.zip LinguistPhp.zip].

Latest revision as of 14:48, 8 May 2020

NOTE: This Wiki is related to old versions of WebIssues which are no longer developed. For information about the current version of WebIssues, please see the official website, the GitHub repository and the WebIssues Guide.

Current translations for version 2.0 of WebIssues are managed using https://crowdin.com/project/webissues.

Transifex

Starting with version 1.1, WebIssues uses the Transifex online platform to facilitate translations. You can visit the WebIssues project site at https://www.transifex.com/projects/p/webissues/. You can sign up and join any existing translation teams or request a new language to be added to the list. You can then edit translate all strings online, without having to use Qt Linguist.

Note, however, that if you want to test your translation, you will still need the tools described below to generate the .qm file for the client and .phm file for the server.

Translation Files

WebIssues uses the Qt Linguist application for translating the Desktop Client and the Web Client applications. In both cases the process looks very similar.

Translators operate mainly on the .ts files which are located in translations directory in case of the Desktop Client and common/data/translations directory in case of the Web Client. There is one .ts file for each language, for example webissues_pl.ts for Polish and webissues_pt_BR.ts for Brazilian Portuguese translation.

In order to translate phrases in the .ts file you will need the Qt Linguist application which is shipped with the Qt Framework and available for all platforms including Linux, Windows and Mac OS. The detailed user guide can be found in the Qt documentation.

If you are using Windows and don't want to download and install the entire Qt framework, you can use the stand-alone version of Qt Linguist: Linguist.zip.

Translation Process

A week or two before a planned release a "string freeze" is announced, meaning that code cannot be added or modified if that changes any user visible strings. All .ts files are updated to reflect changes in the code made since the previous version and that causes some new untranslated strings to appear. The updated .ts files are uploaded to Transifex and/or sent to the translators responsible for each language and they should send back the completed files. Finally, binary files are generated from the .ts files and included in the release packages.

Adding a New Language

New translations can be created by copying and renaming the webissues_untranslated.ts file. In addition, the locale.ini file must be updated with the code and name of the language. In case of the Desktop Client, this file is located in the translations directory. In case of the Web Client, the file is located in common/data and besides the list of languages it also contains culture information. A section with the same name as the language code must be created, containing the format of numbers, dates and times and the first day of week (counting Sunday as 0) for that culture. Available formats are listed in the formats.ini file.

In order to add a new language using Transifex, simply sign up and request a new language to be added to the WebIssues project.

Testing Translations

When testing translation with a development version, it must be downloaded from the SVN repository and compiled (in case of the Desktop Client) or installed (in case of the Web Client).

Standard lupdate and lrelease tools from Qt Framework are used to update and compile the translation files for the Desktop Client. For testing purposes translators can manually release the completed translation files (this can be done directly using the Qt Linguist).

A special set of tools, called lupdatephp and lreleasephp, was created to support translation of the Web Client application. They work almost the same as their standard counterparts, but they understand the coding conventions used in the PHP application and use a different format of the compiled file (which is more efficient to use with PHP that the standard binary format). These tools can be found in the trunk/tools/linguistphp directory in the SVN repository. You can also download Windows binaries if you don't want to compile them manually: LinguistPhp.zip.