Changes between Initial Version and Version 1 of translation_on_transifex


Ignore:
Timestamp:
08/28/22 05:24:13 (2 years ago)
Author:
bakaniko
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • translation_on_transifex

    v1 v1  
     1
     2This 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.
     3
     4= Translate on Transifex =
     5
     6Thanks for helping us translate the OSGeoLive project documentation !
     7
     8You can find us there: [https://www.transifex.com/osgeo/osgeolive/]
     9
     10== Available languages ==
     11
     12As for now (february 2018), there is 18 registered languages for the project.
     13If your language is not in the list below (or on the updated list on Transifex),
     14please make a request to add it !
     15
     16
     17The list of [https://www.transifex.com/osgeo/osgeolive/languages/ Languages]:
     18
     19* Bengali
     20* Catalan
     21* Dutch
     22* Finnish
     23* French
     24* German
     25* Greek
     26* Hindi
     27* Hungarian
     28* Italian
     29* Japanese
     30* Polish
     31* Portuguese
     32* Russian
     33* Spanish
     34* Mexican spanish
     35
     36
     37== Connect to the Transifex platform ==
     38
     39If you don't have an account, please create one and then go to the project page.
     40
     41Look for the language you want to help with (or ask to add it if it is not there already).
     42
     43For each languages, there is a list of '''resources''', it is the files to translate (actually 180 of them).
     44 
     45[[Languages resources(htdocs:Language_resources.png)]]
     46[[Image(Language_resources.png)]]               # simplest
     47[[Image(Language_resources.png, 120px)]] 
     48
     49== Files to translate ==
     50The list of [https://www.transifex.com/osgeo/osgeolive/content/ resources]
     51are classified as:
     52* ">>" Urgent  - OSGeo-Live related files
     53
     54[[File: OSGEo-Live_transifex_01_index.png | 600px ]]
     55
     56* "^"  High    - Projects related files
     57
     58[[(https://wiki.osgeo.org/w/images/6/6a/OSGEo-Live_transifex_02_second_priority.png)]]
     59
     60* "-"  Normal  - Deprecated projects files (not for translating)
     61
     62[[File: OSGEo-Live_transifex_03_retired_files.png | 600px ]]
     63
     64You can easily order them by Version (v11) and and descending priority
     65
     66[[File : OSGEo-Live_transifex_04_priority.png | 600px ]]
     67
     68Please note that the urgent files are the OSGeoLive project files, if you
     69are more comfortable translating only the files of a project provided by OSGeoLive,
     70it is perfectly ok. :)
     71
     72Please note each project has 2 files:
     73* an overview prefixed with ''overview--<name of the project>''
     74* a quickstart prefixed with ''quickstart--<name of the project>''
     75
     76== Translation ==
     77
     78Once you have choose a file to translate, a little summary appears:
     79
     80[[File : OsgeoLive translation choosen file.png | 600px ]]
     81
     821. The choosen resource and the language, here ''overview--overview (French)''
     832. Word count
     843. String count
     854. Translation button
     86
     87After clicking on the translation button, you access to the translation panels:
     88
     89[[File : OsgeoLive_translation_translatefile.png | 600px ]]
     90
     911. String counts: Total, non translated, non revised
     922. Reviewed string
     933. Translated non reviewed string
     944. raw string (in English)
     955. Raw string to be translated
     966. Translation panel
     977. Translation save button
     988. Review button (if you are a reviewer)
     999. Suggestions panel (from past translations, by similarity)
     100
     101By 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.
     102
     103You are an OSGeoLive translator ! Congratulations !
     104
     105Thanks for helping us !
     106
     107Now, you can translate another string then another, etc. And Then another file :)
     108
     109Welcome aboard !
     110
     111== Roles ==
     112
     113There is several roles where you can help us.
     114
     115=== Translator ===
     116
     117This role can translate strings, it is the most important job !
     118
     119=== Reviewer ===
     120
     121If your a confident enough in your language and technical knowledge, you can become
     122a reviewer and review strings to fix the possible typos.
     123
     124=== Language coordinator ===
     125
     126A coordinator can accept new Translator and grant Reviewer privileges. With a lot of different languages,
     127it helps a lot the administrator.
     128
     129
     130= Build the documentation =
     131== The general process OSGeo-Live used for documentation: ==
     132
     133This section is a work in progress, please excuse us.
     134
     135
     136<ul>
     137<li>The developer use [http://docutils.sourceforge.net/docs/user/rst/quickstart.html ReStructuredText] syntax to write the documentation in English.</li>
     138<li>That documentation is then used with [http://sphinx-doc.org/contents.html Sphinx] to generate the english html, man, pdf, etc.</li>
     139<li>Also using [http://sphinx-doc.org/latest/intl.html Sphinx-intl] the `*.pot` files are generated.</li>
     140<li>Those `*.pot` files are used by [https://www.transifex.com/osgeo/osgeolive Transifex] and they contain only the strings that need to be translated.</li>
     141<li>Translator works with those strings using the process bellow.</li>
     142<li>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.</li>
     143<li><p>Users can create their translation using:</p>
     144<p>tools/transifex/create_translation.sh fr</p></li></ul>
     145
     146Translations 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.
     147
     148== Before you start ==
     149
     150=== Prepare your clone for documentation ===
     151
     152{{{
     153## Prepare the directory
     154git clone https://github.com/OSGeo/OSGeoLive-doc docClone
     155cd docClone
     156git checkout develop ## new things come into develop, then are merged into master
     157mkdir build
     158cd build
     159
     160## prepare the documentation for French (English is automatically build)
     161cmake -DHTML=ON -DFR=ON ..
     162## Build the doc
     163make doc
     164cd ..}}}
     165
     166=== Downloading translation ===
     167
     168* To download a particular file.
     169
     170Best when reviewing the file:
     171
     172{{{
     173tx pull -l fr -r osgeolive.quickstart--ideditor_quickstart
     174}}}
     175
     176* Download the latest translated `*.po` files of your language based on translation percentage.
     177
     178{{{
     179tx pull -l fr --minimum-perc=100
     180}}}
     181
     182
     183* Ask for help:
     184
     185{{{
     186tx pull --help
     187}}}
     188
     189==== Checking the download ====
     190
     191{{{
     192git status
     193}}}
     194
     195A possible output:
     196
     197=== Have your language documentation html open. ===
     198
     199Viewing your language html will help to put strings in context and/or check the translation.
     200
     201{{{tools/transifex/create_translations.sh fr}}}
     202The French documentation would be in
     203
     204{{{build/doc/html/fr/doc/index.html}}}
     205
     206=== Transifex files that are not accepting translations. ===
     207
     208Files 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.
     209
     210=== English spelling and grammar ===
     211
     212Sometimes 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 &quot;instructions&quot; for the string.
     213
     214== Working with small strings ==
     215
     216=== Choose the small files first. ===
     217
     218For &quot;small&quot; 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 &quot;small&quot; 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.
     219
     220=== Use &quot;translate&quot; button ===
     221
     222The &quot;translate button&quot; comes quite handy, you still have to check the translation, and there is an &quot;undo&quot; button if you think that its better for you to type the translation than to modify the machine's translation.
     223
     224Don't use &quot;translate&quot; button on stand alone references like
     225
     226{{{en:  :ref:`sample`
     227ja:  :ref:`サンプル`    &lt;--- wrong}}}
     228=== Use a &quot;suggestion&quot; ===
     229
     230When 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:
     231
     232{{{en:              :ref:`pgr_astar&lt;pgr_astar&gt;` - Shortest Path A*
     233Use suggestion:   pgr_astar - A*アルゴリズムを用いた最短経路探索
     234Modify to:       :ref:`pgr_astar&lt;pgr_astar&gt;` - A*アルゴリズムを用いた最短経路探索}}}
     235=== Use &quot;copy button&quot; ===
     236
     237Copy the the stand alone references like
     238
     239{{{en:  :ref:`sample`
     240ja:  :ref:`sample`}}}
     241=== Type a translation ===
     242
     243You can just type your translation.
     244
     245=== Go to the next string ===
     246
     247When you finished translating the string press &quot;tab&quot;, 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).
     248
     249=== Save your translation ===
     250
     251Make sure all strings using the &quot;Save all unsaved translations&quot; button.
     252
     253== Check your work ==
     254
     255This 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 &quot;`&quot; .
     256
     257=== Download the translated file and recreate the translation ===
     258
     259If the file you modified in transifex is doc--src--changelog--index and want to check the Japanese translation
     260
     261{{{tools/transifex/download_translation.sh ja pgrouting.doc--src--changelog--index
     262tools/transifex/create_translations.sh ja}}}
     263Navigate to the the translated file, for this example it would be
     264
     265{{{build/doc/html/ja/doc/src/changelog/index.html}}}
     266Notice the relation between names:
     267
     268{{{Transifex name:              pgrouting.doc--src--changelog--index
     269Html Generated File: build/doc/html/ja/doc/src/changelog/index.html}}}
     270And visualy compare the &quot;looks&quot; with the [English version] (http://docs.pgrouting.org/2.0/en/doc/index.html)
     271
     272=== Use the &quot;Approve translation&quot; button ===
     273
     274When the file is fully translated (except the navigation bar), you can are about to approve the translation, '''????????'''
     275
     276* Check the links first, example: there is a link to sample data.
     277
     278Example:
     279
     280{{{html:    上記クエリは サンプルデータ のネットワークを使用しています。   &lt;-- sample data is translated
     281or:      上記クエリは Sample Data のネットワークを使用しています。   &lt;--- sample data needs translation}}}
     282If you can navigate the links, you are ok
     283
     284* When using create_translation script there was no &quot;inline&quot; error (see [[Translation Troubleshooting]] ), you are ok
     285
     286If you are ok, then choose a string and click the &quot;Approve translation&quot; button.
     287
     288== Which file is next ==
     289
     290=== Do doc--index last ===
     291
     292That way you can use the &quot;Use suggestion&quot; in this file.
     293
     294=== Work &quot;important&quot; files first ===
     295
     296All files are important, but the following files are the core of the project. Most of them have repeated strings, so the &quot;Use Suggestion&quot; tactic is perfect, and you can use the search box to find them.
     297
     298- your project files: you know that project certainly better than us, especially in your language; starting by the overview then the quickstart
     299- OSGeoLive files: there is several core files for the OSgeoLive documentation:
     300    - index
     301    - overview--overview
     302    - overview--toc
     303    - quickstart--virtualization_quickstart
     304    - quickstart--usb_quickstart
     305    - quickstart--osgeolive_quickstart
     306    - copyright
     307    - contributors
     308    - translators
     309    - presentation
     310    - sponsors
     311
     312etc
     313
     314They are listed with a red double ">" priority sign
     315
     316=== Work the &quot;almost finished&quot; files ===
     317
     318After you finish a file, you can choose a file that is &quot;almost done&quot;. I found pretty uncomfortable the list placed at the left, so to choose an almost done file I recommend:
     319
     320* Click Documentation
     321* Click on your language
     322* click on the sorting button (sorts by % of termination)
     323
     324This is very useful when you have a lot of files already translated
     325
     326=== Work files that belong to a directory ===
     327
     328Based on the following files:
     329
     330* doc--src--changelog--1_x ... 150 words (25 strings) ...
     331* doc--src--changelog--2_0 ... 277 words (26 strings) ...
     332* doc--src--changelog--index ... 4 words (3 strings) ...
     333
     334Maybe you started working with doc--src--changelog--index, so the next step would be to work with
     335
     336* doc--src--changelog--1_x
     337* doc--src--changelog--2_0
     338
     339So you finished a section, go [[Translation Check your work]].
     340
     341= Troubleshooting =
     342
     343Please post any question in [https://github.com/pgRouting/pgrouting/issues/200 issue 200]
     344
     345=== The :ref:`nameoflink` link is not translated ===
     346
     347Example
     348
     349{{{en:      The queries use the :ref:`sampledata` network.
     350ja:      上記クエリは :ref:`sampledata` のネットワークを使用しています。 
     351html:    上記クエリは Sample Data のネットワークを使用しています。}}}
     352Thats 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.
     353
     354=== The :ref:`nameoflink` link is the only thing that is translated ===
     355
     356Example
     357
     358{{{en:      The queries use the :ref:`sampledata` network.
     359ja:      The queries use the :ref:`sampledata` network.
     360html:    The queries use the サンプルデータ  network.}}}
     361Maybe you navigated into an untranslated page that has a reference to a translated page.
     362
     363=== I don't see the link but I can read :ref: in the html page ===
     364
     365This is a common problem when using the translation button.<br />
     366Example
     367
     368{{{en:      The queries use the :ref:`sampledata` network.
     369ja:      上記クエリは: ref:'sampledata'のネットワークを使用しています。   
     370html:    上記クエリは: ref:'sampledata'のネットワークを使用しています。}}}
     371The 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:
     372
     373{{{                            -------------------
     374en:      The queries use the :ref:`sampledata` network.
     375ja:      上記クエリは :ref:`sampledata` のネットワークを使用しています。   
     376html:    上記クエリは サンプルデータ のネットワークを使用しています。
     377  or:    上記クエリは Sample Data のネットワークを使用しています。}}}
     378
     379=== WARNING: Inline literal start-string without end-string. ===
     380
     381You 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.
     382
     383Inline 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:
     384
     385{{{``int4`` id of the end point
     386``int4``型の始点ノードのID         &lt;--- this will generate the error
     387``int4 `` 型の始点ノードのID       &lt;--- this will also generate the error (a space is after the 4)
     388``int4`` 型の始点ノードのID        &lt;--- a space is (before as a new line and) after the inline literal}}}
     389= Tools for the Reviewer =
     390
     391=== tools/transifex/download_translation.sh ===
     392
     393Use to update the `*.po` files that are in your system with the latest translation stored in Transifex.<br />
     394Languages available:
     395
     396* es - Spanish
     397* fr - French
     398* ja - Japanese
     399* de - German
     400
     401tools/transifex/download_translation.sh [es|ja|fr|de] [pgrouting.&lt;filename&gt;]
     402
     403To download all language translations:
     404
     405`tools/transifex/download_translation.sh`
     406To download all the translations of a particular language:
     407
     408{{{tools/transifex/download_translation.sh [es|ja|fr|de]}}}
     409To download the translation of a specific file you need to state the language also
     410
     411{{{tools/transifex/download_translation.sh [es|ja|fr|de] [pgrouting.&lt;filename&gt;]}}}
     412
     413=== tools/transifex/create_translations.sh ===
     414
     415Use to create: html, man, pdf documentation of the languages based on the `*.po` files stored in your system. Languages available:
     416
     417* es - Spanish
     418* fr - French
     419* ja - Japanese
     420* de - German
     421
     422To create the documentation of all the languages
     423
     424{{{tools/transifex/create_translations.sh}}}
     425To create the documentation of a particular language:
     426
     427{{{tools/transifex/create_translations.sh [es|ja|fr|de]}}}
     428The main index.html of the documentation will be located at:
     429
     430{{{build/doc/html/[es|ja|fr|de]/doc/index.html}}}
     431
     432= Main wiki page =
     433
     434* [https://wiki.osgeo.org/wiki/OSGeoLive OSGeoLive Wiki]
     435
     436
     437[[Category: OSGeoLive]]