From 27152068ca0b1a96f8b8c3b5a4139e4a1eb813b6 Mon Sep 17 00:00:00 2001 From: Björn Esser Date: Aug 24 2020 20:28:36 +0000 Subject: Add a patch to load translations from Qt5 TranslationsPath --- diff --git a/AusweisApp2-1.20.1-use_Qt_TranslationsPath.patch b/AusweisApp2-1.20.1-use_Qt_TranslationsPath.patch new file mode 100644 index 0000000..9dfdc4c --- /dev/null +++ b/AusweisApp2-1.20.1-use_Qt_TranslationsPath.patch @@ -0,0 +1,21 @@ +Index: AusweisApp2-1.20.1/src/global/FileDestination.h +=================================================================== +--- AusweisApp2-1.20.1.orig/src/global/FileDestination.h ++++ AusweisApp2-1.20.1/src/global/FileDestination.h +@@ -8,6 +8,7 @@ + + #include + #include ++#include + #include + #include + +@@ -41,6 +42,8 @@ class FileDestination + QStandardPaths::StandardLocation pStandard = QStandardPaths::AppDataLocation) + { + #if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || (defined(Q_OS_BSD4) && !defined(Q_OS_MACOS) && !defined(Q_OS_IOS)) ++ if (pFilename.compare(QStringLiteral("translations")) == 0) ++ return QLibraryInfo::location(QLibraryInfo::TranslationsPath); + const auto match = QStandardPaths::locate(pStandard, pFilename, pOption); + if (!match.isNull()) + { diff --git a/AusweisApp2.spec b/AusweisApp2.spec index 832bc89..aa05635 100644 --- a/AusweisApp2.spec +++ b/AusweisApp2.spec @@ -24,7 +24,7 @@ fipshmac -d "$fipsdir" "$bindir/%{name}" \ Name: AusweisApp2 Version: 1.20.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: %{pkg_sum} # Init forge packaging helpers. @@ -40,6 +40,9 @@ Source0000: %{forgesource} Patch00001: %{forgeurl}/pull/27.patch#/%{name}-1.20.1-add_english_license_text.patch Patch00002: %{forgeurl}/pull/28.patch#/%{name}-1.20.1-doxygen_exclude_build_dir.patch +# Downstream. +Patch01000: %{name}-1.20.1-use_Qt_TranslationsPath.patch + BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: fipscheck @@ -224,6 +227,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %changelog +* Mon Aug 24 2020 Björn Esser - 1.20.1-3 +- Add a patch to load translations from Qt5 TranslationsPath + * Fri Aug 21 2020 Björn Esser - 1.20.1-2 - Add a patch to exclude the build directory in the Doxyfile - Merge doc-api package with the doc package, since the Doxygen