fix translation processs

This commit is contained in:
UdjinM6 2015-04-15 02:14:56 +03:00
parent 4760879775
commit f35b4d80bb
3 changed files with 7 additions and 7 deletions

View File

@ -37,10 +37,10 @@ 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 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`, 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 so make sure that utility is installed (ie, `apt-get install gettext` on
Ubuntu/Debian). Once this has been updated, lupdate-qt4 (included in the Qt SDK) Ubuntu/Debian). Once this has been updated, lupdate (included in the Qt SDK)
is used to update dash_en.ts. Simply run: is used to update dash_en.ts. This process has been automated, from src/,
simply run:
lupdate-qt4 ./contrib/dash-qt.pro -ts ./src/qt/locale/dash_en.ts make translate
##### Handling of plurals in the source file ##### Handling of plurals in the source file

View File

@ -9,7 +9,7 @@ import operator
import os import os
import sys import sys
OUT_CPP="qt/bitcoinstrings.cpp" OUT_CPP="qt/dashstrings.cpp"
EMPTY=['""'] EMPTY=['""']
def parse_po(text): def parse_po(text):

View File

@ -331,11 +331,11 @@ QT_QM=$(QT_TS:.ts=.qm)
.SECONDARY: $(QT_QM) .SECONDARY: $(QT_QM)
qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) qt/dashstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES)
@test -n $(XGETTEXT) || echo "xgettext is required for updating translations" @test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) ../share/qt/extract_strings_qt.py $^ $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) ../share/qt/extract_strings_qt.py $^
translate: qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM) translate: qt/dashstrings.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" @test -n $(LUPDATE) || echo "lupdate is required for updating translations"
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts qt/locale/dash_en.ts $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts qt/locale/dash_en.ts