Git Product home page Git Product logo

Comments (5)

tomkralidis avatar tomkralidis commented on July 27, 2024

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 #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

from metasearch.

tomkralidis avatar tomkralidis commented on July 27, 2024

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.

from metasearch.

tomkralidis avatar tomkralidis commented on July 27, 2024

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

from metasearch.

rduivenvoorde avatar rduivenvoorde commented on July 27, 2024

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

from metasearch.

tomkralidis avatar tomkralidis commented on July 27, 2024

Done. Website updated with multilingual docs/setup.

from metasearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.