Changes between Initial version and Version 1 of the_docs_strikes_back

28 Dec 2017, 11:53:29 (5 years ago)



  • the_docs_strikes_back

    v1 v1  
     3Part 2 of building the docs, this will be about .po files generation and the Transifex workflow.
     5= Logs =
     11Inspiration :
     13= Installing Transifex client =
     15{{{sudo pip install transifex-client
     17# check it is working
     18tx --version # 0.12.4 when writing this documentation
     20If you followed the previous part [ Building the docs], the pot files are already made.
     22{{{# pot files of the source language (english)
     23ls -R locale/pot
     25# po file for the locales (e.g. Spanish)
     26ls -R locale/es}}}
     27The pot files are pushes to the repository (see this file for change it).
     29= Updating the files =
     31When we build the {{{locale}}} with CMakeLists.txt, the gettext command is called, so all the po files are updated at the same time.
     33see the [ locale command]
     35{{{sphinx-intl update-txconfig-resources --pot-dir locales/pot --transifex-project-name osgeolive
     37= Pushing to Transifex =
     39The configuration for Transifex ({{{.tx/config}}}) should have been done automatically. So we only need to push the updates to the Transifex platform
     41{{{ tx push -s}}}
     42It can be interesting to assign a category to freshly pushed resources, so you can sort them easily.
     44== Auto Update ==
     46Transifex can be configured to check files twice a day and update them. Please see this link for more information about it:
     50= Rebuild the .pot files =
     52Make sure build directory is empty
     54{{{rm -rf build/*}}}
     55Build the pot/po files
     57{{{cd build
     58cmake  -DLOCALE=ON ..
     59make locale > locale_log.txt
     60cd ..}}}
     61List .pot files
     63{{{ls -R locale/pot}}}
     64List a language's .po files for example spanish:
     66{{{ls -R locale/es}}}
     67Then to update Transifex:
     69{{{ tx push -s}}}
     70= Prioritizing the translations =
     72== locking older versions ==
     74Some files, like standards are kept but not upgraded. So there is no need to translate them. It is possible to lock them, in the Resource Settings and untick the option "Your translators can translate resource strings".
     76== Translation priority ==
     78This cna be set with the up ">" at the right of the resource. There is 3 possilities
     80* Urgent : 2 red ">"
     81* High : 1 yellow ">"
     82* normal : 1 green "-"
     84Put retired or non translated docs to normal. Osgeo-live related docs are set to "Urgent".
     86= Fixing errors =
     88== Mismatch error ==
     90If you get a {{{Mismatch: both interpreted text role prefix and reference suffix.}}} error it might means that a string as prefix that is not recognized.
     92For example this english string:
     94{{{Geospatial algorithms, including those from :doc:`JTS `, can be called through GeoServer's `WPS <>`__ interface. This includes the chaining of processes, and using rendering transformations to create powerful visualisations through the WMS interface.}}}
     95is translated in French to:
     97{{{Des algorithmes géospatiaux, incluant ceux venant de :doc:`JTS `, peuvent être appelés via l'interface :doc:`WPS <>`__ de GeoServer. Cela inclue le chaînage de traitements, et l'utilisation de transformations de rendu pour créer des visualisations puissantes via l'interface WMS.}}}
     98Do you see the surplus {{{:doc:}}} ?
     100Yes right before WPS ! {{{:doc:}}} are use to link to document in the documentation, but it is a link to the WPS webpage. So sphinx doesn't find the {{{WPS <>}}} file and gives an error.