Difference between revisions of "OSGeoLive Translation Process"
(38 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
+ | This document is divided in two part, if you want to help us translate the OSGeoLive documentation, the first part will guide you through the Transifex platform. If you want to help us build it the second part will give you more technical information about Transifex, sphinx and the building process. | ||
− | + | __FORCETOC__ | |
− | + | = Translate on Transifex = | |
− | + | ||
− | + | Thanks for helping us translate the OSGeoLive project documentation ! | |
− | + | ||
− | + | You can find us there: [https://www.transifex.com/osgeo/osgeolive/] | |
− | < | + | |
− | + | == Available languages == | |
− | + | ||
− | + | As for now (february 2018), there is 18 registered languages for the project. | |
+ | If your language is not in the list below (or on the updated list on Transifex), | ||
+ | please make a request to add it ! | ||
+ | |||
+ | |||
+ | The list of [https://www.transifex.com/osgeo/osgeolive/languages/ Languages]: | ||
+ | |||
+ | * Bengali | ||
+ | * Catalan | ||
+ | * Dutch | ||
+ | * Finnish | ||
+ | * French | ||
+ | * German | ||
+ | * Greek | ||
+ | * Hindi | ||
+ | * Hungarian | ||
+ | * Italian | ||
+ | * Japanese | ||
+ | * Polish | ||
+ | * Portuguese | ||
+ | * Russian | ||
+ | * Spanish | ||
+ | * Mexican spanish | ||
+ | |||
+ | |||
+ | == Connect to the Transifex platform == | ||
+ | |||
+ | If you don't have an account, please create one and then go to the project page. | ||
+ | |||
+ | Look for the language you want to help with (or ask to add it if it is not there already). | ||
+ | |||
+ | For each languages, there is a list of '''resources''', it is the files to translate (actually 180 of them). | ||
+ | |||
+ | [[File: Language resources.png | 600px ]] | ||
+ | |||
+ | == Files to translate == | ||
+ | The list of [https://www.transifex.com/osgeo/osgeolive/content/ resources] | ||
+ | are classified as: | ||
+ | * ">>" Urgent - OSGeo-Live related files | ||
+ | |||
+ | [[File: OSGEo-Live_transifex_01_index.png | 600px ]] | ||
+ | |||
+ | * "^" High - Projects related files | ||
+ | |||
+ | [[File: OSGEo-Live_transifex_02_second_priority.png | 600px ]] | ||
+ | |||
+ | * "-" Normal - Deprecated projects files (not for translating) | ||
+ | |||
+ | [[File: OSGEo-Live_transifex_03_retired_files.png | 600px ]] | ||
+ | |||
+ | You can easily order them by Version (v11) and and descending priority | ||
+ | |||
+ | [[File : OSGEo-Live_transifex_04_priority.png | 600px ]] | ||
+ | |||
+ | Please note that the urgent files are the OSGeoLive project files, if you | ||
+ | are more comfortable translating only the files of a project provided by OSGeoLive, | ||
+ | it is perfectly ok. :) | ||
+ | |||
+ | Please note each project has 2 files: | ||
+ | * an overview prefixed with ''overview--<name of the project>'' | ||
+ | * a quickstart prefixed with ''quickstart--<name of the project>'' | ||
+ | |||
+ | == Translation == | ||
+ | |||
+ | Once you have choose a file to translate, a little summary appears: | ||
+ | |||
+ | [[File : OsgeoLive translation choosen file.png | 600px ]] | ||
+ | |||
+ | 1. The choosen resource and the language, here ''overview--overview (French)'' | ||
+ | 2. Word count | ||
+ | 3. String count | ||
+ | 4. Translation button | ||
+ | |||
+ | After clicking on the translation button, you access to the translation panels: | ||
+ | |||
+ | [[File : OsgeoLive_translation_translatefile.png | 600px ]] | ||
+ | |||
+ | 1. String counts: Total, non translated, non revised | ||
+ | 2. Reviewed string | ||
+ | 3. Translated non reviewed string | ||
+ | 4. raw string (in English) | ||
+ | 5. Raw string to be translated | ||
+ | 6. Translation panel | ||
+ | 7. Translation save button | ||
+ | 8. Review button (if you are a reviewer) | ||
+ | 9. Suggestions panel (from past translations, by similarity) | ||
+ | |||
+ | By clicking on a string in the left panel, it will be placed in the panel 5 and if possible a translation will be proposed in 6. You can edit this translation right from the panel 6 then save it by clicking on 7. | ||
+ | |||
+ | You are an OSGeoLive translator ! Congratulations ! | ||
+ | |||
+ | Thanks for helping us ! | ||
+ | |||
+ | Now, you can translate another string then another, etc. And Then another file :) | ||
− | + | Welcome aboard ! | |
− | = | + | == Roles == |
− | + | There is several roles where you can help us. | |
− | + | === Translator === | |
− | |||
− | + | This role can translate strings, it is the most important job ! | |
− | |||
− | |||
− | |||
− | + | === Reviewer === | |
− | + | If your a confident enough in your language and technical knowledge, you can become | |
+ | a reviewer and review strings to fix the possible typos. | ||
− | + | === Language coordinator === | |
− | |||
− | + | A coordinator can accept new Translator and grant Reviewer privileges. With a lot of different languages, | |
− | + | it helps a lot the administrator. | |
− | |||
− | |||
− | + | = Build the documentation = | |
+ | == The general process OSGeo-Live used for documentation: == | ||
− | + | This section is a work in progress, please excuse us. | |
− | |||
− | |||
− | |||
− | |||
− | < | + | <ul> |
− | + | <li>The developer use [http://docutils.sourceforge.net/docs/user/rst/quickstart.html ReStructuredText] syntax to write the documentation in English.</li> | |
+ | <li>That documentation is then used with [http://sphinx-doc.org/contents.html Sphinx] to generate the english html, man, pdf, etc.</li> | ||
+ | <li>Also using [http://sphinx-doc.org/latest/intl.html Sphinx-intl] the <code>*.pot</code> files are generated.</li> | ||
+ | <li>Those <code>*.pot</code> files are used by [https://www.transifex.com/osgeo/osgeolive Transifex] and they contain only the strings that need to be translated.</li> | ||
+ | <li>Translator works with those strings using the process bellow.</li> | ||
+ | <li>When the translator finishes a language, the git hub mantainers proceed to download the generated <code>*.po</code> files that contain the translated strings and commit them in git hub and update the documentation page.</li> | ||
+ | <li><p>Users can create their translation using:</p> | ||
+ | <p>tools/transifex/create_translation.sh fr</p></li></ul> | ||
− | + | Translations to French are going to be used as examples along this wiki, we choose French so you can focus on what is being translated and what is not. | |
− | |||
− | + | == Before you start == | |
− | = Before you start = | ||
− | == Prepare your clone for documentation == | + | === Prepare your clone for documentation === |
− | <pre>git clone https://github.com/OSGeo/OSGeoLive-doc docClone | + | <pre> |
+ | ## Prepare the directory | ||
+ | git clone https://github.com/OSGeo/OSGeoLive-doc docClone | ||
cd docClone | cd docClone | ||
− | git checkout master | + | git checkout develop ## new things come into develop, then are merged into master |
mkdir build | mkdir build | ||
cd build | cd build | ||
− | cmake - | + | |
+ | ## prepare the documentation for French (English is automatically build) | ||
+ | cmake -DHTML=ON -DFR=ON .. | ||
+ | ## Build the doc | ||
make doc | make doc | ||
cd ..</pre> | cd ..</pre> | ||
− | |||
− | Download the latest translated <code>*.po</code> files of your language. | + | === Downloading translation === |
+ | |||
+ | * To download a particular file. | ||
+ | |||
+ | Best when reviewing the file: | ||
+ | |||
+ | <pre> | ||
+ | tx pull -l fr -r osgeolive.quickstart--ideditor_quickstart | ||
+ | </pre> | ||
+ | |||
+ | * Download the latest translated <code>*.po</code> files of your language based on translation percentage. | ||
+ | |||
+ | <pre> | ||
+ | tx pull -l fr --minimum-perc=100 | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | * Ask for help: | ||
+ | |||
+ | <pre> | ||
+ | tx pull --help | ||
+ | </pre> | ||
+ | |||
+ | ==== Checking the download ==== | ||
+ | |||
+ | <pre> | ||
+ | git status | ||
+ | </pre> | ||
+ | |||
+ | A possible output: | ||
− | + | === Have your language documentation html open. === | |
− | == Have your language documentation html open. == | ||
Viewing your language html will help to put strings in context and/or check the translation. | Viewing your language html will help to put strings in context and/or check the translation. | ||
− | <pre>tools/transifex/create_translations.sh | + | <pre>tools/transifex/create_translations.sh fr</pre> |
− | The | + | The French documentation would be in |
+ | |||
+ | <pre>build/doc/html/fr/doc/index.html</pre> | ||
− | + | === Transifex files that are not accepting translations. === | |
− | == Transifex files that are not accepting translations. == | ||
− | Files not accepting translations are marked with a red dot, maybe the file belongs to a previous version of | + | Files not accepting translations are marked with a red dot, maybe the file belongs to a previous version of OSGeo-Live documentation, or it was moved from one directory to another. Those files are not erased from the system so any translated string can be reused. |
− | == English spelling and grammar == | + | === English spelling and grammar === |
− | Sometimes the developers and the reviewers have typos in the | + | Sometimes the developers and the reviewers have typos in the English version, you will see spelling typos with a wavy red line, unfortunately it is too late to correct them for the current version. So proceed with the translation with the best of your ability. For the grammar, if you don't understand what is being told, please go to [https://github.com/pgRouting/pgrouting/issues/200 issue 200] to post a comment stating the file and pasting the English string. If a change has been considered, the string to be translated will be posted on the "instructions" for the string. |
− | = Working with small strings = | + | == Working with small strings == |
− | == Choose the small files first. == | + | === Choose the small files first. === |
For "small" I mean the ones that have very few strings to be translated. That will start building up a bank of translated strings that can be used in larger files. To detect a "small" file go to the list of [resources] (https://www.transifex.com/projects/p/pgrouting/resources/) and choose a file with few words or few strings. | For "small" I mean the ones that have very few strings to be translated. That will start building up a bank of translated strings that can be used in larger files. To detect a "small" file go to the list of [resources] (https://www.transifex.com/projects/p/pgrouting/resources/) and choose a file with few words or few strings. | ||
− | == Use "translate" button == | + | === Use "translate" button === |
The "translate button" comes quite handy, you still have to check the translation, and there is an "undo" button if you think that its better for you to type the translation than to modify the machine's translation. | The "translate button" comes quite handy, you still have to check the translation, and there is an "undo" button if you think that its better for you to type the translation than to modify the machine's translation. | ||
Line 104: | Line 226: | ||
<pre>en: :ref:`sample` | <pre>en: :ref:`sample` | ||
ja: :ref:`サンプル` <--- wrong</pre> | ja: :ref:`サンプル` <--- wrong</pre> | ||
− | == Use a "suggestion" == | + | === Use a "suggestion" === |
When you work with transifex it builds up a translated string bank and it will show one or more suggestions. If the suggestion is very close to what is needed, use it, and change the translation to the final translation of the string. Example: | When you work with transifex it builds up a translated string bank and it will show one or more suggestions. If the suggestion is very close to what is needed, use it, and change the translation to the final translation of the string. Example: | ||
Line 111: | Line 233: | ||
Use suggestion: pgr_astar - A*アルゴリズムを用いた最短経路探索 | Use suggestion: pgr_astar - A*アルゴリズムを用いた最短経路探索 | ||
Modify to: :ref:`pgr_astar<pgr_astar>` - A*アルゴリズムを用いた最短経路探索</pre> | Modify to: :ref:`pgr_astar<pgr_astar>` - A*アルゴリズムを用いた最短経路探索</pre> | ||
− | == Use "copy button" == | + | === Use "copy button" === |
Copy the the stand alone references like | Copy the the stand alone references like | ||
Line 117: | Line 239: | ||
<pre>en: :ref:`sample` | <pre>en: :ref:`sample` | ||
ja: :ref:`sample`</pre> | ja: :ref:`sample`</pre> | ||
− | == Type a translation == | + | === Type a translation === |
You can just type your translation. | You can just type your translation. | ||
− | == Go to the next string == | + | === Go to the next string === |
When you finished translating the string press "tab", that way it get's saved, if you click to a different string, maybe because the next string is already translated, then it won't be saved (green/white stripes). | When you finished translating the string press "tab", that way it get's saved, if you click to a different string, maybe because the next string is already translated, then it won't be saved (green/white stripes). | ||
− | == Save your translation == | + | === Save your translation === |
Make sure all strings using the "Save all unsaved translations" button. | Make sure all strings using the "Save all unsaved translations" button. | ||
− | = Check your work = | + | == Check your work == |
This step is needed not to check the translation but to check that ReStructuredText in the translated strings is correct. Many things might be wrong, an extra space, a missing space or a missing character "`" . | This step is needed not to check the translation but to check that ReStructuredText in the translated strings is correct. Many things might be wrong, an extra space, a missing space or a missing character "`" . | ||
− | == Download the translated file and recreate the translation == | + | === Download the translated file and recreate the translation === |
If the file you modified in transifex is doc--src--changelog--index and want to check the Japanese translation | If the file you modified in transifex is doc--src--changelog--index and want to check the Japanese translation | ||
Line 148: | Line 270: | ||
And visualy compare the "looks" with the [English version] (http://docs.pgrouting.org/2.0/en/doc/index.html) | And visualy compare the "looks" with the [English version] (http://docs.pgrouting.org/2.0/en/doc/index.html) | ||
− | == Use the "Approve translation" button == | + | === Use the "Approve translation" button === |
− | When the file is fully translated (except the navigation bar), you can are about to approve the translation, | + | When the file is fully translated (except the navigation bar), you can are about to approve the translation, '''????????''' |
* Check the links first, example: there is a link to sample data. | * Check the links first, example: there is a link to sample data. | ||
Line 164: | Line 286: | ||
If you are ok, then choose a string and click the "Approve translation" button. | If you are ok, then choose a string and click the "Approve translation" button. | ||
− | = Which file is next = | + | == Which file is next == |
− | == Do doc--index last == | + | === Do doc--index last === |
That way you can use the "Use suggestion" in this file. | That way you can use the "Use suggestion" in this file. | ||
− | == Work "important" files first == | + | === Work "important" files first === |
All files are important, but the following files are the core of the project. Most of them have repeated strings, so the "Use Suggestion" tactic is perfect, and you can use the search box to find them. | All files are important, but the following files are the core of the project. Most of them have repeated strings, so the "Use Suggestion" tactic is perfect, and you can use the search box to find them. | ||
− | + | - your project files: you know that project certainly better than us, especially in your language; starting by the overview then the quickstart | |
− | + | - OSGeoLive files: there is several core files for the OSgeoLive documentation: | |
− | + | - index | |
− | + | - overview--overview | |
− | + | - overview--toc | |
− | + | - quickstart--virtualization_quickstart | |
− | + | - quickstart--usb_quickstart | |
− | + | - quickstart--osgeolive_quickstart | |
− | + | - copyright | |
− | + | - contributors | |
− | + | - translators | |
+ | - presentation | ||
+ | - sponsors | ||
− | + | etc | |
− | + | They are listed with a red double ">" priority sign | |
− | |||
− | |||
− | == Work the "almost finished" files == | + | === Work the "almost finished" files === |
After you finish a file, you can choose a file that is "almost done". I found pretty uncomfortable the list placed at the left, so to choose an almost done file I recommend: | After you finish a file, you can choose a file that is "almost done". I found pretty uncomfortable the list placed at the left, so to choose an almost done file I recommend: | ||
Line 202: | Line 324: | ||
This is very useful when you have a lot of files already translated | This is very useful when you have a lot of files already translated | ||
− | == Work files that belong to a directory == | + | === Work files that belong to a directory === |
Based on the following files: | Based on the following files: | ||
Line 221: | Line 343: | ||
Please post any question in [https://github.com/pgRouting/pgrouting/issues/200 issue 200] | Please post any question in [https://github.com/pgRouting/pgrouting/issues/200 issue 200] | ||
− | == The :ref:`nameoflink` link is not translated == | + | === The :ref:`nameoflink` link is not translated === |
Example | Example | ||
Line 230: | Line 352: | ||
Thats and indication that the referenced page for Sample Data, isn't fully translated. If you can click on the link and navigate you are ok. | Thats and indication that the referenced page for Sample Data, isn't fully translated. If you can click on the link and navigate you are ok. | ||
− | == The :ref:`nameoflink` link is the only thing that is translated == | + | === The :ref:`nameoflink` link is the only thing that is translated === |
Example | Example | ||
Line 239: | Line 361: | ||
Maybe you navigated into an untranslated page that has a reference to a translated page. | Maybe you navigated into an untranslated page that has a reference to a translated page. | ||
− | == I don't see the link but I can read :ref: in the html page == | + | === I don't see the link but I can read :ref: in the html page === |
This is a common problem when using the translation button.<br /> | This is a common problem when using the translation button.<br /> | ||
Line 255: | Line 377: | ||
or: 上記クエリは Sample Data のネットワークを使用しています。</pre> | or: 上記クエリは Sample Data のネットワークを使用しています。</pre> | ||
− | == WARNING: Inline literal start-string without end-string. == | + | === WARNING: Inline literal start-string without end-string. === |
You will get this error is when using ''tools/transifex/create_translations.sh''. Languages like Japanese that don't use spaces to separate words are more likely to have this error. Unfortunately the error is shown only in line 1. | You will get this error is when using ''tools/transifex/create_translations.sh''. Languages like Japanese that don't use spaces to separate words are more likely to have this error. Unfortunately the error is shown only in line 1. | ||
Line 265: | Line 387: | ||
``int4 `` 型の始点ノードのID <--- this will also generate the error (a space is after the 4) | ``int4 `` 型の始点ノードのID <--- this will also generate the error (a space is after the 4) | ||
``int4`` 型の始点ノードのID <--- a space is (before as a new line and) after the inline literal</pre> | ``int4`` 型の始点ノードのID <--- a space is (before as a new line and) after the inline literal</pre> | ||
+ | = Tools for the Reviewer = | ||
+ | |||
+ | === tools/transifex/download_translation.sh === | ||
+ | |||
+ | Use to update the <code>*.po</code> files that are in your system with the latest translation stored in Transifex.<br /> | ||
+ | Languages available: | ||
+ | |||
+ | * es - Spanish | ||
+ | * fr - French | ||
+ | * ja - Japanese | ||
+ | * de - German | ||
+ | |||
+ | tools/transifex/download_translation.sh [es|ja|fr|de] [pgrouting.<filename>] | ||
+ | |||
+ | To download all language translations: | ||
+ | |||
+ | <pre>tools/transifex/download_translation.sh</pre> | ||
+ | To download all the translations of a particular language: | ||
+ | |||
+ | <pre>tools/transifex/download_translation.sh [es|ja|fr|de]</pre> | ||
+ | To download the translation of a specific file you need to state the language also | ||
+ | |||
+ | <pre>tools/transifex/download_translation.sh [es|ja|fr|de] [pgrouting.<filename>]</pre> | ||
+ | |||
+ | === tools/transifex/create_translations.sh === | ||
+ | |||
+ | Use to create: html, man, pdf documentation of the languages based on the <code>*.po</code> files stored in your system. Languages available: | ||
+ | |||
+ | * es - Spanish | ||
+ | * fr - French | ||
+ | * ja - Japanese | ||
+ | * de - German | ||
+ | |||
+ | To create the documentation of all the languages | ||
+ | |||
+ | <pre>tools/transifex/create_translations.sh</pre> | ||
+ | To create the documentation of a particular language: | ||
+ | |||
+ | <pre>tools/transifex/create_translations.sh [es|ja|fr|de]</pre> | ||
+ | The main index.html of the documentation will be located at: | ||
+ | |||
+ | <pre>build/doc/html/[es|ja|fr|de]/doc/index.html</pre> | ||
= Main wiki page = | = Main wiki page = | ||
− | * [https:// | + | * [https://wiki.osgeo.org/wiki/OSGeoLive OSGeoLive Wiki] |
+ | |||
+ | |||
+ | [[Category: OSGeoLive]] |
Latest revision as of 12:26, 28 February 2018
This document is divided in two part, if you want to help us translate the OSGeoLive documentation, the first part will guide you through the Transifex platform. If you want to help us build it the second part will give you more technical information about Transifex, sphinx and the building process.
Translate on Transifex
Thanks for helping us translate the OSGeoLive project documentation !
You can find us there: [1]
Available languages
As for now (february 2018), there is 18 registered languages for the project. If your language is not in the list below (or on the updated list on Transifex), please make a request to add it !
The list of Languages:
- Bengali
- Catalan
- Dutch
- Finnish
- French
- German
- Greek
- Hindi
- Hungarian
- Italian
- Japanese
- Polish
- Portuguese
- Russian
- Spanish
- Mexican spanish
Connect to the Transifex platform
If you don't have an account, please create one and then go to the project page.
Look for the language you want to help with (or ask to add it if it is not there already).
For each languages, there is a list of resources, it is the files to translate (actually 180 of them).
Files to translate
The list of resources are classified as:
- ">>" Urgent - OSGeo-Live related files
- "^" High - Projects related files
- "-" Normal - Deprecated projects files (not for translating)
You can easily order them by Version (v11) and and descending priority
Please note that the urgent files are the OSGeoLive project files, if you are more comfortable translating only the files of a project provided by OSGeoLive, it is perfectly ok. :)
Please note each project has 2 files:
- an overview prefixed with overview--<name of the project>
- a quickstart prefixed with quickstart--<name of the project>
Translation
Once you have choose a file to translate, a little summary appears:
1. The choosen resource and the language, here overview--overview (French) 2. Word count 3. String count 4. Translation button
After clicking on the translation button, you access to the translation panels:
1. String counts: Total, non translated, non revised 2. Reviewed string 3. Translated non reviewed string 4. raw string (in English) 5. Raw string to be translated 6. Translation panel 7. Translation save button 8. Review button (if you are a reviewer) 9. Suggestions panel (from past translations, by similarity)
By clicking on a string in the left panel, it will be placed in the panel 5 and if possible a translation will be proposed in 6. You can edit this translation right from the panel 6 then save it by clicking on 7.
You are an OSGeoLive translator ! Congratulations !
Thanks for helping us !
Now, you can translate another string then another, etc. And Then another file :)
Welcome aboard !
Roles
There is several roles where you can help us.
Translator
This role can translate strings, it is the most important job !
Reviewer
If your a confident enough in your language and technical knowledge, you can become a reviewer and review strings to fix the possible typos.
Language coordinator
A coordinator can accept new Translator and grant Reviewer privileges. With a lot of different languages, it helps a lot the administrator.
Build the documentation
The general process OSGeo-Live used for documentation:
This section is a work in progress, please excuse us.
- The developer use ReStructuredText syntax to write the documentation in English.
- That documentation is then used with Sphinx to generate the english html, man, pdf, etc.
- Also using Sphinx-intl the
*.pot
files are generated. - Those
*.pot
files are used by Transifex and they contain only the strings that need to be translated. - Translator works with those strings using the process bellow.
- When the translator finishes a language, the git hub mantainers proceed to download the generated
*.po
files that contain the translated strings and commit them in git hub and update the documentation page. Users can create their translation using:
tools/transifex/create_translation.sh fr
Translations to French are going to be used as examples along this wiki, we choose French so you can focus on what is being translated and what is not.
Before you start
Prepare your clone for documentation
## Prepare the directory git clone https://github.com/OSGeo/OSGeoLive-doc docClone cd docClone git checkout develop ## new things come into develop, then are merged into master mkdir build cd build ## prepare the documentation for French (English is automatically build) cmake -DHTML=ON -DFR=ON .. ## Build the doc make doc cd ..
Downloading translation
- To download a particular file.
Best when reviewing the file:
tx pull -l fr -r osgeolive.quickstart--ideditor_quickstart
- Download the latest translated
*.po
files of your language based on translation percentage.
tx pull -l fr --minimum-perc=100
- Ask for help:
tx pull --help
Checking the download
git status
A possible output:
Have your language documentation html open.
Viewing your language html will help to put strings in context and/or check the translation.
tools/transifex/create_translations.sh fr
The French documentation would be in
build/doc/html/fr/doc/index.html
Transifex files that are not accepting translations.
Files not accepting translations are marked with a red dot, maybe the file belongs to a previous version of OSGeo-Live documentation, or it was moved from one directory to another. Those files are not erased from the system so any translated string can be reused.
English spelling and grammar
Sometimes the developers and the reviewers have typos in the English version, you will see spelling typos with a wavy red line, unfortunately it is too late to correct them for the current version. So proceed with the translation with the best of your ability. For the grammar, if you don't understand what is being told, please go to issue 200 to post a comment stating the file and pasting the English string. If a change has been considered, the string to be translated will be posted on the "instructions" for the string.
Working with small strings
Choose the small files first.
For "small" I mean the ones that have very few strings to be translated. That will start building up a bank of translated strings that can be used in larger files. To detect a "small" file go to the list of [resources] (https://www.transifex.com/projects/p/pgrouting/resources/) and choose a file with few words or few strings.
Use "translate" button
The "translate button" comes quite handy, you still have to check the translation, and there is an "undo" button if you think that its better for you to type the translation than to modify the machine's translation.
Don't use "translate" button on stand alone references like
en: :ref:`sample` ja: :ref:`サンプル` <--- wrong
Use a "suggestion"
When you work with transifex it builds up a translated string bank and it will show one or more suggestions. If the suggestion is very close to what is needed, use it, and change the translation to the final translation of the string. Example:
en: :ref:`pgr_astar<pgr_astar>` - Shortest Path A* Use suggestion: pgr_astar - A*アルゴリズムを用いた最短経路探索 Modify to: :ref:`pgr_astar<pgr_astar>` - A*アルゴリズムを用いた最短経路探索
Use "copy button"
Copy the the stand alone references like
en: :ref:`sample` ja: :ref:`sample`
Type a translation
You can just type your translation.
Go to the next string
When you finished translating the string press "tab", that way it get's saved, if you click to a different string, maybe because the next string is already translated, then it won't be saved (green/white stripes).
Save your translation
Make sure all strings using the "Save all unsaved translations" button.
Check your work
This step is needed not to check the translation but to check that ReStructuredText in the translated strings is correct. Many things might be wrong, an extra space, a missing space or a missing character "`" .
Download the translated file and recreate the translation
If the file you modified in transifex is doc--src--changelog--index and want to check the Japanese translation
tools/transifex/download_translation.sh ja pgrouting.doc--src--changelog--index tools/transifex/create_translations.sh ja
Navigate to the the translated file, for this example it would be
build/doc/html/ja/doc/src/changelog/index.html
Notice the relation between names:
Transifex name: pgrouting.doc--src--changelog--index Html Generated File: build/doc/html/ja/doc/src/changelog/index.html
And visualy compare the "looks" with the [English version] (http://docs.pgrouting.org/2.0/en/doc/index.html)
Use the "Approve translation" button
When the file is fully translated (except the navigation bar), you can are about to approve the translation, ????????
- Check the links first, example: there is a link to sample data.
Example:
html: 上記クエリは サンプルデータ のネットワークを使用しています。 <-- sample data is translated or: 上記クエリは Sample Data のネットワークを使用しています。 <--- sample data needs translation
If you can navigate the links, you are ok
- When using create_translation script there was no "inline" error (see Translation Troubleshooting ), you are ok
If you are ok, then choose a string and click the "Approve translation" button.
Which file is next
Do doc--index last
That way you can use the "Use suggestion" in this file.
Work "important" files first
All files are important, but the following files are the core of the project. Most of them have repeated strings, so the "Use Suggestion" tactic is perfect, and you can use the search box to find them.
- your project files: you know that project certainly better than us, especially in your language; starting by the overview then the quickstart - OSGeoLive files: there is several core files for the OSgeoLive documentation:
- index - overview--overview - overview--toc - quickstart--virtualization_quickstart - quickstart--usb_quickstart - quickstart--osgeolive_quickstart - copyright - contributors - translators - presentation - sponsors
etc
They are listed with a red double ">" priority sign
Work the "almost finished" files
After you finish a file, you can choose a file that is "almost done". I found pretty uncomfortable the list placed at the left, so to choose an almost done file I recommend:
- Click Documentation
- Click on your language
- click on the sorting button (sorts by % of termination)
This is very useful when you have a lot of files already translated
Work files that belong to a directory
Based on the following files:
- doc--src--changelog--1_x ... 150 words (25 strings) ...
- doc--src--changelog--2_0 ... 277 words (26 strings) ...
- doc--src--changelog--index ... 4 words (3 strings) ...
Maybe you started working with doc--src--changelog--index, so the next step would be to work with
- doc--src--changelog--1_x
- doc--src--changelog--2_0
So you finished a section, go Translation Check your work.
Troubleshooting
Please post any question in issue 200
The :ref:`nameoflink` link is not translated
Example
en: The queries use the :ref:`sampledata` network. ja: 上記クエリは :ref:`sampledata` のネットワークを使用しています。 html: 上記クエリは Sample Data のネットワークを使用しています。
Thats and indication that the referenced page for Sample Data, isn't fully translated. If you can click on the link and navigate you are ok.
The :ref:`nameoflink` link is the only thing that is translated
Example
en: The queries use the :ref:`sampledata` network. ja: The queries use the :ref:`sampledata` network. html: The queries use the サンプルデータ network.
Maybe you navigated into an untranslated page that has a reference to a translated page.
I don't see the link but I can read :ref: in the html page
This is a common problem when using the translation button.
Example
en: The queries use the :ref:`sampledata` network. ja: 上記クエリは: ref:'sampledata'のネットワークを使用しています。 html: 上記クエリは: ref:'sampledata'のネットワークを使用しています。
The link's generated by the button need to be corrected, I suggest to copy the link together with its sorrounding spaces from the English version:
------------------- en: The queries use the :ref:`sampledata` network. ja: 上記クエリは :ref:`sampledata` のネットワークを使用しています。 html: 上記クエリは サンプルデータ のネットワークを使用しています。 or: 上記クエリは Sample Data のネットワークを使用しています。
WARNING: Inline literal start-string without end-string.
You will get this error is when using tools/transifex/create_translations.sh. Languages like Japanese that don't use spaces to separate words are more likely to have this error. Unfortunately the error is shown only in line 1.
Inline literals [specs] (http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup) require a space before and after. The inline literals we use the most are of the type ``inlineliteral`` like in:
``int4`` id of the end point ``int4``型の始点ノードのID <--- this will generate the error ``int4 `` 型の始点ノードのID <--- this will also generate the error (a space is after the 4) ``int4`` 型の始点ノードのID <--- a space is (before as a new line and) after the inline literal
Tools for the Reviewer
tools/transifex/download_translation.sh
Use to update the *.po
files that are in your system with the latest translation stored in Transifex.
Languages available:
- es - Spanish
- fr - French
- ja - Japanese
- de - German
tools/transifex/download_translation.sh [es|ja|fr|de] [pgrouting.<filename>]
To download all language translations:
tools/transifex/download_translation.sh
To download all the translations of a particular language:
tools/transifex/download_translation.sh [es|ja|fr|de]
To download the translation of a specific file you need to state the language also
tools/transifex/download_translation.sh [es|ja|fr|de] [pgrouting.<filename>]
tools/transifex/create_translations.sh
Use to create: html, man, pdf documentation of the languages based on the *.po
files stored in your system. Languages available:
- es - Spanish
- fr - French
- ja - Japanese
- de - German
To create the documentation of all the languages
tools/transifex/create_translations.sh
To create the documentation of a particular language:
tools/transifex/create_translations.sh [es|ja|fr|de]
The main index.html of the documentation will be located at:
build/doc/html/[es|ja|fr|de]/doc/index.html