Allow starting subiquity/console-conf without translations.

Set fallback=True on gettext.translation() call such that it returns
NullTranslation object. This means subiquity/console-conf can start,
even if .mo files are not build in the tree, or are outright missing.
This commit is contained in:
Dimitri John Ledkov 2019-08-07 12:40:08 +01:00
parent 3c1f8e1d27
commit be50b59dcd
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ def switch_language(code='en_US'):
return message
elif code:
translation = gettext.translation('subiquity', localedir=localedir,
languages=[code])
languages=[code], fallback=True)
def my_gettext(message):
if not message: