Difference between revisions of "Translation for developers"

Jump to navigation Jump to search
m
typos found with languagetool.org
(Marked this version for translation)
m (typos found with languagetool.org)
Line 5: Line 5:


<translate><!--T:2-->
<translate><!--T:2-->
This synchronisation with Translatewiki needs three types of operation:
This synchronization with Translatewiki needs three types of operation:
* ''Add a string'' to Kiwix and Translatewiki, ie. introducing a dynamic string which will be replaced by the corresponding translation at the runtime.
* ''Add a string'' to Kiwix and Translatewiki, ie. introducing a dynamic string which will be replaced by the corresponding translation at the runtime.
* ''Update the Kiwix strings'' with the translations coming from Translatewiki.
* ''Update the Kiwix strings'' with the translations coming from Translatewiki.
Line 53: Line 53:


<translate><!--T:12-->
<translate><!--T:12-->
If you find one you need to find a string identifier (foobar for example), have a look to the already localised string to see how it should looks like. the most important to know is that in the *.xul files, it should looks like "&foobar;" and in the *.js like "getProperty('foobar')".
If you find one you need to find a string identifier (foobar for example), have a look to the already localized string to see how it should looks like. the most important to know is that in the *.xul files, it should looks like "&foobar;" and in the *.js like "getProperty('foobar')".
</translate>
</translate>


Line 67: Line 67:


<translate><!--T:16-->
<translate><!--T:16-->
But you also need to tell Translatewiki to add this string in the list of string it has to provide (for the Translatewiki translators) to translate. For that you need to checkout an other part of Kiwix code repository. Please run outside of your local kiwix code directory following console command:
But you also need to tell Translatewiki to add this string in the list of string it has to provide (for the Translatewiki translators) to translate. For that you need to checkout another part of Kiwix code repository. Please run outside of your local kiwix code directory following console command:
</translate>
</translate>


Line 86: Line 86:


<translate><!--T:20-->
<translate><!--T:20-->
The last thing you need to do is creating stub translation of your new localised string for all supported user interface languages in Kiwix. If you do not that, Kiwix won't be able to work correctly in another language as English.
The last thing you need to do is creating stub translation of your new localized string for all supported user interface languages in Kiwix. If you do not that, Kiwix won't be able to work correctly in another language as English.
</translate>
</translate>


Line 113: Line 113:


<translate><!--T:25-->
<translate><!--T:25-->
One other task is to update already supported Kiwix languages with the last string updated coming from Translatewiki. The first thing to know about that is that in the remote subversion repository, the Translatewiki file (in maintenance/translatewiki) are each two weeks updated from a Translatewiki contributors. That means, you only need to update your local repository and update and commit the kiwix code translation files like following:
Another task is to update already supported Kiwix languages with the last strings updated coming from Translatewiki. The first thing to know about that is that in the remote subversion repository, the Translatewiki file (in maintenance/translatewiki) are each two weeks updated from a Translatewiki contributors. That means, you only need to update your local repository and update and commit the kiwix code translation files like following:
</translate>
</translate>


Line 130: Line 130:


<translate><!--T:28-->
<translate><!--T:28-->
Kiwix tries to add only 100% translated languages coming from Translatewiki. So it happens often that they are more languages in the "maintenance_tools/translatewiki" directory than in the "kiwix/kiwix/chrome/locale" directory. In such a case, that simply mean the the Translatewiki language was still not integrated in Kiwix code base. We explain now how to do that.
Kiwix tries to add only 100% translated languages coming from Translatewiki. So it happens often that they are more languages in the "maintenance_tools/translatewiki" directory than in the "kiwix/kiwix/chrome/locale" directory. In such a case, that simply mean the Translatewiki language was still not integrated in Kiwix code base. We explain now how to do that.
</translate>
</translate>


Line 142: Line 142:


<translate><!--T:30-->
<translate><!--T:30-->
After that you need go to the kiwix source code directory in "kiwix/chrome" and edit with your prefered text editor the "chrome.manifest" and "chrome.manifest.prod" files. No explanation here, just do like for the already supported languages.
After that you need go to the kiwix source code directory in "kiwix/chrome" and edit with your preferred text editor the "chrome.manifest" and "chrome.manifest.prod" files. No explanation here, just do like for the already supported languages.
</translate>
</translate>


Navigation menu