diff options
Diffstat (limited to 'src/hydrilla/util')
-rw-r--r-- | src/hydrilla/util/_util.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hydrilla/util/_util.py b/src/hydrilla/util/_util.py index 62843f4..46baa0e 100644 --- a/src/hydrilla/util/_util.py +++ b/src/hydrilla/util/_util.py @@ -136,8 +136,8 @@ def validator_for(schema_filename: str) -> Draft7Validator: def translation(localedir: Union[Path, str], lang: Optional[str]=None) \ -> gettext.GNUTranslations: """ - Configure translations for domain 'messages' and return the object that - represents them. + Configure translations for domain 'hydrilla-messages' and return the object + that represents them. If `lang` is set, look for translations for `lang`. Otherwise, try to determine system's default language and use that. @@ -151,7 +151,7 @@ def translation(localedir: Union[Path, str], lang: Optional[str]=None) \ except: lang = locale.getdefaultlocale()[0] or 'C' - return gettext.translation('messages', localedir=localedir, + return gettext.translation('hydrilla-messages', localedir=localedir, languages=[lang, 'en_US']) _ = translation(here.parent / 'builder' / 'locales').gettext |