|
67 | 67 | # os.prefix should be /usr, /usr/local or root of virtualenv
|
68 | 68 | # strip leading / to make os.path.join work right.
|
69 | 69 | path = __file__
|
70 |
| -for _N in 1, 2: |
| 70 | + |
| 71 | +for _N in 1, 2: # remove roundup/i18n.py from path |
71 | 72 | path = os.path.dirname(path)
|
72 | 73 | # path is /usr/local/lib/python3.10/site-packages
|
| 74 | + |
73 | 75 | _ldir = os.path.join(path, sys.prefix[root_prefix_chars:], 'share', 'locale')
|
74 | 76 | if os.path.isdir(_ldir):
|
75 | 77 | LOCALE_DIRS.append(_ldir)
|
| 78 | + |
76 | 79 | # try other places locale files are hidden on install
|
77 | 80 | _ldir = os.path.join(path, sys.prefix[root_prefix_chars:], 'local', 'share', 'locale')
|
78 | 81 | if os.path.isdir(_ldir):
|
79 | 82 | LOCALE_DIRS.append(_ldir)
|
| 83 | + |
80 | 84 | try:
|
81 | 85 | _ldir = os.path.join(path, sys.base_prefix[root_prefix_chars:], 'local', 'share', 'locale')
|
82 | 86 | if os.path.isdir(_ldir):
|
83 | 87 | LOCALE_DIRS.append(_ldir)
|
84 | 88 | _ldir = os.path.join(path, sys.base_prefix[root_prefix_chars:], 'share', 'locale')
|
85 | 89 | if os.path.isdir(_ldir):
|
86 | 90 | LOCALE_DIRS.append(_ldir)
|
| 91 | + |
| 92 | + # make -C locale local_install - locale directory in roundup source tree |
| 93 | + _ldir = os.path.join(path, 'locale', 'locale') |
| 94 | + if os.path.isdir(_ldir): |
| 95 | + LOCALE_DIRS.append(_ldir) |
87 | 96 | except AttributeError:
|
88 | 97 | pass # no base_prefix on 2.7
|
89 | 98 | del _ldir
|
|
0 commit comments