Fix .mo contexts

Fixes #3590

- `get("key")`
- `get("context", "key")`
This commit is contained in:
Jeroen van Rijn
2024-05-17 14:15:56 +02:00
parent b51eb53d04
commit 6139da3d41
5 changed files with 72 additions and 15 deletions
@@ -72,6 +72,20 @@ TESTS := []Test_Suite{
},
},
{
file = "assets/I18N/mixed_context.mo",
loader = i18n.parse_mo_file,
plural = nil,
tests = {
// These are in the catalog.
{"", "Message1", "This is message 1 without Context", 1},
{"Context", "Message1", "This is message 1 with Context", 1},
// This isn't in the catalog, so should ruturn the key.
{"", "Come visit us on Discord!", "Come visit us on Discord!", 1},
},
},
{
file = "assets/I18N/nl_NL.mo",
loader = i18n.parse_mo_file,