Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SiCKRAGE
sickrage
Commits
c668cd75
Commit
c668cd75
authored
Jun 28, 2022
by
echel0n
Browse files
fixed gettext error "Cannot load translation"
parent
78bd43ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
sickrage/core/config/helpers.py
View file @
c668cd75
...
...
@@ -104,7 +104,9 @@ def legacy_decrypt(section, key, encryption_version, encryption_secret):
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
gt
=
gettext
.
translation
(
'messages'
,
sickrage
.
LOCALE_DIR
,
languages
=
[
language
],
codeset
=
'UTF-8'
)
gt
.
install
(
names
=
[
"ngettext"
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment