[Zope3-checkins] CVS: Zope3/src/zope/i18n - translate.py:1.4
Fred L. Drake, Jr.
fred@zope.com
Thu, 3 Apr 2003 14:55:50 -0500
Update of /cvs-repository/Zope3/src/zope/i18n
In directory cvs.zope.org:/tmp/cvs-serv24709/i18n
Modified Files:
translate.py
Log Message:
Pass default text to the translation service in a few more places.
=== Zope3/src/zope/i18n/translate.py 1.3 => 1.4 ===
--- Zope3/src/zope/i18n/translate.py:1.3 Tue Mar 25 15:21:28 2003
+++ Zope3/src/zope/i18n/translate.py Thu Apr 3 14:55:20 2003
@@ -38,11 +38,12 @@
self._context = context
self._translation_service = getService(context, 'Translation')
- def translate(self, msgid, mapping=None):
+ def translate(self, msgid, mapping=None, default=None):
"""Translate the source msgid using the given mapping.
See ITranslationService for details.
"""
return self._translation_service.translate(
self._domain, msgid, mapping, self._context,
- self._locale.id.language)
+ self._locale.id.language,
+ default=default)