[ZPT] CVS: Zope/lib/python/Products/PageTemplates - GlobalTranslationService.py:1.3

Florent Guillaume fg@nuxeo.com
Sun, 6 Oct 2002 13:21:40 -0400


Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv11392/lib/python/Products/PageTemplates

Modified Files:
	GlobalTranslationService.py 
Log Message:
Merged changes from the Zope-2_6-branch:
Modified the translation service to return None if no translation exist.
So now using i18n tags without a translation service should give the
same behavior as before. The tests reflect that.


=== Zope/lib/python/Products/PageTemplates/GlobalTranslationService.py 1.2 => 1.3 ===
--- Zope/lib/python/Products/PageTemplates/GlobalTranslationService.py:1.2	Wed Sep 18 11:12:46 2002
+++ Zope/lib/python/Products/PageTemplates/GlobalTranslationService.py	Sun Oct  6 13:21:07 2002
@@ -17,10 +17,10 @@
 """
 
 class DummyTranslationService:
-    """Translation service that does nothing and returns the message id."""
+    """Translation service that doesn't know anything about translation."""
     def translate(self, domain, msgid, mapping=None,
                   context=None, target_language=None):
-        return msgid
+        return None
     # XXX Not all of Zope.I18n.ITranslationService is implemented.
 
 translationService = DummyTranslationService()