Opened 19 years ago
Closed 19 years ago
#719 closed defect (fixed)
[i18n] bugs in templatetags/i18n.py
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
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: | no | UI/UX: | no |
Description
some typos found:
Index: /store/django/django/templatetags/i18n.py =================================================================== --- /store/django/django/templatetags/i18n.py (revision 1062) +++ /store/django/django/templatetags/i18n.py (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 @@ singular.append(token) else: break - 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 @@ break 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)
Change History (2)
by , 19 years ago
comment:1 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
diff again