mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[i18n] Enable Latvian translation (#9079)
Cf. <https://github.com/koreader/koreader/issues/8225#issuecomment-1120181554>.
This commit is contained in:
@@ -216,6 +216,11 @@ function GetText_mt.__index.changeLang(new_lang)
|
||||
if plurals == "n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && n % 10 == 0) ? 2 : 3)" then
|
||||
plurals = "n == 1 ? 0 : (n == 2) ? 1 : (n > 10 && n % 10 == 0) ? 2 : 3"
|
||||
end
|
||||
-- Hardcoded workaround for Latvian.
|
||||
print(plurals)
|
||||
if plurals == "n % 10 == 0 || n % 100 >= 11 && n % 100 <= 19) ? 0 : ((n % 10 == 1 && n % 100 != 11) ? 1 : 2" then
|
||||
plurals = "n % 10 == 0 || n % 100 >= 11 && n % 100 <= 19 ? 0 : (n % 10 == 1 && n % 100 != 11) ? 1 : 2"
|
||||
end
|
||||
-- Hardcoded workaround for Romanian which has 3 plural forms.
|
||||
if plurals == "n == 1) ? 0 : ((n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) ? 1 : 2" then
|
||||
plurals = "n == 1 ? 0 : (n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) ? 1 : 2"
|
||||
|
||||
Reference in New Issue
Block a user