summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-10 12:39:01 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-10 14:52:56 -0700
commite3e47b34a101dfefeea67e6b4ed2ede308bfdf72 (patch)
tree096d130f278ffe7ac859e8f7870ed42e46b640d3
parentf5423c48b8cbc6998fbb22663e6f75cdea1ff8e1 (diff)
downloadsubsurface-e3e47b34a101dfefeea67e6b4ed2ede308bfdf72.tar.gz
Automatically build translations
This runs lrelease against the .ts files and automatically recreates the .qm files if any of the .ts files changes. This also moves the .ts files into the translations directory. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--subsurface-install.pri14
-rw-r--r--subsurface.pro38
-rw-r--r--translations/subsurface_bg_BG.ts (renamed from subsurface_bg_BG.ts)0
-rw-r--r--translations/subsurface_ca_ES.ts (renamed from subsurface_ca_ES.ts)0
-rw-r--r--translations/subsurface_da_DK.ts (renamed from subsurface_da_DK.ts)0
-rw-r--r--translations/subsurface_de_CH.ts (renamed from subsurface_de_CH.ts)0
-rw-r--r--translations/subsurface_de_DE.ts (renamed from subsurface_de_DE.ts)0
-rw-r--r--translations/subsurface_es_ES.ts (renamed from subsurface_es_ES.ts)0
-rw-r--r--translations/subsurface_et_EE.ts (renamed from subsurface_et_EE.ts)0
-rw-r--r--translations/subsurface_fi_FI.ts (renamed from subsurface_fi_FI.ts)0
-rw-r--r--translations/subsurface_fr_FR.ts (renamed from subsurface_fr_FR.ts)0
-rw-r--r--translations/subsurface_hr_HR.ts (renamed from subsurface_hr_HR.ts)0
-rw-r--r--translations/subsurface_it_IT.ts (renamed from subsurface_it_IT.ts)0
-rw-r--r--translations/subsurface_nb_NO.ts (renamed from subsurface_nb_NO.ts)0
-rw-r--r--translations/subsurface_nl_NL.ts (renamed from subsurface_nl_NL.ts)0
-rw-r--r--translations/subsurface_pl_PL.ts (renamed from subsurface_pl_PL.ts)0
-rw-r--r--translations/subsurface_pt_BR.ts (renamed from subsurface_pt_BR.ts)0
-rw-r--r--translations/subsurface_pt_PT.ts (renamed from subsurface_pt_PT.ts)0
-rw-r--r--translations/subsurface_ru_RU.ts (renamed from subsurface_ru_RU.ts)0
-rw-r--r--translations/subsurface_sk_SK.ts (renamed from subsurface_sk_SK.ts)0
-rw-r--r--translations/subsurface_sv_SE.ts (renamed from subsurface_sv_SE.ts)0
21 files changed, 33 insertions, 19 deletions
diff --git a/subsurface-install.pri b/subsurface-install.pri
index b630b605c..ec208328c 100644
--- a/subsurface-install.pri
+++ b/subsurface-install.pri
@@ -113,4 +113,18 @@ XSLTDIR = $(DATADIR)/subsurface
INSTALLS += target desktop icon manpage xslt doc marbledir
install.target = install
}
+!isEmpty(TRANSLATIONS) {
+ isEmpty(QMAKE_LRELEASE) {
+ win32: QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
+ else: QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
+ }
+ isEmpty(TS_DIR):TS_DIR = translations
+ TSQM.target = .translations
+ TSQM.name = lrelease subsurface.pro
+ TSQM.depends = $$TRANSLATIONS
+ TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
+ TSQM.commands = $$QMAKE_LRELEASE subsurface.pro && echo "OK" > .translations
+ QMAKE_EXTRA_TARGETS += TSQM
+ PRE_TARGETDEPS += .translations
+}
QMAKE_EXTRA_TARGETS += install $$install.depends
diff --git a/subsurface.pro b/subsurface.pro
index 87c5d9193..f938bfa3a 100644
--- a/subsurface.pro
+++ b/subsurface.pro
@@ -123,25 +123,25 @@ FORMS = \
RESOURCES = subsurface.qrc
TRANSLATIONS = \
- subsurface_bg_BG.ts \
- subsurface_ca_ES.ts \
- subsurface_da_DK.ts \
- subsurface_de_CH.ts \
- subsurface_de_DE.ts \
- subsurface_es_ES.ts \
- subsurface_et_EE.ts \
- subsurface_fi_FI.ts \
- subsurface_fr_FR.ts \
- subsurface_hr_HR.ts \
- subsurface_it_IT.ts \
- subsurface_nb_NO.ts \
- subsurface_nl_NL.ts \
- subsurface_pl_PL.ts \
- subsurface_pt_BR.ts \
- subsurface_pt_PT.ts \
- subsurface_ru_RU.ts \
- subsurface_sk_SK.ts \
- subsurface_sv_SE.ts
+ translations/subsurface_bg_BG.ts \
+ translations/subsurface_ca_ES.ts \
+ translations/subsurface_da_DK.ts \
+ translations/subsurface_de_CH.ts \
+ translations/subsurface_de_DE.ts \
+ translations/subsurface_es_ES.ts \
+ translations/subsurface_et_EE.ts \
+ translations/subsurface_fi_FI.ts \
+ translations/subsurface_fr_FR.ts \
+ translations/subsurface_hr_HR.ts \
+ translations/subsurface_it_IT.ts \
+ translations/subsurface_nb_NO.ts \
+ translations/subsurface_nl_NL.ts \
+ translations/subsurface_pl_PL.ts \
+ translations/subsurface_pt_BR.ts \
+ translations/subsurface_pt_PT.ts \
+ translations/subsurface_ru_RU.ts \
+ translations/subsurface_sk_SK.ts \
+ translations/subsurface_sv_SE.ts
doc.commands = $(CHK_DIR_EXISTS) Documentation || $(MKDIR) Documentation
doc.commands += $$escape_expand(\\n\\t)$(MAKE) -C $$PWD/Documentation OUT=$$OUT_PWD/Documentation doc
diff --git a/subsurface_bg_BG.ts b/translations/subsurface_bg_BG.ts
index 1f279f10d..1f279f10d 100644
--- a/subsurface_bg_BG.ts
+++ b/translations/subsurface_bg_BG.ts
diff --git a/subsurface_ca_ES.ts b/translations/subsurface_ca_ES.ts
index 6f4e5b42e..6f4e5b42e 100644
--- a/subsurface_ca_ES.ts
+++ b/translations/subsurface_ca_ES.ts
diff --git a/subsurface_da_DK.ts b/translations/subsurface_da_DK.ts
index 9845499f9..9845499f9 100644
--- a/subsurface_da_DK.ts
+++ b/translations/subsurface_da_DK.ts
diff --git a/subsurface_de_CH.ts b/translations/subsurface_de_CH.ts
index d2bdc4374..d2bdc4374 100644
--- a/subsurface_de_CH.ts
+++ b/translations/subsurface_de_CH.ts
diff --git a/subsurface_de_DE.ts b/translations/subsurface_de_DE.ts
index 1d4305388..1d4305388 100644
--- a/subsurface_de_DE.ts
+++ b/translations/subsurface_de_DE.ts
diff --git a/subsurface_es_ES.ts b/translations/subsurface_es_ES.ts
index d9307e010..d9307e010 100644
--- a/subsurface_es_ES.ts
+++ b/translations/subsurface_es_ES.ts
diff --git a/subsurface_et_EE.ts b/translations/subsurface_et_EE.ts
index 2f3625809..2f3625809 100644
--- a/subsurface_et_EE.ts
+++ b/translations/subsurface_et_EE.ts
diff --git a/subsurface_fi_FI.ts b/translations/subsurface_fi_FI.ts
index c30290b92..c30290b92 100644
--- a/subsurface_fi_FI.ts
+++ b/translations/subsurface_fi_FI.ts
diff --git a/subsurface_fr_FR.ts b/translations/subsurface_fr_FR.ts
index fe3ced6a4..fe3ced6a4 100644
--- a/subsurface_fr_FR.ts
+++ b/translations/subsurface_fr_FR.ts
diff --git a/subsurface_hr_HR.ts b/translations/subsurface_hr_HR.ts
index 7d907485e..7d907485e 100644
--- a/subsurface_hr_HR.ts
+++ b/translations/subsurface_hr_HR.ts
diff --git a/subsurface_it_IT.ts b/translations/subsurface_it_IT.ts
index d3ba30339..d3ba30339 100644
--- a/subsurface_it_IT.ts
+++ b/translations/subsurface_it_IT.ts
diff --git a/subsurface_nb_NO.ts b/translations/subsurface_nb_NO.ts
index 98b12c251..98b12c251 100644
--- a/subsurface_nb_NO.ts
+++ b/translations/subsurface_nb_NO.ts
diff --git a/subsurface_nl_NL.ts b/translations/subsurface_nl_NL.ts
index d76e0259a..d76e0259a 100644
--- a/subsurface_nl_NL.ts
+++ b/translations/subsurface_nl_NL.ts
diff --git a/subsurface_pl_PL.ts b/translations/subsurface_pl_PL.ts
index fc71b87ab..fc71b87ab 100644
--- a/subsurface_pl_PL.ts
+++ b/translations/subsurface_pl_PL.ts
diff --git a/subsurface_pt_BR.ts b/translations/subsurface_pt_BR.ts
index 2728a3316..2728a3316 100644
--- a/subsurface_pt_BR.ts
+++ b/translations/subsurface_pt_BR.ts
diff --git a/subsurface_pt_PT.ts b/translations/subsurface_pt_PT.ts
index b34d785a5..b34d785a5 100644
--- a/subsurface_pt_PT.ts
+++ b/translations/subsurface_pt_PT.ts
diff --git a/subsurface_ru_RU.ts b/translations/subsurface_ru_RU.ts
index 77769d6a1..77769d6a1 100644
--- a/subsurface_ru_RU.ts
+++ b/translations/subsurface_ru_RU.ts
diff --git a/subsurface_sk_SK.ts b/translations/subsurface_sk_SK.ts
index ba11be414..ba11be414 100644
--- a/subsurface_sk_SK.ts
+++ b/translations/subsurface_sk_SK.ts
diff --git a/subsurface_sv_SE.ts b/translations/subsurface_sv_SE.ts
index 62ebb6e9b..62ebb6e9b 100644
--- a/subsurface_sv_SE.ts
+++ b/translations/subsurface_sv_SE.ts