From 0fe371dab386dc4aeb08e601a91d61469f2f5f7a Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 22 Feb 2022 11:46:11 +0100 Subject: change translation domain to 'hydrilla-messages' --- src/hydrilla/util/_util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/hydrilla/util/_util.py') 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 -- cgit v1.2.3