Browse Source

Merge pull request #4110

3a54ad9 Full translation update (Wladimir J. van der Laan)
9dd5d79 devtools: add a script to fetch and postprocess translations (Wladimir J. van der Laan)
58c01a3 qt: add transifex configuration file (Wladimir J. van der Laan)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
583df73acd
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 7
      .tx/config
  2. 12
      contrib/devtools/README.md
  3. 66
      contrib/devtools/update-translations.py
  4. 29
      doc/translation_process.md
  5. 1043
      src/qt/locale/bitcoin_ach.ts
  6. 1043
      src/qt/locale/bitcoin_af_ZA.ts
  7. 884
      src/qt/locale/bitcoin_ar.ts
  8. 1043
      src/qt/locale/bitcoin_be_BY.ts
  9. 1145
      src/qt/locale/bitcoin_bg.ts
  10. 1043
      src/qt/locale/bitcoin_bs.ts
  11. 1043
      src/qt/locale/bitcoin_ca.ts
  12. 884
      src/qt/locale/bitcoin_ca@valencia.ts
  13. 1049
      src/qt/locale/bitcoin_ca_ES.ts
  14. 884
      src/qt/locale/bitcoin_cmn.ts
  15. 1047
      src/qt/locale/bitcoin_cs.ts
  16. 1043
      src/qt/locale/bitcoin_cy.ts
  17. 1067
      src/qt/locale/bitcoin_da.ts
  18. 1186
      src/qt/locale/bitcoin_de.ts
  19. 1051
      src/qt/locale/bitcoin_el_GR.ts
  20. 1049
      src/qt/locale/bitcoin_eo.ts
  21. 884
      src/qt/locale/bitcoin_es.ts
  22. 884
      src/qt/locale/bitcoin_es_CL.ts
  23. 1016
      src/qt/locale/bitcoin_es_DO.ts
  24. 1045
      src/qt/locale/bitcoin_es_MX.ts
  25. 1043
      src/qt/locale/bitcoin_es_UY.ts
  26. 1047
      src/qt/locale/bitcoin_et.ts
  27. 1043
      src/qt/locale/bitcoin_eu_ES.ts
  28. 1055
      src/qt/locale/bitcoin_fa.ts
  29. 1043
      src/qt/locale/bitcoin_fa_IR.ts
  30. 884
      src/qt/locale/bitcoin_fi.ts
  31. 1051
      src/qt/locale/bitcoin_fr.ts
  32. 1043
      src/qt/locale/bitcoin_fr_CA.ts
  33. 884
      src/qt/locale/bitcoin_gl.ts
  34. 1043
      src/qt/locale/bitcoin_gu_IN.ts
  35. 1084
      src/qt/locale/bitcoin_he.ts
  36. 1043
      src/qt/locale/bitcoin_hi_IN.ts
  37. 1043
      src/qt/locale/bitcoin_hr.ts
  38. 1055
      src/qt/locale/bitcoin_hu.ts
  39. 1787
      src/qt/locale/bitcoin_id_ID.ts
  40. 1447
      src/qt/locale/bitcoin_it.ts
  41. 884
      src/qt/locale/bitcoin_ja.ts
  42. 884
      src/qt/locale/bitcoin_ka.ts
  43. 1043
      src/qt/locale/bitcoin_kk_KZ.ts
  44. 1071
      src/qt/locale/bitcoin_ko_KR.ts
  45. 884
      src/qt/locale/bitcoin_ky.ts
  46. 1047
      src/qt/locale/bitcoin_la.ts
  47. 1047
      src/qt/locale/bitcoin_lt.ts
  48. 1457
      src/qt/locale/bitcoin_lv_LV.ts
  49. 1043
      src/qt/locale/bitcoin_ms_MY.ts
  50. 1020
      src/qt/locale/bitcoin_nb.ts
  51. 884
      src/qt/locale/bitcoin_nl.ts
  52. 1045
      src/qt/locale/bitcoin_pam.ts
  53. 1018
      src/qt/locale/bitcoin_pl.ts
  54. 1125
      src/qt/locale/bitcoin_pt_BR.ts
  55. 1546
      src/qt/locale/bitcoin_pt_PT.ts
  56. 1020
      src/qt/locale/bitcoin_ro_RO.ts
  57. 1059
      src/qt/locale/bitcoin_ru.ts
  58. 884
      src/qt/locale/bitcoin_sah.ts
  59. 884
      src/qt/locale/bitcoin_sk.ts
  60. 1065
      src/qt/locale/bitcoin_sl_SI.ts
  61. 1043
      src/qt/locale/bitcoin_sq.ts
  62. 1043
      src/qt/locale/bitcoin_sr.ts
  63. 1475
      src/qt/locale/bitcoin_sv.ts
  64. 1043
      src/qt/locale/bitcoin_th_TH.ts
  65. 1055
      src/qt/locale/bitcoin_tr.ts
  66. 1049
      src/qt/locale/bitcoin_uk.ts
  67. 884
      src/qt/locale/bitcoin_ur_PK.ts
  68. 884
      src/qt/locale/bitcoin_uz@Cyrl.ts
  69. 1043
      src/qt/locale/bitcoin_vi.ts
  70. 1043
      src/qt/locale/bitcoin_vi_VN.ts
  71. 884
      src/qt/locale/bitcoin_zh_CN.ts
  72. 884
      src/qt/locale/bitcoin_zh_HK.ts
  73. 884
      src/qt/locale/bitcoin_zh_TW.ts

