Changes between Initial Version and Version 1 of Ticket #26403


Ignore:
Timestamp:
Mar 24, 2016, 5:41:35 AM (9 years ago)
Author:
Meiyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26403 – Description

    initial v1  
    11The `invalid_block_tag()` function of template `Parser` makes use of the `django.utils.text.get_text_list()` function to generate the list of expected block tags. The only caveat is that `get_text_list()` takes a concatenation parameter whose default value is the **translated** string `or`, while the rest of the error message is untranslated. This results in crazy messages such as
    22    Invalid block tag: 'qq', expected 'xx','yy' 或 'zz'
    3 (for 1.8 and earlier).
     3(for 1.8 and earlier)
     4    Invalid block tag on line 234: 'qq', expected 'xx','yy' 或 'zz'. Did you forget to register or load this tag?
     5(for 1.9 and later).
    46
    57Looks like the solution should be easy: pass the `'or'` concatenator to `get_text_list()` instead of relying on the default value.
Back to Top