/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/i18n.py

  • Committer: Jelmer Vernooij
  • Date: 2020-02-07 02:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 7492.
  • Revision ID: jelmer@jelmer.uk-20200207021430-m49iq3x4x8xlib6x
Drop python2 support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
 
142
142
    :param base: plugins can specify their own local directory
143
143
    """
144
 
    if sys.version_info > (3,):
145
 
        decode_path = str
146
 
    else:
147
 
        fs_enc = sys.getfilesystemencoding()
148
 
 
149
 
        def decode_path(path):
150
 
            return path.decode(fs_enc)
151
144
    if getattr(sys, 'frozen', False):
152
145
        if base is None:
153
 
            base = os.path.dirname(decode_path(sys.executable))
 
146
            base = os.path.dirname(sys.executable)
154
147
        return os.path.join(base, u'locale')
155
148
    else:
156
149
        if base is None:
157
 
            base = os.path.dirname(decode_path(__file__))
 
150
            base = os.path.dirname(__file__)
158
151
        dirpath = os.path.realpath(os.path.join(base, u'locale'))
159
152
        if os.path.exists(dirpath):
160
153
            return dirpath
161
 
    return os.path.join(decode_path(sys.prefix), u"share", u"locale")
 
154
    return os.path.join(sys.prefix, u"share", u"locale")
162
155
 
163
156
 
164
157
def _check_win32_locale():