Fixed L10N JSON format

This commit is contained in:
squidfunk 2019-11-26 10:19:10 +01:00
parent b5ad4ac339
commit e1cab27714
2 changed files with 30 additions and 30 deletions

View File

@ -203,21 +203,21 @@
{% endif %}
{% endif %}
<script id="__lang" type="application/json">
{
{% for key in [
"clipboard.copy",
"clipboard.copied",
"search.language",
"search.pipeline.stopwords",
"search.pipeline.trimmer",
"search.result.none",
"search.result.one",
"search.result.other",
"search.tokenizer"
] -%}
"{{ key }}": "{{ lang.t(key) }}"{{ "," if not loop.last }}
{% endfor %}
}
{%- set translations = {} -%}
{%- for key in [
"clipboard.copy",
"clipboard.copied",
"search.language",
"search.pipeline.stopwords",
"search.pipeline.trimmer",
"search.result.none",
"search.result.one",
"search.result.other",
"search.tokenizer"
] -%}
{%- set _ = translations.update({ key: lang.t(key) }) -%}
{%- endfor -%}
{{ translations | tojson }}
</script>
<script>app({version:"{{ mkdocs_version }}",url:{base:"{{ base_url }}"}})</script>
{% for path in config["extra_javascript"] %}

View File

@ -402,21 +402,21 @@
<!-- Translations -->
<script id="__lang" type="application/json">
{
{% for key in [
"clipboard.copy",
"clipboard.copied",
"search.language",
"search.pipeline.stopwords",
"search.pipeline.trimmer",
"search.result.none",
"search.result.one",
"search.result.other",
"search.tokenizer"
] -%}
"{{ key }}": "{{ lang.t(key) }}"{{ "," if not loop.last }}
{% endfor %}
}
{%- set translations = {} -%}
{%- for key in [
"clipboard.copy",
"clipboard.copied",
"search.language",
"search.pipeline.stopwords",
"search.pipeline.trimmer",
"search.result.none",
"search.result.one",
"search.result.other",
"search.tokenizer"
] -%}
{%- set _ = translations.update({ key: lang.t(key) }) -%}
{%- endfor -%}
{{ translations | tojson }}
</script>
<script>
app({