From 5bad0d523ee7a384fc5c7b62859c5be7c13945ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 18 Oct 2025 15:23:19 +0200 Subject: [PATCH] langs: Add test case using a "reserved" i18n code See #14061 --- langs/i18n/i18n_integration_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/langs/i18n/i18n_integration_test.go b/langs/i18n/i18n_integration_test.go index b62a2900e..c078bc241 100644 --- a/langs/i18n/i18n_integration_test.go +++ b/langs/i18n/i18n_integration_test.go @@ -126,3 +126,21 @@ title: home_es b.AssertFileContent("public/es/index.html", `home_es_gato`) b.AssertFileContent("public/fr/index.html", `home_fr_gato`) } + +// See issue #14061 +func TestI18nReservedKeyMap(t *testing.T) { + t.Parallel() + + files := ` +-- config.toml -- +-- i18n/en.toml -- +[description] +other = 'This is a description from i18n.' +-- layouts/all.html -- +description: {{ T "description" }}| +` + + b := hugolib.Test(t, files) + + b.AssertFileContent("public/index.html", `description: This is a description from i18n.|`) +} -- 2.39.5