diff options
author | Maurits van Rees <maurits@vanrees.org> | 2021-09-02 12:58:01 +0200 |
---|---|---|
committer | Maurits van Rees <maurits@vanrees.org> | 2021-09-02 12:58:01 +0200 |
commit | 583cde4a37e6d76f11b767dea8c518433748ec17 (patch) | |
tree | adaf3e25199843fdc376457adf1c9a404b88c8a6 /src/zope/i18n/zcml.py | |
parent | 5e1cd72d4db7cf076e34bb6d86fd03b683ab43a2 (diff) | |
download | zope-i18n-583cde4a37e6d76f11b767dea8c518433748ec17.tar.gz |
black without string normalization
Diffstat (limited to 'src/zope/i18n/zcml.py')
-rw-r--r-- | src/zope/i18n/zcml.py | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/zope/i18n/zcml.py b/src/zope/i18n/zcml.py index 4df9ccb..7ae6319 100644 --- a/src/zope/i18n/zcml.py +++ b/src/zope/i18n/zcml.py @@ -1,4 +1,3 @@ - # ############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. @@ -44,15 +43,17 @@ class IRegisterTranslationsDirective(Interface): directory = Path( title=u"Directory", description=u"Directory containing the translations", - required=True - ) + required=True, + ) domain = TextLine( title=u"Domain", - description=(u"Translation domain to register. If not specified, " - u"all domains found in the directory are registered"), - required=False - ) + description=( + u"Translation domain to register. If not specified, " + u"all domains found in the directory are registered" + ), + required=False, + ) def allow_language(lang): @@ -90,13 +91,15 @@ def registerTranslations(_context, directory, domain='*'): if os.path.isdir(lc_messages_path): # Preprocess files and update or compile the mo files if config.COMPILE_MO_FILES: - for domain_path in glob(os.path.join(lc_messages_path, - '%s.po' % domain)): + for domain_path in glob( + os.path.join(lc_messages_path, '%s.po' % domain) + ): domain_file = os.path.basename(domain_path) name = domain_file[:-3] compile_mo_file(name, lc_messages_path) - for domain_path in glob(os.path.join(lc_messages_path, - '%s.mo' % domain)): + for domain_path in glob( + os.path.join(lc_messages_path, '%s.mo' % domain) + ): loaded = True domain_file = os.path.basename(domain_path) name = domain_file[:-3] @@ -115,13 +118,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)) + args=(provides.__module__ + '.' + provides.getName(), provides), + ) |