Changeset 6681 for django/trunk/tests/regressiontests/i18n/tests.py
- Timestamp:
- 11/17/07 06:11:54 (1 year ago)
- Files:
-
- django/trunk/tests/regressiontests/i18n/tests.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/tests/regressiontests/i18n/tests.py
r6608 r6681 5 5 Format string interpolation should work with *_lazy objects. 6 6 7 >>> from django.utils.translation import ugettext _lazy, activate, deactivate, gettext_lazy7 >>> from django.utils.translation import ugettext, ugettext_lazy, activate, deactivate, gettext_lazy 8 8 >>> s = ugettext_lazy('Add %(name)s') 9 9 >>> d = {'name': 'Ringo'} … … 40 40 >>> unicode(django.utils.translation.string_concat("dja", "ngo")) 41 41 u'django' 42 43 Translating a string requiring no auto-escaping shouldn't change the "safe" 44 status. 45 46 >>> from django.utils.safestring import mark_safe 47 >>> s = mark_safe('Password') 48 >>> type(s) 49 <class 'django.utils.safestring.SafeString'> 50 >>> activate('de') 51 >>> type(ugettext(s)) 52 <class 'django.utils.safestring.SafeUnicode'> 53 >>> deactivate() 42 54 """ 43 55
