aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--MANIFEST.in2
-rw-r--r--setup.cfg14
-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
5 files changed, 13 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index 1bfce59..6a43e6a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,5 +10,5 @@ dist
*.pyc
setuptools
src/hydrilla/builder/_version.py
-src/hydrilla/builder/locales/messages.pot
-messages.mo \ No newline at end of file
+src/hydrilla/builder/locales/hydrilla-messages.pot
+hydrilla-messages.mo
diff --git a/MANIFEST.in b/MANIFEST.in
index 3a51409..abc39da 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -5,6 +5,6 @@
# Available under the terms of Creative Commons Zero v1.0 Universal.
include src/hydrilla/schemas/*.schema.json*
-include src/hydrilla/builder/locales/*/LC_MESSAGES/messages.po
+include src/hydrilla/builder/locales/*/LC_MESSAGES/hydrilla-messages.po
include src/test/source-package-example/*
global-exclude .git .gitignore .gitmodules
diff --git a/setup.cfg b/setup.cfg
index 5ab23af..9d9660a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -40,7 +40,7 @@ install_requires =
# reuse
[options.package_data]
-hydrilla.builder = locales/*/LC_MESSAGES/messages.mo
+hydrilla.builder = locales/*/LC_MESSAGES/hydrilla-messages.mo
[options.extras_require]
test = pytest
@@ -59,22 +59,22 @@ console_scripts =
keywords = _
width = 80
input_dirs = src/hydrilla
-output_file = src/hydrilla/builder/locales/messages.pot
+output_file = src/hydrilla/builder/locales/hydrilla-messages.pot
msgid_bugs_address = koszko@koszko.org
sort_by_file = True
copyright_holder = Wojtek Kosior <koszko@koszko.org>
[init_catalog]
-input_file = src/hydrilla/builder/locales/messages.pot
+input_file = src/hydrilla/builder/locales/hydrilla-messages.pot
output_dir = src/hydrilla/builder/locales/
-domain = messages
+domain = hydrilla-messages
[update_catalog]
-input_file = src/hydrilla/builder/locales/messages.pot
+input_file = src/hydrilla/builder/locales/hydrilla-messages.pot
output_dir = src/hydrilla/builder/locales/
-domain = messages
+domain = hydrilla-messages
[compile_catalog]
directory = src/hydrilla/builder/locales
use_fuzzy = True
-domain = messages
+domain = hydrilla-messages
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