File python-bundle-lang.patch of Package python (Revision 3bda1ccaa1dd671047c148f3d211138f)
Currently displaying revision 3bda1ccaa1dd671047c148f3d211138f , Show latest
xxxxxxxxxx
1
Index: Python-2.7.13/Lib/gettext.py
2
===================================================================
3
--- Python-2.7.13.orig/Lib/gettext.py
4
+++ Python-2.7.13/Lib/gettext.py
5
6
]
7
8
_default_localedir = os.path.join(sys.prefix, 'share', 'locale')
9
+_default_bundlelocaledir = os.path.join(sys.prefix, 'share', 'locale-bundle')
10
11
# Expression parsing for plural form selection.
12
#
13
14
15
# Locate a .mo file using the gettext strategy
16
def find(domain, localedir=None, languages=None, all=0):
17
+ if localedir in [None, _default_localedir]:
18
+ bundle = find(domain, localedir=_default_bundlelocaledir, languages=languages, all=all)
19
+ if bundle:
20
+ return bundle
21
# Get some reasonable defaults for arguments that were not supplied
22
if localedir is None:
23
localedir = _default_localedir
24