devtools: add a script to fetch and postprocess translations

Run this script from the root of the repository to update all translations from transifex.
It will do the following automatically:

- create a transifex configuration file
- fetch all translations
- post-process them into valid and committable format
This commit is contained in:
Wladimir J. van der Laan
2014-04-30 09:46:04 +02:00
parent 58c01a376d
commit 9dd5d79244
3 changed files with 82 additions and 3 deletions

View File

@@ -71,14 +71,15 @@ We are using https://transifex.com as a frontend for translating the client.
https://www.transifex.com/projects/p/bitcoin/resource/tx/
The "Transifex client" (see: http://support.transifex.com/customer/portal/topics/440187-transifex-client/articles)
will help with fetching new translations from Transifex. The Transifex configuration (`.tx/config`)
is used to fetch new translations from Transifex. The configuration for this client (`.tx/config`)
is part of the repository.
It is also possible to directly download new translations one by one from the Transifex website.
Do not directly download translations one by one from the Transifex website, as we do a few
postprocessing steps before committing the translations.
### Fetching new translations
1. `tx pull -a`
1. `python contrib/devtools/update-translations.py`
2. update `src/qt/bitcoin.qrc` manually or via
`ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(bitcoin_\(.*\)\).ts/<file alias="\2">locale\/\1.qm<\/file>/'`
3. update `src/qt/Makefile.am` manually or via