-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 tag 627833 +patch thanks
Hi, As Version 3.4.6 of Gramps may not be packaged for Debian for some time, I have created a patch for v3.4.0 from the latest upstream that forces a UTF-8 locale to be used if available. It is done as an NMU, and requires a sponsor to upload it. Regards, Ross -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQIcBAEBAgAGBQJSJOV+AAoJEFP+e72miRD8iHYP/RjS06pfW3pzE28pWenzDi0G zdqcmASS83WLzmU5cy5t9pLvzMK88xH9J3Lw8KI1trHcYvdRqbu/alnOW8zPDoTD gI6NV4m6b98XB4DfIYvaVKfs2gDQees7btF6OIAi0tJNhDnQVqTBwIuSc4c8o3Ju dQHt1aX3JbPmui3nATKYXE4nPMmr2AW37pO8oyP+zez1+PsqqS8ACnUzPh6+UomD C/Q3nprfFIkpgpk1lqykoBzL4qJEKnFfETYU7zuX4PSnMJNN+oIWcmGaULESPAtv QB2VqydyuM+RyXDEEcWv8Cba4r6pBnTTVmPC4wn+P6YEcBm9hG5a4sawUZ+BYTt/ ufGimMilxrMpZkQoXND4eAFGxd1ezVSn7hiI5MoPloMzgBdOhs9z5RqE3POTo+ek 35WZYYhIxs2Fk7GaT4MEVhh4kqu61B7ydxChAvfoP5s8dUJ+oNr4MrAw5jWOYcwz 1IrONmp9hqwlTvkeqy+flB/i21In8PqK8mX0tZVwnPtX+olFE2amku4ZzQh+SjDa J8+XFSVFYVuuInV9LDddQHrIGmQJa8gG9K8g27DRJ6G5IVY+6YhavmsmnKLX2RQN MmIPON/Pvhsus0ABpZ97qsLpiLWpiB7wfEYWHlU3PZvS7ewRZZM+IpF8c4pTPypN KEtOh9g0Mw2jINX6DBHh =RvJd -----END PGP SIGNATURE-----
diff -Nru gramps-3.4.0/debian/changelog gramps-3.4.0/debian/changelog --- gramps-3.4.0/debian/changelog 2012-05-22 23:32:31.000000000 +0200 +++ gramps-3.4.0/debian/changelog 2013-08-23 20:51:49.000000000 +0200 @@ -1,3 +1,10 @@ +gramps (3.4.0-1.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Fix crash when locale not UTF-8. Closes: #627833 + + -- Ross Gammon <rossgam...@mail.dk> Fri, 23 Aug 2013 20:50:53 +0200 + gramps (3.4.0-1) unstable; urgency=low * New upstream version diff -Nru gramps-3.4.0/debian/patches/fix-gramps.patch gramps-3.4.0/debian/patches/fix-gramps.patch --- gramps-3.4.0/debian/patches/fix-gramps.patch 1970-01-01 01:00:00.000000000 +0100 +++ gramps-3.4.0/debian/patches/fix-gramps.patch 2013-08-23 21:03:32.000000000 +0200 @@ -0,0 +1,80 @@ +Index: gramps-3.4.0/src/TransUtils.py +=================================================================== +--- gramps-3.4.0.orig/src/TransUtils.py 2012-05-22 09:58:35.000000000 +0200 ++++ gramps-3.4.0/src/TransUtils.py 2013-08-17 22:15:12.415508384 +0200 +@@ -19,7 +19,7 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # + +-# $Id: TransUtils.py 18597 2011-12-14 19:00:39Z paul-franklin $ ++# $Id: TransUtils.py 22878 2013-08-19 21:23:17Z jralls $ + + """ + Provide translation assistance +@@ -34,6 +34,7 @@ + import sys + import os + import locale ++import logging + + #------------------------------------------------------------------------- + # +@@ -48,7 +49,10 @@ + # + #------------------------------------------------------------------------- + if "GRAMPSI18N" in os.environ: +- LOCALEDIR = os.environ["GRAMPSI18N"] ++ if os.path.exists(os.environ["GRAMPSI18N"]): ++ LOCALEDIR = os.environ["GRAMPSI18N"] ++ else: ++ LOCALEDIR = None + elif os.path.exists( os.path.join(const.ROOT_DIR, "lang") ): + LOCALEDIR = os.path.join(const.ROOT_DIR, "lang") + elif os.path.exists(os.path.join(const.PREFIXDIR, "share/locale")): +@@ -58,8 +62,9 @@ + if lang and lang[:2] == 'en': + pass # No need to display warning, we're in English + else: +- print 'Locale dir does not exist at ' + os.path.join(const.PREFIXDIR, "share/locale") +- print 'Running ./configure --prefix=YourPrefixDir might fix the problem' ++ logging.warning('Locale dir does not exist at ' + ++ os.path.join(const.PREFIXDIR, "share/locale")) ++ logging.warning('Running ./configure --prefix=YourPrefixDir might fix the problem') + LOCALEDIR = None + + LOCALEDOMAIN = 'gramps' +@@ -77,9 +82,13 @@ + try: + lang = locale.getdefaultlocale()[0] + '.UTF-8' + except TypeError: +- print 'Unable to determine your Locale, using English' ++ logging.warning('Unable to determine your Locale, using English') + lang = 'en.UTF-8' + ++ _lang_ = lang.replace('@', '.').split('.') ++ if not (len(_lang_) == 2 and _lang_[1] == 'UTF-8'): ++ lang = _lang_[0] + '.UTF-8' ++ + os.environ["LANG"] = lang + os.environ["LANGUAGE"] = lang + +@@ -100,7 +109,7 @@ + try: + locale.bindtextdomain(LOCALEDOMAIN, LOCALEDIR) + except ValueError: +- print 'Failed to bind text domain, gtk.Builder() has no translation' ++ logging.warning('Failed to bind text domain, gtk.Builder() has no translation') + + #following installs _ as a python function, we avoid this as TransUtils is + #used sometimes: +@@ -217,8 +226,8 @@ + return + + # No complete/working translation found +- print "Translation might not be complete/not working for",\ +- locale.getlocale()[0] ++ logging.warning("Translation might not be complete, " ++ "not working for your locale") + + + def get_localedomain(): diff -Nru gramps-3.4.0/debian/patches/series gramps-3.4.0/debian/patches/series --- gramps-3.4.0/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ gramps-3.4.0/debian/patches/series 2013-08-23 20:55:26.000000000 +0200 @@ -0,0 +1 @@ +fix-gramps.patch