Opened 8 years ago

Closed 8 years ago

#719 closed defect (fixed)

[i18n] bugs in templatetags/

Reported by: Nebojša Đorđević - nesh <nesh@…> Owned by: adrian
Component: Core (Other) Version:
Severity: blocker Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


some typos found:

Index: /store/django/django/templatetags/
--- /store/django/django/templatetags/	(revision 1062)
+++ /store/django/django/templatetags/	(working copy)
@@ -18,7 +18,7 @@
         context[self.variable] = LANGUAGES
         return ''
-class GetCurrentLanguage(Node):
+class GetCurrentLanguageNode(Node):
     def __init__(self, variable):
         self.variable = variable
@@ -112,7 +112,7 @@
     args = token.contents.split()
     if len(args) != 3 or args[1] != 'as':
         raise TemplateSyntaxError, "'get_available_languages' requires 'as variable' (got %r)" % args
-    return GetAvailableLanguagesNode(args[2])
+    return GetCurrentLanguageNode(args[2])
 def do_translate(parser, token):
@@ -189,7 +189,7 @@
-    if countervar and counter:  
+    if countervar and counter:
         if token.contents.strip() != 'plural':
             raise TemplateSyntaxError, "'blocktrans' doesn't allow other block tags inside it" % tag
         while parser.tokens:
@@ -200,11 +200,11 @@
     if token.contents.strip() != 'endblocktrans':
         raise TemplateSyntaxError, "'blocktrans' doesn't allow other block tags (seen %r) inside it" % token.contents
     return BlockTranslateNode(extra_context, singular, plural, countervar, counter)
 register_tag('get_available_languages', do_get_available_languages)
-register_tag('get_curent_language', do_get_current_language)
+register_tag('get_current_language', do_get_current_language)
 register_tag('trans', do_translate)
 register_tag('blocktrans', do_block_translate)

Attachments (1)

i18n.diff (1.7 KB) - added by Nebojša Đorđević - nesh <nesh@…> 8 years ago.
diff again

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by Nebojša Đorđević - nesh <nesh@…>

diff again

comment:1 Changed 8 years ago by hugo

  • Resolution set to fixed
  • Status changed from new to closed

(In [1064]) i18n: updated unittests and fixed bugs in the tags, removed the old tags and fixed #719 (thx nesh)

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.