From 0b0c3237080baeb53307e038c4d7786d985090f6 Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Tue, 11 Oct 2005 12:24:16 +0000 Subject: [PATCH] i18n: added the translation step to the filter parser (the arg is now translated if it is _("...")) git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@835 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/template.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/core/template.py b/django/core/template.py index 6c7c850d18..b8c05bb821 100644 --- a/django/core/template.py +++ b/django/core/template.py @@ -361,7 +361,7 @@ class FilterParser: return (self.current_filter_name, self.current_filter_arg) def read_arg(self): - # First read a " + # First read a " or a _(" self.next_char() translated = False if self.current == '_': @@ -400,6 +400,7 @@ class FilterParser: if self.current != ')': raise TemplateSyntaxError, "Bad character (expecting ')') '%s'" % self.current self.next_char() + arg = _(arg) return arg def get_filters_from_token(token):