Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup localization via Transifex #3

Closed
tomkralidis opened this issue Jan 21, 2014 · 5 comments
Closed

setup localization via Transifex #3

tomkralidis opened this issue Jan 21, 2014 · 5 comments
Milestone

Comments

@tomkralidis
Copy link
Member

Applied to both plugin and docs.

tomkralidis added a commit that referenced this issue Jan 30, 2014
tomkralidis added a commit that referenced this issue Feb 9, 2014
@tomkralidis tomkralidis modified the milestones: 0.1.0, 0.2.0 Feb 14, 2014
@tomkralidis
Copy link
Member Author

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

  • @rduivenvoorde and @tomkralidis are maintainers initially
  • we can add languages manually for now via the Transifex UI, and in the codebase
  • we should commit the .po / .ts files, but I haven't done so yet until make plugin a QDockWidget #24 is implemented (this may change our UI / text some)
  • paver extract_messages provides the bootstrap to get the initial strings for UI, UI templates and docs

Workflow:

  • add new language via Transifex UI and in code dirs via git
  • translators provide content to Transifex (either via UI or code via tx push -s)
  • maintainers tx pull -a
  • paver compile_messages builds all the .qm / .mo files
  • paver refresh_docs builds all docs for all languages

@tomkralidis
Copy link
Member Author

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
Copy link
Member Author

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

  • keep only one of _static, _sources, _images directories
  • scan all Sphinx html outputs and point to one language's _static, _sources, _images directories
  • delete all the others

@rduivenvoorde
Copy link

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
Copy link
Member Author

Done. Website updated with multilingual docs/setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants