mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
[i18n] Add support for fledgling Hebrew translation (#6333)
See <https://hosted.weblate.org/languages/he/koreader/> if you'd like to contribute.
This commit is contained in:
@@ -211,6 +211,10 @@ function GetText_mt.__index.changeLang(new_lang)
|
||||
local nplurals = plural_forms:match("nplurals=([0-9]+);") or 2
|
||||
local plurals = plural_forms:match("plural=%((.*)%);")
|
||||
|
||||
-- Hardcoded workaround for Hebrew which has 4 plural forms.
|
||||
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 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"
|
||||
|
||||
@@ -15,7 +15,7 @@ local Language = {
|
||||
fr = "Français",
|
||||
gl = "Galego",
|
||||
it_IT = "Italiano",
|
||||
he = "Hebrew",
|
||||
he = "עִבְרִית",
|
||||
hu = "Magyar",
|
||||
nl_NL = "Nederlands",
|
||||
nb_NO = "Norsk",
|
||||
@@ -141,6 +141,7 @@ function Language:getLangMenuTable()
|
||||
--self:genLanguageSubItem("bn"),
|
||||
self:genLanguageSubItem("el"),
|
||||
--self:genLanguageSubItem("fa"),
|
||||
self:genLanguageSubItem("he"),
|
||||
self:genLanguageSubItem("ja"),
|
||||
--self:genLanguageSubItem("kk"),
|
||||
self:genLanguageSubItem("ko_KR"),
|
||||
|
||||
Reference in New Issue
Block a user