Catch error if locale's file not installed
parent
faf50ea9ab
commit
65a1e9296e
|
@ -120,8 +120,11 @@ class ManjaroHello():
|
||||||
:param locale: locale to use
|
:param locale: locale to use
|
||||||
:type locale: str
|
:type locale: str
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
tr = gettext.translation(self.app, self.locale_path, [locale])
|
tr = gettext.translation(self.app, self.locale_path, [locale])
|
||||||
tr.install()
|
tr.install()
|
||||||
|
except OSError:
|
||||||
|
print("WARNING: No translation file for '{}' locale".format(locale))
|
||||||
|
|
||||||
# Dirty code to fix an issue with gettext that can't translate strings from glade files
|
# Dirty code to fix an issue with gettext that can't translate strings from glade files
|
||||||
# Redfining all translatables strings
|
# Redfining all translatables strings
|
||||||
|
|
Loading…
Reference in New Issue