~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/i18n.py

  • Committer: Vincent Ladeuil
  • Date: 2012-03-09 16:48:55 UTC
  • mto: (6437.23.24 2.5)
  • mto: This revision was merged to the branch mainline in revision 6499.
  • Revision ID: v.ladeuil+lp@free.fr-20120309164855-htdn25hp7x65mmir
Rely on sphinx for texinfo doc generation

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
 
137
137
    :param base: plugins can specify their own local directory
138
138
    """
139
 
    fs_enc = sys.getfilesystemencoding()
140
 
    if getattr(sys, 'frozen', False):
 
139
    if hasattr(sys, 'frozen'):
141
140
        if base is None:
142
 
            base = os.path.dirname(unicode(sys.executable, fs_enc))
 
141
            base = os.path.dirname(
 
142
                unicode(sys.executable, sys.getfilesystemencoding()))
143
143
        return os.path.join(base, u'locale')
144
144
    else:
145
145
        if base is None:
146
 
            base = os.path.dirname(unicode(__file__, fs_enc))
 
146
            base = os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
147
147
        dirpath = os.path.realpath(os.path.join(base, u'locale'))
148
148
        if os.path.exists(dirpath):
149
149
            return dirpath
150
 
    return os.path.join(unicode(sys.prefix, fs_enc), u"share", u"locale")
 
150
        else:
 
151
            return '/usr/share/locale'
151
152
 
152
153
 
153
154
def _check_win32_locale():