1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-28 01:10:58 +01:00

Fixed fallback translation in case of empty string

This commit is contained in:
squidfunk 2020-05-09 13:13:50 +02:00
parent 9a0c3e9094
commit de74821140
2 changed files with 2 additions and 2 deletions

View File

@ -3,4 +3,4 @@
-#}
{% import "partials/language/" + config.theme.language + ".html" as lang %}
{% import "partials/language/en.html" as fallback %}
{% macro t(key) %}{{ lang.t(key) | default(fallback.t(key)) }}{% endmacro %}
{% macro t(key) %}{{ lang.t(key) or fallback.t(key) }}{% endmacro %}

View File

@ -25,4 +25,4 @@
{% import "partials/language/en.html" as fallback %}
<!-- Re-export translations -->
{% macro t(key) %}{{ lang.t(key) | default(fallback.t(key)) }}{% endmacro %}
{% macro t(key) %}{{ lang.t(key) or fallback.t(key) }}{% endmacro %}