[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/i18n/metaconfigure.py
normalize whitespace
Fred L. Drake, Jr.
fred at zope.com
Fri May 14 16:02:42 EDT 2004
Log message for revision 24684:
normalize whitespace
-=-
Modified: Zope3/trunk/src/zope/app/i18n/metaconfigure.py
===================================================================
--- Zope3/trunk/src/zope/app/i18n/metaconfigure.py 2004-05-14 19:53:07 UTC (rev 24683)
+++ Zope3/trunk/src/zope/app/i18n/metaconfigure.py 2004-05-14 20:02:42 UTC (rev 24684)
@@ -16,18 +16,20 @@
$Id: metaconfigure.py,v 1.5 2004/03/31 14:18:13 gintautasm Exp $
"""
import os
+
from zope.app.component.metaconfigure import utility
from zope.i18n.gettextmessagecatalog import GettextMessageCatalog
from zope.i18n.translationdomain import TranslationDomain
from zope.i18n.interfaces import ITranslationDomain
+
def registerTranslations(_context, directory):
path = os.path.normpath(directory)
domains = {}
# Gettext has the domain-specific catalogs inside the language directory,
# which is exactly the opposite as we need it. So create a dictionary that
- # reverses the nesting.
+ # reverses the nesting.
for language in os.listdir(path):
lc_messages_path = os.path.join(path, language, 'LC_MESSAGES')
if os.path.isdir(lc_messages_path):
@@ -45,4 +47,3 @@
for lang, file in langs.items():
domain.addCatalog(GettextMessageCatalog(lang, name, file))
utility(_context, ITranslationDomain, domain, name=name)
-
More information about the Zope3-Checkins
mailing list