From a07cbc929af3b58ca1adf639da56467fb2e8f90a Mon Sep 17 00:00:00 2001 From: Yanko Kaneti Date: Fri, 1 Mar 2019 15:56:27 +0200 Subject: [PATCH] Pull an upstream fix to prevent broken translations --- ...lations-in-all-libhandy-applications.patch | 29 +++++++++++++++++++ libhandy.spec | 8 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-broken-translations-in-all-libhandy-applications.patch diff --git a/0001-Fix-broken-translations-in-all-libhandy-applications.patch b/0001-Fix-broken-translations-in-all-libhandy-applications.patch new file mode 100644 index 0000000..2073c16 --- /dev/null +++ b/0001-Fix-broken-translations-in-all-libhandy-applications.patch @@ -0,0 +1,29 @@ +From a89f1e0d060e3690591ba441fa0b322260007c14 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Tue, 26 Feb 2019 16:59:49 +0100 +Subject: [PATCH] Fix broken translations in all libhandy applications + +Translations in all the applications using libhandy would be broken +after a call to hdy_init() as it changed the default gettext translation +domain. + +See https://gitlab.gnome.org/GNOME/gnome-control-center/issues/393 +--- + src/hdy-main.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/hdy-main.c b/src/hdy-main.c +index 08ef1e3..d6e71da 100644 +--- a/src/hdy-main.c ++++ b/src/hdy-main.c +@@ -42,7 +42,6 @@ hdy_init (int *argc, char ***argv) + if (hdy_initialized) + return TRUE; + +- textdomain (GETTEXT_PACKAGE); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + g_resources_register (hdy_get_resource ()); +-- +2.21.0 + diff --git a/libhandy.spec b/libhandy.spec index fc1a0f7..1bc8fb3 100644 --- a/libhandy.spec +++ b/libhandy.spec @@ -1,12 +1,14 @@ Name: libhandy Version: 0.0.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library with GTK+ widgets for mobile phones License: LGPLv2+ URL: https://source.puri.sm/Librem5/libhandy/ Source0: https://source.puri.sm/Librem5/libhandy/-/archive/v%{version}/libhandy-v%{version}.tar.bz2 +Patch1: 0001-Fix-broken-translations-in-all-libhandy-applications.patch + BuildRequires: gcc BuildRequires: gtk-doc BuildRequires: meson @@ -57,6 +59,10 @@ developing applications that use %{name}. %{_datadir}/vala/ %changelog +* Fri Mar 1 2019 Yanko Kaneti - 0.0.8-2 +- Pull an upstream fix to prevent broken translations in + libhandy using apps + * Sat Feb 16 2019 Kalev Lember - 0.0.8-1 - Update to 0.0.8