Commit c668cd75 authored by echel0n's avatar echel0n
Browse files

fixed gettext error "Cannot load translation"

parent 78bd43ee
...@@ -104,7 +104,9 @@ def legacy_decrypt(section, key, encryption_version, encryption_secret): ...@@ -104,7 +104,9 @@ def legacy_decrypt(section, key, encryption_version, encryption_secret):
def change_gui_lang(language): def change_gui_lang(language):
if language: mo_file = os.path.join(sickrage.LOCALE_DIR, language, "LC_MESSAGES", "messages.mo")
if language and os.path.exists(mo_file):
# Selected language # Selected language
gt = gettext.translation('messages', sickrage.LOCALE_DIR, languages=[language], codeset='UTF-8') gt = gettext.translation('messages', sickrage.LOCALE_DIR, languages=[language], codeset='UTF-8')
gt.install(names=["ngettext"]) gt.install(names=["ngettext"])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment