Skip to content

Commit 5bad0d5

Browse files
committed
langs: Add test case using a "reserved" i18n code
See #14061
1 parent a3d9548 commit 5bad0d5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎langs/i18n/i18n_integration_test.go‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,21 @@ title: home_es
126126
b.AssertFileContent("public/es/index.html", `home_es_gato`)
127127
b.AssertFileContent("public/fr/index.html", `home_fr_gato`)
128128
}
129+
130+
// See issue #14061
131+
func TestI18nReservedKeyMap(t *testing.T) {
132+
t.Parallel()
133+
134+
files := `
135+
-- config.toml --
136+
-- i18n/en.toml --
137+
[description]
138+
other = 'This is a description from i18n.'
139+
-- layouts/all.html --
140+
description: {{ T "description" }}|
141+
`
142+
143+
b := hugolib.Test(t, files)
144+
145+
b.AssertFileContent("public/index.html", `description: This is a description from i18n.|`)
146+
}

0 commit comments

Comments
 (0)