From de74821140d950aed579b7589fc9ffce56caf5f4 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 9 May 2020 13:13:50 +0200 Subject: [PATCH] Fixed fallback translation in case of empty string --- material/partials/language.html | 2 +- src/partials/language.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/material/partials/language.html b/material/partials/language.html index 46188a6b2..7366121f9 100644 --- a/material/partials/language.html +++ b/material/partials/language.html @@ -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 %} diff --git a/src/partials/language.html b/src/partials/language.html index d8b192668..5d5e5efd8 100644 --- a/src/partials/language.html +++ b/src/partials/language.html @@ -25,4 +25,4 @@ {% 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 %}