Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.57 KB

i18n.md

File metadata and controls

41 lines (27 loc) · 1.57 KB

Internationalization and localization

Translations are managed by .po files, via the transifex platform.

The keys for all the translations are the strings in English.

When a feature branch is merged into master, the new strings are automatically sent on Transifex (using Travis, .tx/push.sh and i18n.sh)

We gather all the new translations from Transifex before releasing the feature on maps.qwant.com:

  • An API Token is required (create one here)
  • Open a terminal
  • Run tx pull -af
    • All PO files will be force-pulled, except en-US that is not present on TF but present in the project
    • Enter your API token when asked
    • If "tx" is unknown: run sudo apt install transifex-client
  • To rebuild erdapfel with the new translations: npm run build and npm run i18n.
  • Commit and push the updated PO files

Poedit configuration

For debug purposes only:

Download and install poedit.

Add a new parser in File > Preferences > Parsers > New:

  • Language: JS
  • List of extensions: *.js, *.yml
  • Parser command: xgettext --language=Python --force-po -o %o %C %K %F
  • Item in Keyword List: -k%k
  • Item in input files list: %f
  • Source code charset: --from-code=%c

Add another parser, same settings as before except:

  • Language: PHP
  • List of extensions: .ejs

You can open and edit the PO files in /language/message/, or parse the project to find new untranslated strings