Difference between revisions of "Translation for developers"

Jump to navigation Jump to search
svn -> git
(svn -> git)
Line 1: Line 1:
Beside the pure [[translation]] part of the work, the '''Kiwix source code needs to be synchronized with Translatewiki'''.
Beside the pure [[translation]] part of the work, the '''Kiwix source code needs to be synchronized with Translatewiki'''.


This synchronisation with Translatewiki needs three type of operations:
This synchronisation 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.
* ''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.
* ''Add a new Translatewiki full translated language to Kiwix''.
* ''Add a new Translatewiki full translated language to Kiwix''.
Line 16: Line 16:
* Translatewiki translations are imported separately in the Kiwix code repository on time a week and we always need to synchronize thus files with Kiwix code in both direction (KW->TW and TW -> KW).
* Translatewiki translations are imported separately in the Kiwix code repository on time a week and we always need to synchronize thus files with Kiwix code in both direction (KW->TW and TW -> KW).


'''WARNING: Before any modification of Kiwix source code, update your local code repository with "git pull origin master".'''
'''WARNING: Before any modification of Kiwix source code, update your local code repositories with "git pull origin master" in each one of them.'''


== Checkout the code and start Kiwix ==
== Checkout the code and start Kiwix ==
Line 44: Line 44:


<source lang="bash">
<source lang="bash">
svn co https://kiwix.svn.sourceforge.net/svnroot/kiwix/maintenance_tools/translatewiki
git pull origin master
</source>
</source>


Line 64: Line 64:


<source lang="bash">
<source lang="bash">
svn status kiwix/chrome/locale
git status kiwix/chrome/locale
</source>
</source>


Line 76: Line 76:
cd /full/path/to/the/kiwix/maintenance_tools/translatewiki
cd /full/path/to/the/kiwix/maintenance_tools/translatewiki
./TW2KW.pl --path=/full/path/to/the/kiwix/code/directory --allLanguages=kw
./TW2KW.pl --path=/full/path/to/the/kiwix/code/directory --allLanguages=kw
svn commit /full/path/to/the/kiwix/code/directory/kiwix/chrome/locale
git commit /full/path/to/the/kiwix/code/directory/kiwix/chrome/locale
git push origin master
</source>
</source>
The full path should be the moulinkiwix directory, not the kiwix directory in it.
The full path should be the moulinkiwix directory, not the kiwix directory in it.
Line 98: Line 99:
Add the new language directory and commit like following:
Add the new language directory and commit like following:
<source lang="bash">
<source lang="bash">
svn add kiwix/chrome/locale/language_iso_code
git add kiwix/chrome/locale/language_iso_code
svn commit CHANGELOG kiwix/chrome/chrome.manifest kiwix/chrome/chrome.manifest.prod kiwix/chrome/locale/ kiwix/chrome/content/main/js/gui.js
git commit CHANGELOG kiwix/chrome/chrome.manifest kiwix/chrome/chrome.manifest.prod kiwix/chrome/locale/ kiwix/chrome/content/main/js/gui.js
git push origin master
</source>
</source>


Navigation menu