python - Django trans problems - not working in 100% cases -


i've got problem using django's {% trans %} template function. have values translated in messages file , gets translated in cases. not of them.

i'm trying debug issue. have block of code - in i'm iterating through form's fields , outputting them:

<tr>         <td>{{ hdr_data|safe }} {% trans row_field.label_tag %}</td>         <td>{{ row_field }}</td>         <td>{{ row_field.errors}}</td>     </tr> 

if suppose want print _row_field.label_tag_ string "abc", have translated "zxf" above code still prints "abc". if sth this:

<tr>         <td>{{ hdr_data|safe }} {% trans 'abc' %}</td>         <td>{{ row_field }}</td>         <td>{{ row_field.errors}}</td>     </tr> 

the translation ok - "zxf".

i've been trying check what's wrong label_tag, , string:

<label for="id_abc">abc</label> 

shouldn't just "abc"? isn't cause of problems? if so, why works , not?

my django version 1.2.1.

field.label_tag wraps label inside <label> tag. text, use field.label. explained here.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -