summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-02-22 11:46:11 +0100
committerWojtek Kosior <koszko@koszko.org>2022-02-22 11:53:51 +0100
commit0fe371dab386dc4aeb08e601a91d61469f2f5f7a (patch)
tree79440671e5a631d183393282b3e93f716c8f594c /src
parent143aed2d07ebdb1b9bd9cd7865830719006150e3 (diff)
downloadhydrilla-builder-0fe371dab386dc4aeb08e601a91d61469f2f5f7a.tar.gz
hydrilla-builder-0fe371dab386dc4aeb08e601a91d61469f2f5f7a.zip
change translation domain to 'hydrilla-messages'
Diffstat (limited to 'src')
-rw-r--r--src/hydrilla/builder/locales/en_US/LC_MESSAGES/hydrilla-messages.po (renamed from src/hydrilla/builder/locales/en_US/LC_MESSAGES/messages.po)0
-rw-r--r--src/hydrilla/util/_util.py6
2 files changed, 3 insertions, 3 deletions
diff --git a/src/hydrilla/builder/locales/en_US/LC_MESSAGES/messages.po b/src/hydrilla/builder/locales/en_US/LC_MESSAGES/hydrilla-messages.po
index 8c08413..8c08413 100644
--- a/src/hydrilla/builder/locales/en_US/LC_MESSAGES/messages.po
+++ b/src/hydrilla/builder/locales/en_US/LC_MESSAGES/hydrilla-messages.po
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