From 9e89a0eb650da29426c06b91845b985d6c4cb86a Mon Sep 17 00:00:00 2001
From: boppybibbles <43829320+boppybibbles@users.noreply.github.com>
Date: Sat, 4 Jan 2020 20:12:09 +0200
Subject: [PATCH 1/3] Use new stable version of `install-qt-action`.
---
.github/workflows/ccpp.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml
index e6c3a004d..3feddfcf6 100644
--- a/.github/workflows/ccpp.yml
+++ b/.github/workflows/ccpp.yml
@@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Install Qt
- uses: jurplel/install-qt-action@v1
+ uses: jurplel/install-qt-action@v2
- name: Install Linux packages
run: sudo apt update && sudo apt install -y --no-install-recommends libgl1-mesa-dev
- name: qmake
From 7c5fa4e14e9dc54ef370fc8af7276dea75af1f1d Mon Sep 17 00:00:00 2001
From: boppybibbles <43829320+boppybibbles@users.noreply.github.com>
Date: Sat, 4 Jan 2020 19:47:37 +0200
Subject: [PATCH 2/3] Enable out-of-source builds.
- Rely on `qmake`'s `CONFIG` to generate and embed QM files.
- Add all existing TS files to TRANSLATE.
- Keep TRANSLATE in single project file: `src/src.pro`.
- Update 'steps to translate' section in `CONTRIBUTING.md`.
---
CONTRIBUTING.md | 4 ++--
main/main.cpp | 1 +
qtpass.pro | 28 ----------------------------
resources.qrc | 22 ----------------------
src/src.pro | 47 ++++++++++++++++++++++-------------------------
5 files changed, 25 insertions(+), 77 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 267839b95..c5ae99336 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -20,8 +20,8 @@ This document is still in a very early stage and needs a lot more work.
## Translations
-* Add you language to the `qtpass.pro` file
- under TRANSLATIONS and in the `resources.qrc` file.
+* Add you language to the `src/src.pro` file
+ under TRANSLATIONS.
* Next run the command `qmake` which will create and update the localization files.
* Edit your file with (let's imagine your language is sv_SE (Swedish)
`linguist localization/localization_sv_SE.ts`
diff --git a/main/main.cpp b/main/main.cpp
index c5688537e..97d7611de 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -69,6 +69,7 @@ int main(int argc, char *argv[]) {
#endif
Q_INIT_RESOURCE(resources);
+ Q_INIT_RESOURCE(qmake_qmake_qm_files); // qmake names the file
QCoreApplication::setOrganizationName("IJHack");
QCoreApplication::setOrganizationDomain("ijhack.org");
diff --git a/qtpass.pro b/qtpass.pro
index c1b3da24f..438b09e85 100644
--- a/qtpass.pro
+++ b/qtpass.pro
@@ -56,32 +56,4 @@ CONFIG(coverage) {
QMAKE_DISTCLEAN += -r src/$$OBJECTS_DIR/lcov/
}
-TRANSLATIONS += localization/localization_ca.ts \
- localization/localization_nl_NL.ts \
- localization/localization_nl_BE.ts \
- localization/localization_de_DE.ts \
- localization/localization_es_ES.ts \
- localization/localization_gl_ES.ts \
- localization/localization_hu_HU.ts \
- localization/localization_sv_SE.ts \
- localization/localization_pl_PL.ts \
- localization/localization_ru_RU.ts \
- localization/localization_he_IL.ts \
- localization/localization_zh_CN.ts \
- localization/localization_ar_MA.ts \
- localization/localization_fr_FR.ts \
- localization/localization_fr_BE.ts \
- localization/localization_fr_LU.ts \
- localization/localization_de_LU.ts \
- localization/localization_lb_LU.ts \
- localization/localization_en_GB.ts \
- localization/localization_en_US.ts \
- localization/localization_el_GR.ts \
- localization/localization_cs_CZ.ts \
- localization/localization_it_IT.ts \
- localization/localization_sq_AL.ts \
- localization/localization_pt_PT.ts \
- localization/localization_tr_TR.ts \
- localization/localization_nb_NO.ts
-
system($$QMAKE_LUPDATE -locations absolute ./src ./main -ts localization/*.ts)
diff --git a/resources.qrc b/resources.qrc
index f173a433a..6166c1192 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -4,28 +4,6 @@
artwork/icon.ico
artwork/icon.png
artwork/icon.svg
- localization/localization_ar_MA.qm
- localization/localization_ca.qm
- localization/localization_de_DE.qm
- localization/localization_es_ES.qm
- localization/localization_gl_ES.qm
- localization/localization_hu_HU.qm
- localization/localization_nl_BE.qm
- localization/localization_nl_NL.qm
- localization/localization_sv_SE.qm
- localization/localization_pl_PL.qm
- localization/localization_ru_RU.qm
- localization/localization_zh_CN.qm
- localization/localization_he_IL.qm
- localization/localization_cs_CZ.qm
- localization/localization_fr_FR.qm
- localization/localization_en_GB.qm
- localization/localization_en_US.qm
- localization/localization_pt_PT.qm
- localization/localization_it_IT.qm
- localization/localization_sq_AL.qm
- localization/localization_nb_NO.qm
- localization/localization_tr_TR.qm
icons/document-new.svg
diff --git a/src/src.pro b/src/src.pro
index 2b3a951e9..524ab25ab 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -7,33 +7,36 @@ TARGET = qtpass
CONFIG += c++11 staticlib
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT
-TRANSLATIONS += ../localization/localization_nl_NL.ts \
- ../localization/localization_ca.ts \
+TRANSLATIONS += ../localization/localization_ar_MA.ts \
+ ../localization/localization_ca.ts \
+ ../localization/localization_cs_CZ.ts \
../localization/localization_de_DE.ts \
+ ../localization/localization_de_LU.ts \
+ ../localization/localization_el_GR.ts \
+ ../localization/localization_en_GB.ts \
+ ../localization/localization_en_US.ts \
../localization/localization_es_ES.ts \
+ ../localization/localization_fr_BE.ts \
+ ../localization/localization_fr_FR.ts \
+ ../localization/localization_fr_LU.ts \
../localization/localization_gl_ES.ts \
+ ../localization/localization_he_IL.ts \
../localization/localization_hu_HU.ts \
- ../localization/localization_sv_SE.ts \
+ ../localization/localization_it_IT.ts \
+ ../localization/localization_lb_LU.ts \
+ ../localization/localization_nb_NO.ts \
+ ../localization/localization_nl_BE.ts \
+ ../localization/localization_nl_NL.ts \
../localization/localization_pl_PL.ts \
+ ../localization/localization_pt_PT.ts \
../localization/localization_ru_RU.ts \
- ../localization/localization_he_IL.ts \
- ../localization/localization_zh_CN.ts \
- ../localization/localization_ar_MA.ts \
- ../localization/localization_fr_FR.ts \
- ../localization/localization_fr_BE.ts \
- ../localization/localization_nl_BE.ts \
- ../localization/localization_fr_LU.ts \
- ../localization/localization_de_LU.ts \
- ../localization/localization_lb_LU.ts \
- ../localization/localization_en_GB.ts \
- ../localization/localization_en_US.ts \
- ../localization/localization_el_GR.ts \
- ../localization/localization_cs_CZ.ts \
- ../localization/localization_it_IT.ts \
../localization/localization_sq_AL.ts \
- ../localization/localization_pt_PT.ts \
+ ../localization/localization_sv_SE.ts \
../localization/localization_tr_TR.ts \
- ../localization/localization_nb_NO.ts
+ ../localization/localization_zh_CN.ts \
+
+CONFIG += lrelease embed_translations
+QM_FILES_RESOURCE_PREFIX=/localization
SOURCES += mainwindow.cpp \
configdialog.cpp \
@@ -88,12 +91,6 @@ FORMS += mainwindow.ui \
keygendialog.ui \
passworddialog.ui
-updateqm.input = TRANSLATIONS
-updateqm.output = ../localization/${QMAKE_FILE_BASE}.qm
-updateqm.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ../localization/${QMAKE_FILE_BASE}.qm
-updateqm.CONFIG += no_link target_predeps
-QMAKE_EXTRA_COMPILERS += updateqm
-
!nosingleapp {
SOURCES += singleapplication.cpp
HEADERS += singleapplication.h
From 7d873d8a4ed06b0c5899fe2837a14d8934eff167 Mon Sep 17 00:00:00 2001
From: boppybibbles <43829320+boppybibbles@users.noreply.github.com>
Date: Sat, 4 Jan 2020 19:49:44 +0200
Subject: [PATCH 3/3] Update all TS files because of changed source code.
---
localization/localization_ar_MA.ts | 2 +-
localization/localization_ca.ts | 2 +-
localization/localization_cs_CZ.ts | 2 +-
localization/localization_de_DE.ts | 2 +-
localization/localization_de_LU.ts | 2 +-
localization/localization_el_GR.ts | 2 +-
localization/localization_en_GB.ts | 2 +-
localization/localization_en_US.ts | 2 +-
localization/localization_es_ES.ts | 2 +-
localization/localization_fr_BE.ts | 2 +-
localization/localization_fr_FR.ts | 2 +-
localization/localization_fr_LU.ts | 2 +-
localization/localization_gl_ES.ts | 2 +-
localization/localization_he_IL.ts | 2 +-
localization/localization_hu_HU.ts | 2 +-
localization/localization_it_IT.ts | 2 +-
localization/localization_lb_LU.ts | 2 +-
localization/localization_nb_NO.ts | 2 +-
localization/localization_nl_BE.ts | 2 +-
localization/localization_nl_NL.ts | 2 +-
localization/localization_pl_PL.ts | 2 +-
localization/localization_pt_PT.ts | 2 +-
localization/localization_ru_RU.ts | 2 +-
localization/localization_sq_AL.ts | 2 +-
localization/localization_sv_SE.ts | 2 +-
localization/localization_tr_TR.ts | 2 +-
localization/localization_zh_CN.ts | 2 +-
27 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/localization/localization_ar_MA.ts b/localization/localization_ar_MA.ts
index 7cf0c2836..dbb01ab69 100644
--- a/localization/localization_ar_MA.ts
+++ b/localization/localization_ar_MA.ts
@@ -846,7 +846,7 @@ Expire-Date: 0
QObject
-
+
Flips interface
RTL
diff --git a/localization/localization_ca.ts b/localization/localization_ca.ts
index 36824bdbb..7f36471c5 100644
--- a/localization/localization_ca.ts
+++ b/localization/localization_ca.ts
@@ -1078,7 +1078,7 @@ p, li { white-space: pre-wrap; }
QObject
-
+
LTR
diff --git a/localization/localization_cs_CZ.ts b/localization/localization_cs_CZ.ts
index 94abf68d0..087d27930 100644
--- a/localization/localization_cs_CZ.ts
+++ b/localization/localization_cs_CZ.ts
@@ -1030,7 +1030,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_de_DE.ts b/localization/localization_de_DE.ts
index 6ce5078b3..f3c3b2924 100644
--- a/localization/localization_de_DE.ts
+++ b/localization/localization_de_DE.ts
@@ -1023,7 +1023,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_de_LU.ts b/localization/localization_de_LU.ts
index 590ff2d1c..da25e7918 100644
--- a/localization/localization_de_LU.ts
+++ b/localization/localization_de_LU.ts
@@ -1018,7 +1018,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_el_GR.ts b/localization/localization_el_GR.ts
index e53d2ca79..8f966a29b 100644
--- a/localization/localization_el_GR.ts
+++ b/localization/localization_el_GR.ts
@@ -868,7 +868,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_en_GB.ts b/localization/localization_en_GB.ts
index ae5ce2737..5b30a757f 100644
--- a/localization/localization_en_GB.ts
+++ b/localization/localization_en_GB.ts
@@ -1075,7 +1075,7 @@ p, li { white-space: pre-wrap; }
QObject
-
+
LTR
diff --git a/localization/localization_en_US.ts b/localization/localization_en_US.ts
index efe31841a..40db768a6 100644
--- a/localization/localization_en_US.ts
+++ b/localization/localization_en_US.ts
@@ -1075,7 +1075,7 @@ p, li { white-space: pre-wrap; }
QObject
-
+
LTR
diff --git a/localization/localization_es_ES.ts b/localization/localization_es_ES.ts
index e7fefe844..053a6bab0 100644
--- a/localization/localization_es_ES.ts
+++ b/localization/localization_es_ES.ts
@@ -974,7 +974,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_fr_BE.ts b/localization/localization_fr_BE.ts
index e6c4ed445..b5175d12e 100644
--- a/localization/localization_fr_BE.ts
+++ b/localization/localization_fr_BE.ts
@@ -1038,7 +1038,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_fr_FR.ts b/localization/localization_fr_FR.ts
index b4d1f9282..9d270d868 100644
--- a/localization/localization_fr_FR.ts
+++ b/localization/localization_fr_FR.ts
@@ -1038,7 +1038,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_fr_LU.ts b/localization/localization_fr_LU.ts
index 84730ca8f..2c5c4ce78 100644
--- a/localization/localization_fr_LU.ts
+++ b/localization/localization_fr_LU.ts
@@ -1038,7 +1038,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_gl_ES.ts b/localization/localization_gl_ES.ts
index 7ec50ad58..17ffba6d6 100644
--- a/localization/localization_gl_ES.ts
+++ b/localization/localization_gl_ES.ts
@@ -993,7 +993,7 @@ p, li { white-space: pre-wrap; }
QObject
-
+
LTR
diff --git a/localization/localization_he_IL.ts b/localization/localization_he_IL.ts
index fd2754b92..43ddb1b2a 100644
--- a/localization/localization_he_IL.ts
+++ b/localization/localization_he_IL.ts
@@ -846,7 +846,7 @@ Expire-Date: 0
QObject
-
+
Flips interface
RTL
diff --git a/localization/localization_hu_HU.ts b/localization/localization_hu_HU.ts
index 6e8535957..589de351c 100644
--- a/localization/localization_hu_HU.ts
+++ b/localization/localization_hu_HU.ts
@@ -949,7 +949,7 @@ Lejárat-dátum: 0
QObject
-
+
LTR
diff --git a/localization/localization_it_IT.ts b/localization/localization_it_IT.ts
index a84017b9d..9ef8fc4a4 100644
--- a/localization/localization_it_IT.ts
+++ b/localization/localization_it_IT.ts
@@ -1089,7 +1089,7 @@ p, li { white-space: pre-wrap; }
QObject
-
+
LTR
diff --git a/localization/localization_lb_LU.ts b/localization/localization_lb_LU.ts
index 18624ddc3..d6f6bf04c 100644
--- a/localization/localization_lb_LU.ts
+++ b/localization/localization_lb_LU.ts
@@ -868,7 +868,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_nb_NO.ts b/localization/localization_nb_NO.ts
index 86e29fc62..022b85220 100644
--- a/localization/localization_nb_NO.ts
+++ b/localization/localization_nb_NO.ts
@@ -846,7 +846,7 @@ Expire-Date: 0
QObject
-
+
VTH
diff --git a/localization/localization_nl_BE.ts b/localization/localization_nl_BE.ts
index b62971afe..ba416a271 100644
--- a/localization/localization_nl_BE.ts
+++ b/localization/localization_nl_BE.ts
@@ -1089,7 +1089,7 @@ p, li { white-space: pre-wrap; }
QObject
-
+
LTR
diff --git a/localization/localization_nl_NL.ts b/localization/localization_nl_NL.ts
index 85545a357..74856e144 100644
--- a/localization/localization_nl_NL.ts
+++ b/localization/localization_nl_NL.ts
@@ -1089,7 +1089,7 @@ p, li { white-space: pre-wrap; }
QObject
-
+
LTR
diff --git a/localization/localization_pl_PL.ts b/localization/localization_pl_PL.ts
index 35d7b476b..dfc668846 100644
--- a/localization/localization_pl_PL.ts
+++ b/localization/localization_pl_PL.ts
@@ -850,7 +850,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_pt_PT.ts b/localization/localization_pt_PT.ts
index 26dc47970..4332eba96 100644
--- a/localization/localization_pt_PT.ts
+++ b/localization/localization_pt_PT.ts
@@ -1020,7 +1020,7 @@ p, li { white-space: pre-wrap; }
QObject
-
+
LTR
diff --git a/localization/localization_ru_RU.ts b/localization/localization_ru_RU.ts
index 06daadd54..3234d8786 100644
--- a/localization/localization_ru_RU.ts
+++ b/localization/localization_ru_RU.ts
@@ -1025,7 +1025,7 @@ Expire-Date: 0
QObject
-
+
LTR
diff --git a/localization/localization_sq_AL.ts b/localization/localization_sq_AL.ts
index e9865bb87..f9bdd4ca0 100644
--- a/localization/localization_sq_AL.ts
+++ b/localization/localization_sq_AL.ts
@@ -878,7 +878,7 @@ Expire-Date: 0
QObject
-
+
Kjo është për të mbajtur ndërfaqen nga e majta në të djathtë.
LTR
diff --git a/localization/localization_sv_SE.ts b/localization/localization_sv_SE.ts
index 4554256c0..261108c36 100644
--- a/localization/localization_sv_SE.ts
+++ b/localization/localization_sv_SE.ts
@@ -972,7 +972,7 @@ Expire-Date: 0
QObject
-
+
diff --git a/localization/localization_tr_TR.ts b/localization/localization_tr_TR.ts
index f19baeea3..16aaa18be 100644
--- a/localization/localization_tr_TR.ts
+++ b/localization/localization_tr_TR.ts
@@ -846,7 +846,7 @@ Expire-Date: 0
QObject
-
+
diff --git a/localization/localization_zh_CN.ts b/localization/localization_zh_CN.ts
index aaddc43c6..b03ccc195 100644
--- a/localization/localization_zh_CN.ts
+++ b/localization/localization_zh_CN.ts
@@ -1037,7 +1037,7 @@ Expire-Date: 0
QObject
-
+
LTR