aboutsummaryrefslogtreecommitdiffhomepage
path: root/langs/i18n/i18n_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'langs/i18n/i18n_test.go')
-rw-r--r--langs/i18n/i18n_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/langs/i18n/i18n_test.go b/langs/i18n/i18n_test.go
index 278ab4446..9618d3adf 100644
--- a/langs/i18n/i18n_test.go
+++ b/langs/i18n/i18n_test.go
@@ -271,6 +271,26 @@ other = "{{ .Count }} minuttar lesing"`),
expected: "3 minuttar lesing",
expectedFlag: "3 minuttar lesing",
},
+ // Issue #7838
+ {
+ name: "unknown-language-codes",
+ data: map[string][]byte{
+ "en.toml": []byte(`[readingTime]
+one ="en one"
+other = "en count {{.Count}}"`),
+ "a1.toml": []byte(`[readingTime]
+one = "a1 one"
+other = "a1 count {{ .Count }}"`),
+ "a2.toml": []byte(`[readingTime]
+one = "a2 one"
+other = "a2 count {{ .Count }}"`),
+ },
+ args: 3,
+ lang: "a2",
+ id: "readingTime",
+ expected: "a2 count 3",
+ expectedFlag: "a2 count 3",
+ },
// https://github.com/gohugoio/hugo/issues/7798
{
name: "known-language-missing-plural",