void-packages/srcpkgs/chessx/patches/0002-extract-translations-into-separate-resource-file.patch
2021-02-09 21:54:31 -03:00

50 lines
1.5 KiB
Diff

From 346a9dd4e8d913c846b2cfcb48290eb065ee149c Mon Sep 17 00:00:00 2001
From: Eugene Rysaj <eugene.rysaj@gmail.com>
Date: Fri, 15 May 2020 13:38:49 +0300
Subject: [PATCH] Extract translations into separate resource file
This makes easier enabling/disabling localizations.
---
chessx.pro | 2 +-
resources.qrc | 1 -
translations.qrc | 6 ++++++
3 files changed, 7 insertions(+), 2 deletions(-)
create mode 100644 translations.qrc
diff --git a/chessx.pro b/chessx.pro
index 8e1364e1..22fc0163 100644
--- chessx.pro
+++ chessx.pro
@@ -481,7 +481,7 @@ lc0 {
}
RESOURCES = \
- resources.qrc
+ resources.qrc translations.qrc
TRANSLATIONS = i18n/chessx_de.ts
diff --git a/resources.qrc b/resources.qrc
index 770f9934..172405eb 100644
--- resources.qrc
+++ resources.qrc
@@ -12,7 +12,6 @@
<file alias="help/about4.html">data/help/about4.html</file>
<file alias="help/about5.html">data/help/about5.html</file>
<file alias="help/about6.html">data/help/about6.html</file>
- <file alias="i18n/chessx_de.qm">i18n/chessx_de.qm</file>
<file alias="images/accept.png">data/images/accept.png</file>
<file alias="images/annotate.png">data/images/annotate.png</file>
<file alias="images/arrow_green.png">data/images/arrow_green.png</file>
diff --git a/translations.qrc b/translations.qrc
new file mode 100644
index 00000000..d0428c8b
--- /dev/null
+++ translations.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/">
+ <file alias="i18n/chessx_de.qm">i18n/chessx_de.qm</file>
+ </qresource>
+</RCC>
+