diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-09-29 13:40:02 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-09-29 13:40:02 +0300 |
commit | 424a50000a78fff715de4417dba9b4498aeeee4c (patch) | |
tree | d27f003c7d140fef24efd1b2ca1325ae099154b9 /debian/patches/langpack-gettext.diff | |
download | python3.5-debian.tar.gz |
Imported python3.5 3.5.4-4debian/3.5.4-4debian
Diffstat (limited to 'debian/patches/langpack-gettext.diff')
-rw-r--r-- | debian/patches/langpack-gettext.diff | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/patches/langpack-gettext.diff b/debian/patches/langpack-gettext.diff new file mode 100644 index 0000000..56deb77 --- /dev/null +++ b/debian/patches/langpack-gettext.diff @@ -0,0 +1,36 @@ +# 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: b/Lib/gettext.py +=================================================================== +--- a/Lib/gettext.py ++++ b/Lib/gettext.py +@@ -491,11 +491,26 @@ def find(domain, localedir=None, languag + 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 + + |