Difference between revisions of "WebIssues/Translation"

From MiMec
Jump to: navigation, search
(New page: 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. == Translation Files == T...)
 
Line 5: Line 5:
 
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.
 
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.
  
In order to translate phrases in the .tf 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 X. 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 X. The detailed user guide can be found in the [http://doc.trolltech.com/4.6/linguist-translators.html 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: [http://wiki.mimec.org/files/8/86/Linguist.zip Linguist.zip].
  
 
== Translation Process ==
 
== Translation Process ==
Line 11: Line 13:
 
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 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.
  
In case of the desktop client, standard lupdate and lrelease tools from Qt Framework are used to update and compile the translation files. Translators can manually release the translation files by themselves for testing. In that case they should also get the latest version of the sources from the SVN repository and recompile the client application.
+
== Desktop Client ==
 +
 
 +
In case of the desktop client, standard lupdate and lrelease tools from Qt Framework are used to update and compile the translation files. Translators can manually release the translation files by themselves for testing. This can also be done directly using the Qt Linguist. They should also get the latest version of the sources from the SVN repository and recompile the client application.
  
A special set of tools, called lupdatephp and lreleasephp, were 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 binary format). These tools can be retrieved from the trunk/tools directory in the SVN repository and used by translators to release the translation files for testing.
+
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 65, where the addLanguage function is called for each language.
  
== Locale Information ==
+
== Web Client ==
  
When translation for a new language 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, were 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 binary format). These tools can be used by translators to create binary translation files for testing. Sources of these tools can be found in the trunk/tools directory in the SVN repository. You can also download Windows binaries: [http://wiki.mimec.org/files/9/94/LinguistPhp.zip LinguistPhp.zip].
  
In the desktop client, 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 65, where the addLanguage function is called for each language. There is no need to provide format information because this information is retrieved from the server.
+
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.

Revision as of 14:48, 5 July 2010

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.

Translation Files

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. There is also one webissues_untranslated.ts file which can be used for creating new translations.

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 X. 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 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.

Desktop Client

In case of the desktop client, standard lupdate and lrelease tools from Qt Framework are used to update and compile the translation files. Translators can manually release the translation files by themselves for testing. This can also be done directly using the Qt Linguist. They should also get the latest version of the sources from the SVN repository and recompile the client application.

When translation for a new language is created, the new .ts file needs to be added to the TRANSLATIONS list in the src/src.pro project file. Also the name and code of the language must be added to src/dialogs/settingsdialog.cpp, near line 65, where the addLanguage function is called for each language.

Web Client

A special set of tools, called lupdatephp and lreleasephp, were 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 binary format). These tools can be used by translators to create binary translation files for testing. Sources of these tools can be found in the trunk/tools directory in the SVN repository. You can also download Windows binaries: LinguistPhp.zip.

When a new translation is created, the common/data/locale.ini 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.