mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Fix translation makefiles and documentation.
This commit is contained in:
parent
64438577e0
commit
a5ef471326
@ -7,7 +7,7 @@ handle those translations.
|
||||
Files and Folders
|
||||
-----------------
|
||||
|
||||
### bitcoin-qt.pro
|
||||
### darkcoin-qt.pro
|
||||
|
||||
This file takes care of generating `.qm` files from `.ts` files. It is mostly
|
||||
automated.
|
||||
@ -18,7 +18,7 @@ This file must be updated whenever a new translation is added. Please note that
|
||||
files must end with `.qm`, not `.ts`.
|
||||
|
||||
<qresource prefix="/translations">
|
||||
<file alias="en">locale/bitcoin_en.qm</file>
|
||||
<file alias="en">locale/darkcoin_en.qm</file>
|
||||
...
|
||||
</qresource>
|
||||
|
||||
@ -26,25 +26,25 @@ files must end with `.qm`, not `.ts`.
|
||||
|
||||
This directory contains all translations. Filenames must adhere to this format:
|
||||
|
||||
bitcoin_xx_YY.ts or bitcoin_xx.ts
|
||||
darkcoin_xx_YY.ts or darkcoin_xx.ts
|
||||
|
||||
#### bitcoin_en.ts (Source file)
|
||||
#### darkcoin_en.ts (Source file)
|
||||
|
||||
`src/qt/locale/bitcoin_en.ts` is treated in a special way. It is used as the
|
||||
`src/qt/locale/darkcoin_en.ts` is treated in a special way. It is used as the
|
||||
source for all other translations. Whenever a string in the code is changed
|
||||
this file must be updated to reflect those changes. A custom script is used
|
||||
to extract strings from the non-Qt parts. This script makes use of `gettext`,
|
||||
so make sure that utility is installed (ie, `apt-get install gettext` on
|
||||
Ubuntu/Debian). Once this has been updated, lupdate (included in the Qt SDK)
|
||||
is used to update bitcoin_en.ts. This process has been automated, from src/qt,
|
||||
simply run:
|
||||
make translate
|
||||
Ubuntu/Debian). Once this has been updated, lupdate-qt4 (included in the Qt SDK)
|
||||
is used to update darkcoin_en.ts. Simply run:
|
||||
|
||||
lupdate-qt4 ./contrib/darkcoin-qt.pro -ts ./src/qt/locale/darkcoin_en.ts
|
||||
|
||||
##### Handling of plurals in the source file
|
||||
|
||||
When new plurals are added to the source file, it's important to do the following steps:
|
||||
|
||||
1. Open bitcoin_en.ts in Qt Linguist (also included in the Qt SDK)
|
||||
1. Open darkcoin_en.ts in Qt Linguist (also included in the Qt SDK)
|
||||
2. Search for `%n`, which will take you to the parts in the translation that use plurals
|
||||
3. Look for empty `English Translation (Singular)` and `English Translation (Plural)` fields
|
||||
4. Add the appropriate strings for the singular and plural form of the base string
|
||||
@ -60,7 +60,7 @@ in Transifex and can be translated.
|
||||
|
||||
To create the pull-request you have to do:
|
||||
|
||||
git add src/qt/bitcoinstrings.cpp src/qt/locale/bitcoin_en.ts
|
||||
git add src/qt/bitcoinstrings.cpp src/qt/locale/darkcoin_en.ts
|
||||
git commit
|
||||
|
||||
Syncing with Transifex
|
||||
@ -68,7 +68,7 @@ Syncing with Transifex
|
||||
|
||||
We are using https://transifex.com as a frontend for translating the client.
|
||||
|
||||
https://www.transifex.com/projects/p/bitcoin/resource/tx/
|
||||
https://www.transifex.com/projects/p/darkcoin/
|
||||
|
||||
The "Transifex client" (see: http://support.transifex.com/customer/portal/topics/440187-transifex-client/articles)
|
||||
is used to fetch new translations from Transifex. The configuration for this client (`.tx/config`)
|
||||
@ -81,7 +81,7 @@ postprocessing steps before committing the translations.
|
||||
|
||||
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>/'`
|
||||
`ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(darkcoin_\(.*\)\).ts/<file alias="\2">locale\/\1.qm<\/file>/'`
|
||||
3. update `src/qt/Makefile.am` manually or via
|
||||
`ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(bitcoin_\(.*\)\).ts/ locale\/\1.ts \\/'`
|
||||
`ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(darkcoin_\(.*\)\).ts/ locale\/\1.ts \\/'`
|
||||
4. `git add` new translations from `src/qt/locale/`
|
||||
|
@ -12,77 +12,7 @@ DIST_SUBDIRS = . test
|
||||
|
||||
# darkcoin qt core #
|
||||
QT_TS = \
|
||||
locale/bitcoin_ach.ts \
|
||||
locale/bitcoin_af_ZA.ts \
|
||||
locale/bitcoin_ar.ts \
|
||||
locale/bitcoin_be_BY.ts \
|
||||
locale/bitcoin_bg.ts \
|
||||
locale/bitcoin_bs.ts \
|
||||
locale/bitcoin_ca_ES.ts \
|
||||
locale/bitcoin_ca.ts \
|
||||
locale/bitcoin_ca@valencia.ts \
|
||||
locale/bitcoin_cmn.ts \
|
||||
locale/bitcoin_cs.ts \
|
||||
locale/bitcoin_cy.ts \
|
||||
locale/bitcoin_da.ts \
|
||||
locale/bitcoin_de.ts \
|
||||
locale/bitcoin_el_GR.ts \
|
||||
locale/bitcoin_en.ts \
|
||||
locale/bitcoin_eo.ts \
|
||||
locale/bitcoin_es_CL.ts \
|
||||
locale/bitcoin_es_DO.ts \
|
||||
locale/bitcoin_es_MX.ts \
|
||||
locale/bitcoin_es.ts \
|
||||
locale/bitcoin_es_UY.ts \
|
||||
locale/bitcoin_et.ts \
|
||||
locale/bitcoin_eu_ES.ts \
|
||||
locale/bitcoin_fa_IR.ts \
|
||||
locale/bitcoin_fa.ts \
|
||||
locale/bitcoin_fi.ts \
|
||||
locale/bitcoin_fr_CA.ts \
|
||||
locale/bitcoin_fr.ts \
|
||||
locale/bitcoin_gl.ts \
|
||||
locale/bitcoin_gu_IN.ts \
|
||||
locale/bitcoin_he.ts \
|
||||
locale/bitcoin_hi_IN.ts \
|
||||
locale/bitcoin_hr.ts \
|
||||
locale/bitcoin_hu.ts \
|
||||
locale/bitcoin_id_ID.ts \
|
||||
locale/bitcoin_it.ts \
|
||||
locale/bitcoin_ja.ts \
|
||||
locale/bitcoin_ka.ts \
|
||||
locale/bitcoin_kk_KZ.ts \
|
||||
locale/bitcoin_ko_KR.ts \
|
||||
locale/bitcoin_ky.ts \
|
||||
locale/bitcoin_la.ts \
|
||||
locale/bitcoin_lt.ts \
|
||||
locale/bitcoin_lv_LV.ts \
|
||||
locale/bitcoin_mn.ts \
|
||||
locale/bitcoin_ms_MY.ts \
|
||||
locale/bitcoin_nb.ts \
|
||||
locale/bitcoin_nl.ts \
|
||||
locale/bitcoin_pam.ts \
|
||||
locale/bitcoin_pl.ts \
|
||||
locale/bitcoin_pt_BR.ts \
|
||||
locale/bitcoin_pt_PT.ts \
|
||||
locale/bitcoin_ro_RO.ts \
|
||||
locale/bitcoin_ru.ts \
|
||||
locale/bitcoin_sah.ts \
|
||||
locale/bitcoin_sk.ts \
|
||||
locale/bitcoin_sl_SI.ts \
|
||||
locale/bitcoin_sq.ts \
|
||||
locale/bitcoin_sr.ts \
|
||||
locale/bitcoin_sv.ts \
|
||||
locale/bitcoin_th_TH.ts \
|
||||
locale/bitcoin_tr.ts \
|
||||
locale/bitcoin_uk.ts \
|
||||
locale/bitcoin_ur_PK.ts \
|
||||
locale/bitcoin_uz@Cyrl.ts \
|
||||
locale/bitcoin_vi.ts \
|
||||
locale/bitcoin_vi_VN.ts \
|
||||
locale/bitcoin_zh_CN.ts \
|
||||
locale/bitcoin_zh_HK.ts \
|
||||
locale/bitcoin_zh_TW.ts
|
||||
locale/darkcoin_en.ts
|
||||
|
||||
QT_FORMS_UI = \
|
||||
forms/aboutdialog.ui \
|
||||
@ -373,7 +303,7 @@ bitcoinstrings.cpp: FORCE
|
||||
|
||||
translate: bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
|
||||
@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
|
||||
@QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts locale/bitcoin_en.ts
|
||||
@QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts locale/darkcoin_en.ts
|
||||
|
||||
$(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
|
||||
@cd $(abs_srcdir); test -f $(RCC) && QT_SELECT=$(QT_SELECT) $(RCC) -name darkcoin -o $(abs_builddir)/$@ $< || \
|
||||
|
@ -85,76 +85,6 @@
|
||||
<file alias="spinner-034">res/movies/spinner-034.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/translations">
|
||||
<file alias="ach">locale/bitcoin_ach.qm</file>
|
||||
<file alias="af_ZA">locale/bitcoin_af_ZA.qm</file>
|
||||
<file alias="ar">locale/bitcoin_ar.qm</file>
|
||||
<file alias="be_BY">locale/bitcoin_be_BY.qm</file>
|
||||
<file alias="bg">locale/bitcoin_bg.qm</file>
|
||||
<file alias="bs">locale/bitcoin_bs.qm</file>
|
||||
<file alias="ca_ES">locale/bitcoin_ca_ES.qm</file>
|
||||
<file alias="ca">locale/bitcoin_ca.qm</file>
|
||||
<file alias="ca@valencia">locale/bitcoin_ca@valencia.qm</file>
|
||||
<file alias="cmn">locale/bitcoin_cmn.qm</file>
|
||||
<file alias="cs">locale/bitcoin_cs.qm</file>
|
||||
<file alias="cy">locale/bitcoin_cy.qm</file>
|
||||
<file alias="da">locale/bitcoin_da.qm</file>
|
||||
<file alias="de">locale/bitcoin_de.qm</file>
|
||||
<file alias="el_GR">locale/bitcoin_el_GR.qm</file>
|
||||
<file alias="en">locale/bitcoin_en.qm</file>
|
||||
<file alias="eo">locale/bitcoin_eo.qm</file>
|
||||
<file alias="es_CL">locale/bitcoin_es_CL.qm</file>
|
||||
<file alias="es_DO">locale/bitcoin_es_DO.qm</file>
|
||||
<file alias="es_MX">locale/bitcoin_es_MX.qm</file>
|
||||
<file alias="es">locale/bitcoin_es.qm</file>
|
||||
<file alias="es_UY">locale/bitcoin_es_UY.qm</file>
|
||||
<file alias="et">locale/bitcoin_et.qm</file>
|
||||
<file alias="eu_ES">locale/bitcoin_eu_ES.qm</file>
|
||||
<file alias="fa_IR">locale/bitcoin_fa_IR.qm</file>
|
||||
<file alias="fa">locale/bitcoin_fa.qm</file>
|
||||
<file alias="fi">locale/bitcoin_fi.qm</file>
|
||||
<file alias="fr_CA">locale/bitcoin_fr_CA.qm</file>
|
||||
<file alias="fr">locale/bitcoin_fr.qm</file>
|
||||
<file alias="gl">locale/bitcoin_gl.qm</file>
|
||||
<file alias="gu_IN">locale/bitcoin_gu_IN.qm</file>
|
||||
<file alias="he">locale/bitcoin_he.qm</file>
|
||||
<file alias="hi_IN">locale/bitcoin_hi_IN.qm</file>
|
||||
<file alias="hr">locale/bitcoin_hr.qm</file>
|
||||
<file alias="hu">locale/bitcoin_hu.qm</file>
|
||||
<file alias="id_ID">locale/bitcoin_id_ID.qm</file>
|
||||
<file alias="it">locale/bitcoin_it.qm</file>
|
||||
<file alias="ja">locale/bitcoin_ja.qm</file>
|
||||
<file alias="ka">locale/bitcoin_ka.qm</file>
|
||||
<file alias="kk_KZ">locale/bitcoin_kk_KZ.qm</file>
|
||||
<file alias="ko_KR">locale/bitcoin_ko_KR.qm</file>
|
||||
<file alias="ky">locale/bitcoin_ky.qm</file>
|
||||
<file alias="la">locale/bitcoin_la.qm</file>
|
||||
<file alias="lt">locale/bitcoin_lt.qm</file>
|
||||
<file alias="lv_LV">locale/bitcoin_lv_LV.qm</file>
|
||||
<file alias="mn">locale/bitcoin_mn.qm</file>
|
||||
<file alias="ms_MY">locale/bitcoin_ms_MY.qm</file>
|
||||
<file alias="nb">locale/bitcoin_nb.qm</file>
|
||||
<file alias="nl">locale/bitcoin_nl.qm</file>
|
||||
<file alias="pam">locale/bitcoin_pam.qm</file>
|
||||
<file alias="pl">locale/bitcoin_pl.qm</file>
|
||||
<file alias="pt_BR">locale/bitcoin_pt_BR.qm</file>
|
||||
<file alias="pt_PT">locale/bitcoin_pt_PT.qm</file>
|
||||
<file alias="ro_RO">locale/bitcoin_ro_RO.qm</file>
|
||||
<file alias="ru">locale/bitcoin_ru.qm</file>
|
||||
<file alias="sah">locale/bitcoin_sah.qm</file>
|
||||
<file alias="sk">locale/bitcoin_sk.qm</file>
|
||||
<file alias="sl_SI">locale/bitcoin_sl_SI.qm</file>
|
||||
<file alias="sq">locale/bitcoin_sq.qm</file>
|
||||
<file alias="sr">locale/bitcoin_sr.qm</file>
|
||||
<file alias="sv">locale/bitcoin_sv.qm</file>
|
||||
<file alias="th_TH">locale/bitcoin_th_TH.qm</file>
|
||||
<file alias="tr">locale/bitcoin_tr.qm</file>
|
||||
<file alias="uk">locale/bitcoin_uk.qm</file>
|
||||
<file alias="ur_PK">locale/bitcoin_ur_PK.qm</file>
|
||||
<file alias="uz@Cyrl">locale/bitcoin_uz@Cyrl.qm</file>
|
||||
<file alias="vi">locale/bitcoin_vi.qm</file>
|
||||
<file alias="vi_VN">locale/bitcoin_vi_VN.qm</file>
|
||||
<file alias="zh_CN">locale/bitcoin_zh_CN.qm</file>
|
||||
<file alias="zh_HK">locale/bitcoin_zh_HK.qm</file>
|
||||
<file alias="zh_TW">locale/bitcoin_zh_TW.qm</file>
|
||||
<file alias="en">locale/darkcoin_en.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Loading…
Reference in New Issue
Block a user