From 50f348a92f6953c4eeb0d98f7311124e72527016 Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Tue, 11 Oct 2005 13:23:01 +0000 Subject: [PATCH] i18n: added two additional unit tests for i18n (filter related) git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@836 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/othertests/templates.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/othertests/templates.py b/tests/othertests/templates.py index e73163aabc..9568b5886c 100644 --- a/tests/othertests/templates.py +++ b/tests/othertests/templates.py @@ -251,6 +251,12 @@ TEMPLATE_TESTS = { # translation of string without i18n tag but with interpolation 'i18n12': ('{{ _("blah%(anton)s") }}', {'anton': 'blubb'}, "blahblubb"), + + # translation of a variable with a translated filter + 'i18n13': ('{{ bool|yesno:_("ja,nein") }}', {'bool': True}, 'ja'), + + # translation of a variable with a non-translated filter + 'i18n14': ('{{ bool|yesno:"ja,nein" }}', {'bool': True}, 'ja'), } # This replaces the standard template_loader.