diff --git a/.gitignore b/.gitignore index 7686dec..b24981b 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ system-config-language-1.3.4.tar.bz2 /system-config-language-2.4.1.tar.xz /system-config-language-2.4.2.tar.xz /system-config-language-3.0.0.tar.xz +/system-config-language-3.2.0.tar.xz diff --git a/0001-fix-to-run-with-translations-in-Python-3.patch b/0001-fix-to-run-with-translations-in-Python-3.patch deleted file mode 100644 index 72de4a1..0000000 --- a/0001-fix-to-run-with-translations-in-Python-3.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 960089e713b8f9e3fa49c73190f2dc113a7ec1b9 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Tue, 18 Aug 2015 12:39:41 -0700 -Subject: [PATCH] fix to run with translations in Python 3 - -Defining '_' as 'gettext.gettext' was causing the app to hang -when run under Python 3 any time a translation was encountered, -due to a type problem (bytes vs. str). In all files, change the -_ definition to one Anaconda uses: I tested this works with -both Python 2 and Python 3. ---- - src/install_packages3.py | 2 +- - src/language_backend.py | 4 +--- - src/language_gui.py | 2 +- - src/language_tui.py | 2 +- - src/system-config-language.py | 2 +- - 5 files changed, 5 insertions(+), 7 deletions(-) - -diff --git a/src/install_packages3.py b/src/install_packages3.py -index 65ff093..0d2a2f1 100644 ---- a/src/install_packages3.py -+++ b/src/install_packages3.py -@@ -27,7 +27,7 @@ import os - from gi.repository import Gio, GLib - - import gettext --_ = lambda x: gettext.ldgettext("system-config-language", x) -+_ = lambda x: gettext.translation("system-config-language", fallback=True).gettext(x) if x != "" else "" - N_ = lambda x: x - - -diff --git a/src/language_backend.py b/src/language_backend.py -index 87fd44e..e45ae27 100644 ---- a/src/language_backend.py -+++ b/src/language_backend.py -@@ -24,9 +24,7 @@ import string - import os - - import gettext --gettext.bindtextdomain("system-config-language", "/usr/share/locale") --gettext.textdomain("system-config-language") --_ = gettext.gettext -+_ = lambda x: gettext.translation("system-config-language", fallback=True).gettext(x) if x != "" else "" - - class LanguageBackend(object): - def __init__(self): -diff --git a/src/language_gui.py b/src/language_gui.py -index 7f7b34d..21c0a2c 100644 ---- a/src/language_gui.py -+++ b/src/language_gui.py -@@ -27,7 +27,7 @@ import install_packages3 - import string - - import gettext --_ = lambda x: gettext.ldgettext("system-config-language", x) -+_ = lambda x: gettext.translation("system-config-language", fallback=True).gettext(x) if x != "" else "" - N_ = lambda x: x - - class ChildWindow(Gtk.ApplicationWindow): -diff --git a/src/language_tui.py b/src/language_tui.py -index e0a83cf..5275cfd 100644 ---- a/src/language_tui.py -+++ b/src/language_tui.py -@@ -27,7 +27,7 @@ import gettext - import string - - locale.setlocale(locale.LC_ALL, "") --_ = lambda x: gettext.ldgettext("system-config-language", x) -+_ = lambda x: gettext.translation("system-config-language", fallback=True).gettext(x) if x != "" else "" - N_ = lambda x: x - gettext.bind_textdomain_codeset("system-config-language", - locale.nl_langinfo(locale.CODESET)) -diff --git a/src/system-config-language.py b/src/system-config-language.py -index b116474..6259f23 100755 ---- a/src/system-config-language.py -+++ b/src/system-config-language.py -@@ -26,7 +26,7 @@ import getopt - import os - - import gettext --_ = lambda x: gettext.ldgettext("system-config-language", x) -+_ = lambda x: gettext.translation("system-config-language", fallback=True).gettext(x) if x != "" else "" - N_ = lambda x: x - - class SystemConfigLanguage(object): --- -2.5.0 - diff --git a/sources b/sources index 1053913..0633962 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -14f10a71f78c0ccd8830d4c727f70aa3 system-config-language-3.0.0.tar.xz +751cab54f60984e8ff0e4015014a3781 system-config-language-3.2.0.tar.xz diff --git a/system-config-language.spec b/system-config-language.spec index 618d0c1..4f22d3f 100644 --- a/system-config-language.spec +++ b/system-config-language.spec @@ -1,11 +1,9 @@ Summary: A graphical interface for modifying the system language Name: system-config-language -Version: 3.0.0 -Release: 4%{?dist} +Version: 3.2.0 +Release: 1%{?dist} URL: https://fedorahosted.org/system-config-language/ Source0: https://fedorahosted.org/releases/s/y/system-config-language/%{name}-%{version}.tar.xz -# Fix app to run under Python 3 with translations: RHBZ #1254775 -Patch0: 0001-fix-to-run-with-translations-in-Python-3.patch License: GPLv2+ BuildArch: noarch @@ -31,10 +29,6 @@ allows the user to change the default language of the system. %prep %setup -q -%patch0 -p1 -b .py3-trans -sed -i "23 i gi.require_version('Gtk', '3.0')" src/language_gui.py -sed -i "23 i import gi" src/language_gui.py - find . -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' %build @@ -78,6 +72,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/polkit-1/actions/org.fedoraproject.config.language.policy %changelog +* Thu Aug 20 2015 Parag Nemade - 3.2.0-1 +- Update to 3.2.0 release + +* Wed Aug 19 2015 Parag Nemade - 3.1.0-1 +- Update to 3.1.0 release + * Tue Aug 18 2015 Adam Williamson - 3.0.0-4 - fix running under Python 3 with translations (RHBZ #1254775) - fix package dependencies: add python3-dnf, drop pygtk2 and gtk3