|
|
@ -214,7 +214,9 @@ describe("GetText module", function()
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
describe("language with standard plurals", function()
|
|
|
|
describe("language with standard plurals", function()
|
|
|
|
GetText.changeLang("nl_NL")
|
|
|
|
setup(function()
|
|
|
|
|
|
|
|
GetText.changeLang("nl_NL")
|
|
|
|
|
|
|
|
end)
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
end)
|
|
|
|
end)
|
|
|
@ -239,7 +241,9 @@ describe("GetText module", function()
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
describe("language with simple plurals n > 2", function()
|
|
|
|
describe("language with simple plurals n > 2", function()
|
|
|
|
GetText.changeLang("simple")
|
|
|
|
setup(function()
|
|
|
|
|
|
|
|
GetText.changeLang("simple")
|
|
|
|
|
|
|
|
end)
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
end)
|
|
|
|
end)
|
|
|
@ -266,7 +270,9 @@ describe("GetText module", function()
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
describe("language with no plurals", function()
|
|
|
|
describe("language with no plurals", function()
|
|
|
|
GetText.changeLang("none")
|
|
|
|
setup(function()
|
|
|
|
|
|
|
|
GetText.changeLang("none")
|
|
|
|
|
|
|
|
end)
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
end)
|
|
|
|
end)
|
|
|
@ -293,7 +299,9 @@ describe("GetText module", function()
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
describe("language with complex plurals (Arabic)", function()
|
|
|
|
describe("language with complex plurals (Arabic)", function()
|
|
|
|
GetText.changeLang("ar")
|
|
|
|
setup(function()
|
|
|
|
|
|
|
|
GetText.changeLang("ar")
|
|
|
|
|
|
|
|
end)
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
end)
|
|
|
|
end)
|
|
|
@ -322,7 +330,9 @@ describe("GetText module", function()
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
describe("language with complex plurals (Russian)", function()
|
|
|
|
describe("language with complex plurals (Russian)", function()
|
|
|
|
GetText.changeLang("ru")
|
|
|
|
setup(function()
|
|
|
|
|
|
|
|
GetText.changeLang("ru")
|
|
|
|
|
|
|
|
end)
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
end)
|
|
|
|
end)
|
|
|
@ -351,7 +361,9 @@ describe("GetText module", function()
|
|
|
|
-- This one's mainly to test fallback stuff. Russian/Polish are hard
|
|
|
|
-- This one's mainly to test fallback stuff. Russian/Polish are hard
|
|
|
|
-- to follow, so there we focus on algorithm correctness.
|
|
|
|
-- to follow, so there we focus on algorithm correctness.
|
|
|
|
describe("language with many plurals", function()
|
|
|
|
describe("language with many plurals", function()
|
|
|
|
GetText.changeLang("many")
|
|
|
|
setup(function()
|
|
|
|
|
|
|
|
GetText.changeLang("many")
|
|
|
|
|
|
|
|
end)
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
it("gettext should ignore fuzzy strings", function()
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|