Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

translation_process.md 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. Translations
  2. ============
  3. The Qt GUI can be easily translated into other languages. Here's how we
  4. handle those translations.
  5. Files and Folders
  6. -----------------
  7. ### bitcoin-qt.pro
  8. This file takes care of generating `.qm` files from `.ts` files. It is mostly
  9. automated.
  10. ### src/qt/bitcoin.qrc
  11. This file must be updated whenever a new translation is added. Please note that
  12. files must end with `.qm`, not `.ts`.
  13. <qresource prefix="/translations">
  14. <file alias="en">locale/bitcoin_en.qm</file>
  15. ...
  16. </qresource>
  17. ### src/qt/locale/
  18. This directory contains all translations. Filenames must adhere to this format:
  19. bitcoin_xx_YY.ts or bitcoin_xx.ts
  20. #### Source file
  21. `src/qt/locale/bitcoin_en.ts` is treated in a special way. It is used as the
  22. source for all other translations. Whenever a string in the code is changed
  23. this file must be updated to reflect those changes. Usually, this can be
  24. accomplished by running `lupdate` (included in the Qt SDK).
  25. An updated source file should be merged to github and transifex will pick it
  26. up from there. Afterwards the new strings show up as "Remaining" in transifex
  27. and can be translated.
  28. Syncing with transifex
  29. ----------------------
  30. We are using http://transifex.net as a frontend for translating the client.
  31. https://www.transifex.net/projects/p/bitcoin/resource/tx/
  32. The "transifex client" (see: http://help.transifex.net/features/client/)
  33. will help with fetching new translations from transifex. Use the following
  34. config to be able to connect with the client.
  35. ### .tx/config
  36. [main]
  37. host = https://www.transifex.net
  38. [bitcoin.tx]
  39. file_filter = src/qt/locale/bitcoin_<lang>.ts
  40. source_file = src/qt/locale/bitcoin_en.ts
  41. source_lang = en
  42. ### .tx/config (for Windows)
  43. [main]
  44. host = https://www.transifex.net
  45. [bitcoin.tx]
  46. file_filter = src\qt\locale\bitcoin_<lang>.ts
  47. source_file = src\qt\locale\bitcoin_en.ts
  48. source_lang = en
  49. It is also possible to directly download new translations one by one from transifex.
  50. ### Fetching new translations
  51. 1. `tx pull -a`
  52. 2. update `src/qt/bitcoin.qrc` manually or via
  53. `ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(bitcoin_\(.*\)\).ts/<file alias="\2">locale/\1.qm<\/file>/'`
  54. 3. `git add` new translations from `src/qt/locale/`