aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-08-01 02:06:58 +0200
committerDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-08-01 02:08:36 +0200
commitd75db83442a01dcd003ea39a5ec61baad7d344a0 (patch)
treecc25afb55916501614ee435375094161f253b7cb
parent0a48722a1ddeccfc89f1812c44b7582358671697 (diff)
downloadRWA.Support.DesktopApp-d75db83442a01dcd003ea39a5ec61baad7d344a0.tar.gz
RWA.Support.DesktopApp-d75db83442a01dcd003ea39a5ec61baad7d344a0.tar.bz2
RWA.Support.DesktopApp-d75db83442a01dcd003ea39a5ec61baad7d344a0.zip
Change translation system to work more out of the box.
using ./update-locales.sh now removes any old/obsolete translations.
-rw-r--r--locales/bin/de_DE.qmbin11585 -> 0 bytes
-rw-r--r--locales/bin/es_ES.qmbin417 -> 0 bytes
-rw-r--r--locales/bin/main_en.qmbin310 -> 0 bytes
-rw-r--r--rwa-support-desktopapp.pro3
-rw-r--r--src/main.cpp5
-rwxr-xr-xupdate_locales.sh5
6 files changed, 7 insertions, 6 deletions
diff --git a/locales/bin/de_DE.qm b/locales/bin/de_DE.qm
deleted file mode 100644
index 23c2d18..0000000
--- a/locales/bin/de_DE.qm
+++ /dev/null
Binary files differ
diff --git a/locales/bin/es_ES.qm b/locales/bin/es_ES.qm
deleted file mode 100644
index 0bed16b..0000000
--- a/locales/bin/es_ES.qm
+++ /dev/null
Binary files differ
diff --git a/locales/bin/main_en.qm b/locales/bin/main_en.qm
deleted file mode 100644
index 8a9ba24..0000000
--- a/locales/bin/main_en.qm
+++ /dev/null
Binary files differ
diff --git a/rwa-support-desktopapp.pro b/rwa-support-desktopapp.pro
index be6011e..f9a05bf 100644
--- a/rwa-support-desktopapp.pro
+++ b/rwa-support-desktopapp.pro
@@ -41,7 +41,8 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
+DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000
+# disables all the APIs deprecated before Qt 6.0.0
SOURCES += src/main.cpp \
src/main_qmladaptor.cpp \
diff --git a/src/main.cpp b/src/main.cpp
index 9436a2b..ff5d2a8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -72,8 +72,9 @@ int main(int argc, char *argv[]) {
QQuickStyle::setStyle("Material");
QTranslator translator;
- qDebug().noquote() << QString("Locales: Loading locale: qrc:/locales/bin/%0").arg(QLocale::system().name());
- if(translator.load(":/locales/bin/" + QLocale::system().name())) {
+ qDebug().noquote() << QString("Locales: Loading locale: qrc:/locales/%0")
+ .arg(QLocale::system().name());
+ if(translator.load(":/locales/" + QLocale::system().name())) {
app.installTranslator(&translator);
qDebug().noquote() << "Locales: Loaded: " + QLocale::system().name() + " locale!";
} else {
diff --git a/update_locales.sh b/update_locales.sh
index 4884cb6..8c05ece 100755
--- a/update_locales.sh
+++ b/update_locales.sh
@@ -24,7 +24,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-lupdate . -ts locales/*.ts
+lupdate rwa-support-desktopapp.pro -no-obsolete
linguist locales/*.ts
-lrelease locales/de_DE.ts -qm locales/bin/de_DE.qm
-lrelease locales/es_ES.ts -qm locales/bin/es_ES.qm
+lrelease rwa-support-desktopapp.pro -compress -removeidentical