mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-02 20:04:43 +00:00
Use locale encoding as default, even if the language is not supported
This commit is contained in:
parent
c1b0035ee5
commit
92e1f90117
1 changed files with 3 additions and 2 deletions
|
|
@ -70,10 +70,11 @@ def init (domain, directory):
|
|||
loc, encoding = get_locale()
|
||||
if loc in supported_languages:
|
||||
default_language = loc
|
||||
default_encoding = encoding
|
||||
else:
|
||||
default_language = "en"
|
||||
default_encoding = "ascii"
|
||||
# Even if the default language is not supported, the encoding should
|
||||
# be installed. Otherwise the Python installation is borked.
|
||||
default_encoding = encoding
|
||||
# install translation service routines into default namespace
|
||||
translator = get_translator(domain, directory,
|
||||
languages=[default_language], fallback=True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue