summaryrefslogtreecommitdiff
path: root/src/zope/i18n/zcml.py
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2017-12-16 07:40:29 -0600
committerJason Madden <jamadden@gmail.com>2017-12-16 07:40:29 -0600
commit89927bff938e8d11cd7c8acd705e8ebef43b6b1c (patch)
tree8373c827aa50a555ab210d183ee10f80f0884db8 /src/zope/i18n/zcml.py
parente924eea24f6d9b635a4b3370d90bb1ce7869b944 (diff)
downloadzope-i18n-89927bff938e8d11cd7c8acd705e8ebef43b6b1c.tar.gz
Remove _compat module and _u function in favor of native unicode literals and project gardeningdrop-33
- DRY with dependencies - Enable coveralls.io and add a coverage tox environment - A few tiny changes to increase coverage, but we're not at 100% - Enable testing sphinx docs for all versions - Publish CHANGES.rst on RTD - Modern tox.ini and .travis.yml - Travis was still testing 3.3 and not testing 3.6. - Remove 'level' qualifiers from XML parsing and ZCML test cases. They add about 2s to run the tests, but they're important; see #13. That extra time gets lost in the amount of time it takes to spin tox anyway.
Diffstat (limited to 'src/zope/i18n/zcml.py')
-rw-r--r--src/zope/i18n/zcml.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/zope/i18n/zcml.py b/src/zope/i18n/zcml.py
index 959a58e..39a4a29 100644
--- a/src/zope/i18n/zcml.py
+++ b/src/zope/i18n/zcml.py
@@ -33,7 +33,7 @@ from zope.i18n.gettextmessagecatalog import GettextMessageCatalog
from zope.i18n.testmessagecatalog import TestMessageCatalog
from zope.i18n.translationdomain import TranslationDomain
from zope.i18n.interfaces import ITranslationDomain
-from ._compat import _u
+
logger = logging.getLogger("zope.i18n")
@@ -42,15 +42,15 @@ class IRegisterTranslationsDirective(Interface):
"""Register translations with the global site manager."""
directory = Path(
- title=_u("Directory"),
- description=_u("Directory containing the translations"),
+ title=u"Directory",
+ description=u"Directory containing the translations",
required=True
)
domain = TextLine(
- title=_u("Domain"),
- description=_u("Translation domain to register. If not specified, "
- "all domains found in the directory are registered"),
+ title=u"Domain",
+ description=(u"Translation domain to register. If not specified, "
+ u"all domains found in the directory are registered"),
required=False
)
@@ -104,7 +104,7 @@ def registerTranslations(_context, directory, domain='*'):
domains[name] = {}
domains[name][language] = domain_path
if loaded:
- logger.debug('register directory %s' % directory)
+ logger.debug('register directory %s', directory)
# Now create TranslationDomain objects and add them as utilities
for name, langs in domains.items():
@@ -115,13 +115,13 @@ def registerTranslations(_context, directory, domain='*'):
# `zope.component.zcml.utility`) since we need the actual utilities
# in place before the merging can be done...
_context.action(
- discriminator = None,
- callable = handler,
- args = (catalogs, name))
+ discriminator=None,
+ callable=handler,
+ args=(catalogs, name))
# also register the interface for the translation utilities
provides = ITranslationDomain
_context.action(
- discriminator = None,
- callable = provideInterface,
- args = (provides.__module__ + '.' + provides.getName(), provides))
+ discriminator=None,
+ callable=provideInterface,
+ args=(provides.__module__ + '.' + provides.getName(), provides))