aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-09-14 16:17:27 -0700
committerGavin Andresen <gavinandresen@gmail.com>2013-09-14 16:17:27 -0700
commit2975db76b3c6ce5f70d7dc547e74c61543191b22 (patch)
treec277c0fef55f1bf13e0ee07c384687aa20867b7f /src
parent4c5969b367d2b8582abc3b0018e18456a7377497 (diff)
parenta0c3ab7ed1011c66b5137a77f701b00be376dda1 (diff)
downloadbitcoin-2975db76b3c6ce5f70d7dc547e74c61543191b22.tar.xz
Merge pull request #2996 from theuni/qt-translation
Update translation process for autotools
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/qt/Makefile.am44
2 files changed, 32 insertions, 16 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 3499784234..65e675e525 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -58,6 +58,10 @@ leveldb/libmemenv.a:
@echo "Building LevelDB ..." && cd leveldb && CXX="$(CXX)" CC="$(CC)" \
PLATFORM=$(TARGET_OS) AR="$(AR)" $(MAKE) $(LEVELDB_TARGET_FLAGS) OPT="$(CXXFLAGS) $(CPPFLAGS)" libmemenv.a
+qt/bitcoinstrings.cpp: $(libbitcoin_a_SOURCES)
+ @test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
+ @cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py
+
CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
DISTCLEANFILES = obj/build.h
diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am
index c6c4cb37a3..33c5825eb3 100644
--- a/src/qt/Makefile.am
+++ b/src/qt/Makefile.am
@@ -53,6 +53,9 @@ QT_MOC_CPP = moc_aboutdialog.cpp moc_addressbookpage.cpp \
moc_transactiontablemodel.cpp moc_transactionview.cpp moc_walletframe.cpp \
moc_walletmodel.cpp moc_walletstack.cpp moc_walletview.cpp
+BITCOIN_MM = macdockiconhandler.mm macnotificationhandler.mm
+QR_CPP = qrcodedialog.cpp
+
QT_MOC = intro.moc overviewpage.moc rpcconsole.moc
QT_QRC_CPP = qrc_bitcoin.cpp
@@ -91,18 +94,9 @@ RES_ICONS = res/icons/bitcoin.png res/icons/address-book.png \
res/icons/qrcode.png res/icons/debugwindow.png res/icons/bitcoin.ico \
res/icons/bitcoin_testnet.ico
-RES_IMAGES = res/images/about.png res/images/splash.png \
- res/images/splash_testnet.png
-
-RES_MOVIES = res/movies/update_spinner.mng
-
-BITCOIN_RC = res/bitcoin-qt-res.rc
-
-libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
- -I$(top_srcdir)/src/qt/forms $(QT_DBUS_INCLUDES)
-libbitcoinqt_a_SOURCES = aboutdialog.cpp addressbookpage.cpp \
+BITCOIN_QT_CPP = aboutdialog.cpp addressbookpage.cpp \
addresstablemodel.cpp askpassphrasedialog.cpp bitcoinaddressvalidator.cpp \
- bitcoinamountfield.cpp bitcoin.cpp bitcoingui.cpp bitcoinstrings.cpp \
+ bitcoinamountfield.cpp bitcoin.cpp bitcoingui.cpp \
bitcoinunits.cpp clientmodel.cpp csvmodelwriter.cpp editaddressdialog.cpp \
guiutil.cpp intro.cpp monitoreddatamapper.cpp notificator.cpp \
optionsdialog.cpp optionsmodel.cpp overviewpage.cpp paymentrequestplus.cpp \
@@ -111,9 +105,19 @@ libbitcoinqt_a_SOURCES = aboutdialog.cpp addressbookpage.cpp \
signverifymessagedialog.cpp splashscreen.cpp transactiondesc.cpp \
transactiondescdialog.cpp transactionfilterproxy.cpp transactionrecord.cpp \
transactiontablemodel.cpp transactionview.cpp walletframe.cpp \
- walletmodel.cpp walletmodeltransaction.cpp walletstack.cpp walletview.cpp \
- $(BITCOIN_QT_H) $(QT_FORMS_UI) $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) \
- $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
+ walletmodel.cpp walletmodeltransaction.cpp walletstack.cpp walletview.cpp
+
+RES_IMAGES = res/images/about.png res/images/splash.png \
+ res/images/splash_testnet.png
+
+RES_MOVIES = res/movies/update_spinner.mng
+
+BITCOIN_RC = res/bitcoin-qt-res.rc
+
+libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
+ -I$(top_srcdir)/src/qt/forms $(QT_DBUS_INCLUDES)
+libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
+ $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
nodist_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \
$(PROTOBUF_H) $(QT_QRC_CPP)
@@ -126,13 +130,13 @@ $(QT_MOC): $(PROTOBUF_H)
$(QT_MOC_CPP): $(PROTOBUF_H)
if TARGET_DARWIN
- libbitcoinqt_a_SOURCES += macdockiconhandler.mm macnotificationhandler.mm
+ libbitcoinqt_a_SOURCES += $(BITCOIN_MM)
endif
if TARGET_WINDOWS
libbitcoinqt_a_SOURCES += $(BITCOIN_RC)
endif
if USE_QRCODE
- libbitcoinqt_a_SOURCES += qrcodedialog.cpp
+ libbitcoinqt_a_SOURCES += $(QR_CPP)
endif
#
@@ -149,8 +153,16 @@ QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:
#locale/foo.ts -> locale/foo.qm
QT_QM=$(QT_TS:.ts=.qm)
+.PHONY: FORCE
.SECONDARY: $(QT_QM)
+bitcoinstrings.cpp: FORCE
+ $(MAKE) -C $(top_srcdir)/src qt/bitcoinstrings.cpp
+
+translate: bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM) $(QR_CPP)
+ @test -n $(LUPDATE) || echo "lupdate is required for updating translations"
+ @$(LUPDATE) $^ -locations relative -no-obsolete -ts locale/bitcoin_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) && $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \
echo error: could not build $@