index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/translation.py | 7 |
diff --git a/archinstall/lib/translation.py b/archinstall/lib/translation.py index 16556fbe..b8a27fed 100644 --- a/archinstall/lib/translation.py +++ b/archinstall/lib/translation.py @@ -6,7 +6,7 @@ import gettext from pathlib import Path from typing import List, Dict - +from .exceptions import TranslationError class Languages: def __init__(self): @@ -60,7 +60,10 @@ class Translation: self._languages = {} for name in self.get_all_names(): - self._languages[name] = gettext.translation('base', localedir=locales_dir, languages=[name]) + try: + self._languages[name] = gettext.translation('base', localedir=locales_dir, languages=[name]) + except FileNotFoundError as error: + raise TranslationError(f"Could not locate language file for '{name}': {error}") def activate(self, name): if language := self._languages.get(name, None): |