7
.tx/config

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
[main]
host = https://www.transifex.com
[bitcoin.tx]
file_filter = src/qt/locale/bitcoin_<lang>.ts
source_file = src/qt/locale/bitcoin_en.ts
source_lang = en

12
contrib/devtools/README.md

@ -69,3 +69,15 @@ If there are 'unsupported' symbols, the return value will be 1 a list like this @@ -69,3 +69,15 @@ If there are 'unsupported' symbols, the return value will be 1 a list like this
.../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15
.../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15
update-translations.py
=======================
Run this script from the root of the repository to update all translations from transifex.
It will do the following automatically:
- fetch all translations
- post-process them into valid and committable format
- add missing translations to the build system (TODO)
See doc/translation-process.md for more information.

66
contrib/devtools/update-translations.py

@ -0,0 +1,66 @@ @@ -0,0 +1,66 @@
#!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the following automatically:
- fetch all translations using the tx tool
- post-process them into valid and committable format
- remove invalid control characters
- remove location tags (makes diffs less noisy)
TODO:
- auto-add new translations to the build system according to the translation process
- remove 'unfinished' translation items
'''
from __future__ import division, print_function
import subprocess
import re
import sys
import os
# Name of transifex tool
TX = 'tx'
# Name of source language file
SOURCE_LANG = 'bitcoin_en.ts'
# Directory with locale files
LOCALE_DIR = 'src/qt/locale'
def check_at_repository_root():
if not os.path.exists('.git'):
print('No .git directory found')
print('Execute this script at the root of the repository', file=sys.stderr)
exit(1)
def fetch_all_translations():
if subprocess.call([TX, 'pull', '-f']):
print('Error while fetching translations', file=sys.stderr)
exit(1)
def postprocess_translations():
print('Postprocessing...')
for filename in os.listdir(LOCALE_DIR):
# process only language files, and do not process source language
if not filename.endswith('.ts') or filename == SOURCE_LANG:
continue
filepath = os.path.join(LOCALE_DIR, filename)
with open(filepath, 'rb') as f:
data = f.read()
# remove non-allowed control characters
data = re.sub('[\x00-\x09\x0b\x0c\x0e-\x1f]', '', data)
data = data.split('\n')
# strip locations from non-origin translation
# location tags are used to guide translators, they are not necessary for compilation
# TODO: actually process XML instead of relying on Transifex's one-tag-per-line output format
data = [line for line in data if not '<location' in line]
with open(filepath, 'wb') as f:
f.write('\n'.join(data))
if __name__ == '__main__':
check_at_repository_root()
fetch_all_translations()
postprocess_translations()

29
doc/translation_process.md

@ -71,34 +71,15 @@ We are using https://transifex.com as a frontend for translating the client. @@ -71,34 +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. Use the following
config to be able to connect with the client:
is used to fetch new translations from Transifex. The configuration for this client (`.tx/config`)
is part of the repository.
### .tx/config
[main]
host = https://www.transifex.com
[bitcoin.tx]
file_filter = src/qt/locale/bitcoin_<lang>.ts
source_file = src/qt/locale/bitcoin_en.ts
source_lang = en
### .tx/config (for Windows)
[main]
host = https://www.transifex.com
[bitcoin.tx]
file_filter = src\qt\locale\bitcoin_<lang>.ts
source_file = src\qt\locale\bitcoin_en.ts
source_lang = en
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

1043
src/qt/locale/bitcoin_ach.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_af_ZA.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_ar.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_be_BY.ts

File diff suppressed because it is too large Load Diff

1145
src/qt/locale/bitcoin_bg.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_bs.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_ca.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_ca@valencia.ts

File diff suppressed because it is too large Load Diff

1049
src/qt/locale/bitcoin_ca_ES.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_cmn.ts

File diff suppressed because it is too large Load Diff

1047
src/qt/locale/bitcoin_cs.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_cy.ts

File diff suppressed because it is too large Load Diff

1067
src/qt/locale/bitcoin_da.ts

File diff suppressed because it is too large Load Diff

1186
src/qt/locale/bitcoin_de.ts

File diff suppressed because it is too large Load Diff

1051
src/qt/locale/bitcoin_el_GR.ts

File diff suppressed because it is too large Load Diff

1049
src/qt/locale/bitcoin_eo.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_es.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_es_CL.ts

File diff suppressed because it is too large Load Diff

1016
src/qt/locale/bitcoin_es_DO.ts

File diff suppressed because it is too large Load Diff

1045
src/qt/locale/bitcoin_es_MX.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_es_UY.ts

File diff suppressed because it is too large Load Diff

1047
src/qt/locale/bitcoin_et.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_eu_ES.ts

File diff suppressed because it is too large Load Diff

1055
src/qt/locale/bitcoin_fa.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_fa_IR.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_fi.ts

File diff suppressed because it is too large Load Diff

1051
src/qt/locale/bitcoin_fr.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_fr_CA.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_gl.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_gu_IN.ts

File diff suppressed because it is too large Load Diff

1084
src/qt/locale/bitcoin_he.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_hi_IN.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_hr.ts

File diff suppressed because it is too large Load Diff

1055
src/qt/locale/bitcoin_hu.ts

File diff suppressed because it is too large Load Diff

1787
src/qt/locale/bitcoin_id_ID.ts

File diff suppressed because it is too large Load Diff

1447
src/qt/locale/bitcoin_it.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_ja.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_ka.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_kk_KZ.ts

File diff suppressed because it is too large Load Diff

1071
src/qt/locale/bitcoin_ko_KR.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_ky.ts

File diff suppressed because it is too large Load Diff

1047
src/qt/locale/bitcoin_la.ts

File diff suppressed because it is too large Load Diff

1047
src/qt/locale/bitcoin_lt.ts

File diff suppressed because it is too large Load Diff

1457
src/qt/locale/bitcoin_lv_LV.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_ms_MY.ts

File diff suppressed because it is too large Load Diff

1020
src/qt/locale/bitcoin_nb.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_nl.ts

File diff suppressed because it is too large Load Diff

1045
src/qt/locale/bitcoin_pam.ts

File diff suppressed because it is too large Load Diff

1018
src/qt/locale/bitcoin_pl.ts

File diff suppressed because it is too large Load Diff

1125
src/qt/locale/bitcoin_pt_BR.ts

File diff suppressed because it is too large Load Diff

1546
src/qt/locale/bitcoin_pt_PT.ts

File diff suppressed because it is too large Load Diff

1020
src/qt/locale/bitcoin_ro_RO.ts

File diff suppressed because it is too large Load Diff

1059
src/qt/locale/bitcoin_ru.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_sah.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_sk.ts

File diff suppressed because it is too large Load Diff

1065
src/qt/locale/bitcoin_sl_SI.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_sq.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_sr.ts

File diff suppressed because it is too large Load Diff

1475
src/qt/locale/bitcoin_sv.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_th_TH.ts

File diff suppressed because it is too large Load Diff

1055
src/qt/locale/bitcoin_tr.ts

File diff suppressed because it is too large Load Diff

1049
src/qt/locale/bitcoin_uk.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_ur_PK.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_uz@Cyrl.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_vi.ts

File diff suppressed because it is too large Load Diff

1043
src/qt/locale/bitcoin_vi_VN.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_zh_CN.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_zh_HK.ts

File diff suppressed because it is too large Load Diff

884
src/qt/locale/bitcoin_zh_TW.ts

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save