## langpack-gettext.dpatch by # # DP: Description: support alternative gettext tree in # DP: /usr/share/locale-langpack; if a file is present in both trees, # DP: prefer the newer one # DP: Upstream status: Ubuntu-Specific Index: python2.6-2.6.5+20100521/Lib/gettext.py =================================================================== --- python2.6-2.6.5+20100521.orig/Lib/gettext.py 2010-05-21 16:27:13.035710969 +0200 +++ python2.6-2.6.5+20100521/Lib/gettext.py 2010-05-21 16:27:22.703714500 +0200 @@ -446,11 +446,26 @@ if lang == 'C': break mofile = os.path.join(localedir, lang, 'LC_MESSAGES', '%s.mo' % domain) + mofile_lp = os.path.join("/usr/share/locale-langpack", lang, + 'LC_MESSAGES', '%s.mo' % domain) + + # first look into the standard locale dir, then into the + # langpack locale dir + + # standard mo file if os.path.exists(mofile): if all: result.append(mofile) else: return mofile + + # langpack mofile -> use it + if os.path.exists(mofile_lp): + if all: + result.append(mofile_lp) + else: + return mofile_lp + return result