]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
langs: Add test case using a "reserved" i18n code
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 18 Oct 2025 13:23:19 +0000 (15:23 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 18 Oct 2025 13:28:33 +0000 (15:28 +0200)
See #14061

langs/i18n/i18n_integration_test.go

index b62a2900e25bc4d914e71714a569ad40a45bff39..c078bc241bdae161280fc806cf96beed10315495 100644 (file)
@@ -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.|`)
+}