diff options
| author | Marc Garcia <garcia.marc@gmail.com> | 2009-08-10 15:23:32 +0000 |
|---|---|---|
| committer | Marc Garcia <garcia.marc@gmail.com> | 2009-08-10 15:23:32 +0000 |
| commit | ad9f56aad62d4f5e623fa5f553e84971832a39ee (patch) | |
| tree | 5318b5aefff77db2a9c5553fb7156a0b1355f7c9 /tests | |
| parent | ac70e26bafb47f8a69aa805273724fba29ccc26f (diff) | |
[soc2009/i18n] Refs #10891, fixed bug on blocktrans, that skipped translations of texts containing mac or dos end of lines.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/i18n-improvements@11429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/i18n/tests.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py index eb19e7f4d3..693a3adacf 100644 --- a/tests/regressiontests/i18n/tests.py +++ b/tests/regressiontests/i18n/tests.py @@ -65,6 +65,20 @@ status. >>> print s Password +Translations on files with mac or dos end of lines will be converted +to unix eof in .po catalogs, and they have to match when retrieved + +>>> from django.utils.translation.trans_real import translation +>>> ca_translation = translation('ca') +>>> ca_translation._catalog[u'Mac\nEOF\n'] = u'Catalan Mac\nEOF\n' +>>> ca_translation._catalog[u'Win\nEOF\n'] = u'Catalan Win\nEOF\n' +>>> activate('ca') +>>> ugettext(u'Mac\rEOF\r') +u'Catalan Mac\nEOF\n' +>>> ugettext(u'Win\r\nEOF\r\n') +u'Catalan Win\nEOF\n' +>>> deactivate() + Localization of dates and numbers >>> import datetime |
