From b42ba6639cbfc05c06dcb4a24cde4c4413b8cc1d Mon Sep 17 00:00:00 2001 From: TASAKA Mamoru Date: Jun 06 2012 01:21:08 +0000 Subject: Fix the direction of gettext catalog path wrt F-17 usrmove --- diff --git a/mcomix-0.94-gettext-system-install.patch b/mcomix-0.94-gettext-system-install.patch deleted file mode 100644 index e12721a..0000000 --- a/mcomix-0.94-gettext-system-install.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- mcomix-0.94/mcomix/i18n.py.debug 2011-09-22 19:53:56.000000000 +0900 -+++ mcomix-0.94/mcomix/i18n.py 2011-10-10 04:00:39.000000000 +0900 -@@ -84,6 +84,14 @@ - translation = gettext.GNUTranslations( - pkg_resources.resource_stream('mcomix.messages', resource)) - break -+ else: -+ exec_path = os.path.abspath(sys.argv[0]) -+ base_dir = os.path.dirname(os.path.dirname(exec_path)) -+ locale_dir = os.path.join (base_dir, 'share', 'locale') -+ if gettext.find(domain=domain, localedir=locale_dir, languages=[lang]): -+ translation = gettext.translation(domain=domain, localedir=locale_dir, -+ languages=[lang], fallback=False) -+ break - - translation.install(unicode=True) - diff --git a/mcomix-0.98-gettext-system-install.patch b/mcomix-0.98-gettext-system-install.patch new file mode 100644 index 0000000..f01d92d --- /dev/null +++ b/mcomix-0.98-gettext-system-install.patch @@ -0,0 +1,17 @@ +--- mcomix-0.98/mcomix/i18n.py.debug 2011-09-22 19:53:56.000000000 +0900 ++++ mcomix-0.98/mcomix/i18n.py 2012-06-06 10:00:00.000000000 +0900 +@@ -84,6 +84,14 @@ + translation = gettext.GNUTranslations( + pkg_resources.resource_stream('mcomix.messages', resource)) + break ++ else: ++ root_path = os.path.normpath('/') ++ base_dir = os.path.join(root_path, 'usr') ++ locale_dir = os.path.join (base_dir, 'share', 'locale') ++ if gettext.find(domain=domain, localedir=locale_dir, languages=[lang]): ++ translation = gettext.translation(domain=domain, localedir=locale_dir, ++ languages=[lang], fallback=False) ++ break + + translation.install(unicode=True) + diff --git a/mcomix.spec b/mcomix.spec index 7591171..9d00b77 100644 --- a/mcomix.spec +++ b/mcomix.spec @@ -1,6 +1,6 @@ Name: mcomix Version: 0.98 -Release: 1%{?dist} +Release: 2%{?dist} Summary: User-friendly, customizable image viewer for comic books Group: Amusements/Graphics @@ -12,7 +12,7 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 # is needed Patch0: mcomix-0.92-fedora-rpmbuild-gtk.patch # Fedora specific(?): patch to search default localedir for gettext files -Patch1: mcomix-0.94-gettext-system-install.patch +Patch1: mcomix-0.98-gettext-system-install.patch BuildArch: noarch BuildRequires: gettext @@ -158,6 +158,9 @@ exit 0 %changelog +* Wed Jun 6 2012 Mamoru Tasaka - 0.98-2 +- Fix the direction of gettext catalog path wrt F-17 usrmove + * Fri Apr 13 2012 Mamoru Tasaka - 0.98-1 - 0.98