-
Notifications
You must be signed in to change notification settings - Fork 16
Add new translations
We use the transifex client to get the latest translations. Resources
are the files that are uploaded on transifex and need to be translated into other languages, at the moment they are: wheelmap.yml
, relaunch.yml
, categories.yml
, ember.yml
and authentication.yml
. Wheelmap is available in 22 languages, english is the source language on which 21 other available locales rely on for translations, they can be found in locales.
Note transifex might require python3
(and pip3
) as well as a newer version of urllib3
. Run pip install urllib3 --upgrade
if you have issues with the command.
via easy_install:
$ sudo easy_install pip
or from source:
$ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
$ python get-pip.py
or via Ubuntu packages:
sudo apt-get update
sudo apt-get install -y python-pip
python get-pip.py
via pip:
$ sudo pip install transifex-client
or from source:
$ git clone http://code.transifex.com/transifex-client
$ cd transifex-client
$ python setup.py install
Please check and config the file .transifexrc
that should be located in your home folder. Learn more about it here.
Example config:
[https://www.transifex.com]
username = user
token =
password = p@ssw0rd
hostname = https://www.transifex.com
$ cd wheelmap
Now you are ready to pull the latest translation files from transifex.
$ tx pull
# don't worry about where to put the files, it will be done automatically
or:
$ tx pull -f
# use force pull when transifex skips to pull specific files that you need though
$ tx -d pull -a
$ tx pull -r transifex.core
$ tx pull -r 'transifex.co*'
$ tx pull -r transifex.core
$ tx pull -r 'transifex.co*'
$ bundle exec rake i18n:js:export
# generates and exports translations to JS file(s) - no further precompiling needed
Important:
Don't use bundle exec rake generate:i18n_js
anymore as this is legacy code that has to be removed in the future.
That's it! Nothing more to do here.
$ tx status
$ bundle exec rake -T