Fail the build when theme.language has no UI translations (#2028)

The override templates silently used English copy for any unconfigured
language. All six configured languages have entries, so a missing entry is a
configuration error and now fails instead of publishing English UI text.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yudong Jin
2026-11-10 19:46:17 +08:00
committed by GitHub
parent 82da772c48
commit b62d1d84f9

View File

@@ -44,4 +44,5 @@
}
} %}
{% set locale = config.theme.language | lower %}
{% set ui = translations[locale] | default(translations.en) %}
{# Every configured theme.language needs an entry; a missing one fails the build. #}
{% set ui = translations[locale] %}