tails-documentation broken for locales not translated in the Greeter
See e.g.:
$ LANG=fa_IR.utf-8 tails-documentation
Traceback (most recent call last):
File "/usr/local/bin/tails-documentation", line 102, in <module>
helpwindow = DocumentationWindow(uri)
File "/usr/lib/python3/dist-packages/tailsgreeter/gui.py", line 1112, in __init__
TranslatableWindow.__init__(self, self)
File "/usr/lib/python3/dist-packages/tailsgreeter/language.py", line 110, in __init__
tailsgreeter.config.locales_path) # NOQA: E128
File "/usr/lib/python3.5/gettext.py", line 524, in translation
raise OSError(ENOENT, 'No translation file found for domain', domain)
FileNotFoundError: [Errno 2] No translation file found for domain: 'tails-greeter'
(Note that we don’t have any translations for the Greeter for fa*
.)
The failing code is:
self.translation = gettext.translation(tailsgreeter.__appname__,
tailsgreeter.config.locales_path) # NOQA: E128
The fix is to add fallback=True
.
Related issues
- Blocks #13245 (closed)
Original created by @anonym on 15160 (Redmine)