1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

unicode: Made lazy translation objects work properly. Fixed #4295, #4320.

git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2007-05-22 08:06:57 +00:00
parent c2c585f0f0
commit dd52eed2fb
17 changed files with 128 additions and 82 deletions

View File

@@ -27,13 +27,13 @@ Translations are done at rendering time, so multi-lingual apps can define forms
early and still send back the right translation.
# XFAIL
# >>> activate('de')
# >>> print f.as_p()
# <p><label for="id_username">Benutzername:</label> <input id="id_username" type="text" name="username" maxlength="10" /></p>
# >>> activate('pl')
# >>> f.as_p()
# u'<p><label for="id_username">Nazwa u\u017cytkownika:</label> <input id="id_username" type="text" name="username" maxlength="10" /></p>'
# >>> deactivate()
>>> activate('de')
>>> print f.as_p()
<p><label for="id_username">Benutzername:</label> <input id="id_username" type="text" name="username" maxlength="10" /></p>
>>> activate('pl')
>>> f.as_p()
u'<p><label for="id_username">Nazwa u\u017cytkownika:</label> <input id="id_username" type="text" name="username" maxlength="10" /></p>'
>>> deactivate()
Unicode decoding problems...
>>> GENDERS = ((u'\xc5', u'En tied\xe4'), (u'\xf8', u'Mies'), (u'\xdf', u'Nainen'))