diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-02-22 11:46:11 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-02-22 11:53:51 +0100 |
commit | 0fe371dab386dc4aeb08e601a91d61469f2f5f7a (patch) | |
tree | 79440671e5a631d183393282b3e93f716c8f594c /src/hydrilla/util/_util.py | |
parent | 143aed2d07ebdb1b9bd9cd7865830719006150e3 (diff) | |
download | hydrilla-builder-0fe371dab386dc4aeb08e601a91d61469f2f5f7a.tar.gz hydrilla-builder-0fe371dab386dc4aeb08e601a91d61469f2f5f7a.zip |
change translation domain to 'hydrilla-messages'
Diffstat (limited to 'src/hydrilla/util/_util.py')
-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 |