Skip to content

Commit

Permalink
Fixed fallback translation in case of empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed May 9, 2020
1 parent 9a0c3e9 commit de74821
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion material/partials/language.html
Expand Up @@ -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 %}
2 changes: 1 addition & 1 deletion src/partials/language.html
Expand Up @@ -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 %}

0 comments on commit de74821

Please sign in to comment.