3
我使用Flask,忍者和Mustachjs一起。鬍子,babel和gettext
爲了完成工作,我使用{%raw%}標記。
現在,它是一個多語言應用程序,我使用Babel。
我該怎麼辦:
{% raw %}
<script id="details" type="text/template">
<table class="table" >
<thead>
<tr>
<th>**{{gettext('col1')}}</th>
<th>**{{gettext('col2')}}</th>
<th>**{{gettext('col6')}}</th>
</tr>
</thead>
<tbody>
{{#skyrsla}}
<tr>
<td> {{index}}</td>
<td> {{nafn}}</td>
<td> {{mean_growth_index}}</td>
</tr>
{{/skyrsla}}
</tbody>
</table>
</script>
{% endraw %}
既然是原始標記之間,巴貝爾擴展沒有檢測{{gettext的(「COL1」)} 有沒有辦法來改變通天的配置。
我的實際配置是這樣的:
[python: **.py]
[jinja2: **/templates/**.html]
extensions=jinja2.ext.autoescape,jinja2.ext.with_