geopython / MetaSearch

*** We have moved! MetaSearch is now a core QGIS plugin! (2014-11-30). See QGIS repository
https://hub.qgis.org/wiki/quantum-gis/MetaSearch
Other
4 stars 12 forks source link

setup localization via Transifex #3

Closed tomkralidis closed 10 years ago

tomkralidis commented 10 years ago

Applied to both plugin and docs.

tomkralidis commented 10 years ago

This is now setup (thanks @rduivenvoorde for debugging) at https://www.transifex.com/projects/p/MetaSearch. Notes:

Workflow:

tomkralidis commented 10 years ago

done. Process:

# upload to Transifex
paver extract_messages`  # extract strings
tx push -s  # send en sources to Transifex
# build
`tx pull -a` # pull all languages from Transifex
paver compile_messages
paver refresh_docs

This results in a fully translated package to work against, package and upload.

@rduivenvoorde: the last outstanding item is docs/website. paver refresh_docs will build docs in all languages. paver publish_docs (don't try it yet) will publish the English docs as current (to http://geopython.github.io/MetaSearch/), and the other languages get published to http://geopython.github.io/MetaSearch/<lang>.

Is there another structure we should do to make things better? How does QGIS do it? As well, we need a way to provide language selection in the docs.

tomkralidis commented 10 years ago

As well, foreach language, perhaps we can add the following steps to publish_docs:

rduivenvoorde commented 10 years ago

Hi Tom, with the QGIS sites we use sphinx-intl (https://pypi.python.org/pypi/sphinx-intl)

we only keep resources(=images etc) separated per language, where 'en' is the base-one and other can be copied over it. Sources are only en, and translations are only available as po files in i18n/locale dir. Themes are also not localized (some right to left magic via separate css file).

So in the build dir we first copy all english images (from resources/en so we have an english 'base'), and then we overwrite them with (optionally) available localized images (with exact the same name in resources/xx).

see https://github.com/qgis/QGIS-Website/blob/master/Makefile#L87-L114

tomkralidis commented 10 years ago

Done. Website updated with multilingual docs/setup.