Changes between Initial Version and Version 1 of the_docs_strikes_back


Ignore:
Timestamp:
12/28/17 11:53:29 (7 years ago)
Author:
bakaniko
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • the_docs_strikes_back

    v1 v1  
     1__TOC__
     2
     3Part 2 of building the docs, this will be about .po files generation and the Transifex workflow.
     4
     5= Logs =
     6
     7* http://irclogs.geoapt.com/osgeolive/%23osgeolive.2017-09-19.log
     8* http://irclogs.geoapt.com/osgeolive/%23osgeolive.2017-09-26.log
     9* http://irclogs.geoapt.com/osgeolive/%23osgeolive.2017-09-27.log
     10
     11Inspiration : https://github.com/cvvergara/OSGeoLive-doc/tree/aurebesh/locale
     12
     13= Installing Transifex client =
     14
     15{{{sudo pip install transifex-client
     16
     17# check it is working
     18tx --version # 0.12.4 when writing this documentation
     19}}}
     20If you followed the previous part [https://github.com/cvvergara/OSGeoLive-doc/wiki/Building-the-docs Building the docs], the pot files are already made.
     21
     22{{{# pot files of the source language (english)
     23ls -R locale/pot
     24
     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).
     28
     29= Updating the files =
     30
     31When we build the {{{locale}}} with CMakeLists.txt, the gettext command is called, so all the po files are updated at the same time.
     32
     33see the [https://github.com/cvvergara/OSGeoLive-doc/blob/cm_fix_header/doc/CMakeLists.txt#L101 locale command]
     34
     35{{{sphinx-intl update-txconfig-resources --pot-dir locales/pot --transifex-project-name osgeolive
     36}}}
     37= Pushing to Transifex =
     38
     39The configuration for Transifex ({{{.tx/config}}}) should have been done automatically. So we only need to push the updates to the Transifex platform
     40
     41{{{ tx push -s}}}
     42It can be interesting to assign a category to freshly pushed resources, so you can sort them easily.
     43
     44== Auto Update ==
     45
     46Transifex can be configured to check files twice a day and update them. Please see this link for more information about it:
     47
     48https://docs.transifex.com/projects/updating-content/#automatically-updating-source-files
     49
     50= Rebuild the .pot files =
     51
     52Make sure build directory is empty
     53
     54{{{rm -rf build/*}}}
     55Build the pot/po files
     56
     57{{{cd build
     58cmake  -DLOCALE=ON ..
     59make locale > locale_log.txt
     60cd ..}}}
     61List .pot files
     62
     63{{{ls -R locale/pot}}}
     64List a language's .po files for example spanish:
     65
     66{{{ls -R locale/es}}}
     67Then to update Transifex:
     68
     69{{{ tx push -s}}}
     70= Prioritizing the translations =
     71
     72== locking older versions ==
     73
     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".
     75
     76== Translation priority ==
     77
     78This cna be set with the up ">" at the right of the resource. There is 3 possilities
     79
     80* Urgent : 2 red ">"
     81* High : 1 yellow ">"
     82* normal : 1 green "-"
     83
     84Put retired or non translated docs to normal. Osgeo-live related docs are set to "Urgent".
     85
     86= Fixing errors =
     87
     88== Mismatch error ==
     89
     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.
     91
     92For example this english string:
     93
     94{{{Geospatial algorithms, including those from :doc:`JTS `, can be called through GeoServer's `WPS <http://www.opengeospatial.org/standards/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:
     96
     97{{{Des algorithmes géospatiaux, incluant ceux venant de :doc:`JTS `, peuvent être appelés via l'interface :doc:`WPS <http://www.opengeospatial.org/standards/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:}}} ?
     99
     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 <http://www.opengeospatial.org/standards/wps>}}} file and gives an error.