mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
langs/i18n: Add workaround for known language, but missing plural rule error
Closes #7798
This commit is contained in:
@@ -199,6 +199,19 @@ other = "{{ .Count }} minuttar lesing"`),
|
||||
expected: "3 minuttar lesing",
|
||||
expectedFlag: "3 minuttar lesing",
|
||||
},
|
||||
// https://github.com/gohugoio/hugo/issues/7798
|
||||
{
|
||||
name: "known-language-missing-plural",
|
||||
data: map[string][]byte{
|
||||
"oc.toml": []byte(`[oc]
|
||||
one = "abc"`),
|
||||
},
|
||||
args: 1,
|
||||
lang: "oc",
|
||||
id: "oc",
|
||||
expected: "abc",
|
||||
expectedFlag: "abc",
|
||||
},
|
||||
// https://github.com/gohugoio/hugo/issues/7794
|
||||
{
|
||||
name: "dotted-bare-key",
|
||||
@@ -292,7 +305,7 @@ func TestI18nTranslate(t *testing.T) {
|
||||
} else {
|
||||
expected = test.expected
|
||||
}
|
||||
actual = doTestI18nTranslate(t, test, v)
|
||||
actual = doTestI18nTranslate(c, test, v)
|
||||
c.Assert(actual, qt.Equals, expected)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user