mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
[UX] Add Romanian keyboard layout (#5660)
This adds a new separate Romanian keyboard layout, with popup support. - Functional buttons are translated. - Pages 5&6 contain 3 groups of characters (I tried my best to group them logically): - On the left: traditional Romanian cyrillic pre-1850s - On the middle latinised forms from 1850s onwards - On the right modern diacritics from 1900s to today - Pages 7&8 add only large double quotes and section/paragraph mark. - Popups are only avalable for most common diacritics. Swipe up for circumflex, swipe down for breve. I can really call this the most complete though-the-ages Romanian keyboard. :)
This commit is contained in:
committed by
Frans de Jonge
parent
849bd951ed
commit
2541440bb8
46
frontend/ui/data/keyboardlayouts/keypopup/ro_popup.lua
Normal file
46
frontend/ui/data/keyboardlayouts/keypopup/ro_popup.lua
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
return {
|
||||||
|
_A_ = {
|
||||||
|
"A",
|
||||||
|
north = "Â",
|
||||||
|
south = "Ă",
|
||||||
|
},
|
||||||
|
_a_ = {
|
||||||
|
"a",
|
||||||
|
north = "â",
|
||||||
|
south = "ă",
|
||||||
|
},
|
||||||
|
_I_ = {
|
||||||
|
"I",
|
||||||
|
north = "Î",
|
||||||
|
south = "Ĭ",
|
||||||
|
},
|
||||||
|
_i_ = {
|
||||||
|
"i",
|
||||||
|
north = "î",
|
||||||
|
south = "ĭ",
|
||||||
|
},
|
||||||
|
_S_ = {
|
||||||
|
"S",
|
||||||
|
north = "Ș",
|
||||||
|
},
|
||||||
|
_s_ = {
|
||||||
|
"s",
|
||||||
|
north = "ș",
|
||||||
|
},
|
||||||
|
_T_ = {
|
||||||
|
"T",
|
||||||
|
north = "Ț",
|
||||||
|
},
|
||||||
|
_t_ = {
|
||||||
|
"t",
|
||||||
|
north = "ț",
|
||||||
|
},
|
||||||
|
_U_ = {
|
||||||
|
"U",
|
||||||
|
south = "Ŭ",
|
||||||
|
},
|
||||||
|
_u_ = {
|
||||||
|
"u",
|
||||||
|
south = "ŭ",
|
||||||
|
},
|
||||||
|
}
|
||||||
86
frontend/ui/data/keyboardlayouts/ro_keyboard.lua
Normal file
86
frontend/ui/data/keyboardlayouts/ro_keyboard.lua
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
local en_popup = require("ui/data/keyboardlayouts/keypopup/en_popup")
|
||||||
|
local ro_popup = require("ui/data/keyboardlayouts/keypopup/ro_popup")
|
||||||
|
local com = en_popup.com -- comma (,)
|
||||||
|
local prd = en_popup.prd -- period (.)
|
||||||
|
local _at = en_popup._at
|
||||||
|
local _eq = en_popup._eq -- equals sign (=)
|
||||||
|
local _A_ = ro_popup._A_
|
||||||
|
local _a_ = ro_popup._a_
|
||||||
|
local _I_ = ro_popup._I_
|
||||||
|
local _i_ = ro_popup._i_
|
||||||
|
local _S_ = ro_popup._S_
|
||||||
|
local _s_ = ro_popup._s_
|
||||||
|
local _T_ = ro_popup._T_
|
||||||
|
local _t_ = ro_popup._t_
|
||||||
|
local _U_ = ro_popup._U_
|
||||||
|
local _u_ = ro_popup._u_
|
||||||
|
|
||||||
|
return {
|
||||||
|
min_layer = 1,
|
||||||
|
max_layer = 8,
|
||||||
|
shiftmode_keys = {[""] = true},
|
||||||
|
symbolmode_keys = {["123"] = true, ["ABC"] = true, ["alt"] = true},
|
||||||
|
utf8mode_keys = {["🌐"] = true},
|
||||||
|
umlautmode_keys = {["Îșț"] = true},
|
||||||
|
keys = {
|
||||||
|
-- first row
|
||||||
|
{ -- 1 2 3 4 5 6 7 8
|
||||||
|
{ "Q", "q", "„", "0", "Ӂ", "ӂ", "1", "ª", },
|
||||||
|
{ "W", "w", "!", "1", "Џ", "џ", "2", "º", },
|
||||||
|
{ "E", "e", _at, "2", "Ѫ", "ѫ", "3", "¡", },
|
||||||
|
{ "R", "r", "#", "3", "Ꙟ", "ꙟ", "4", "¿", },
|
||||||
|
{ _T_, _t_, "+", _eq, "Ѧ", "ѧ", "5", "¼", },
|
||||||
|
{ "Y", "y", "€", "(", "Ô", "ô", "6", "½", },
|
||||||
|
{ _U_, _u_, "‰", ")", "Ḑ", "ḑ", "7", "¾", },
|
||||||
|
{ _I_, _i_, "|", "\\", "Ĕ", "ĕ", "8", "©", },
|
||||||
|
{ "O", "o", "?", "/", "Ă", "ă", "9", "®", },
|
||||||
|
{ "P", "p", "~", "`", "Î", "î", "0", "™", },
|
||||||
|
},
|
||||||
|
-- second row
|
||||||
|
{ -- 1 2 3 4 5 6 7 8
|
||||||
|
{ _A_, _a_, "…", _at, "Ї", "ї", "«", "«", },
|
||||||
|
{ _S_, _s_, "$", "4", "Ѡ", "ѡ", "»", "»", },
|
||||||
|
{ "D", "d", "%", "5", "Є", "є", "Ǧ", "ǧ", },
|
||||||
|
{ "F", "f", "^", "6", "Ꙋ", "ꙋ", "Ć", "ć", },
|
||||||
|
{ "G", "g", ":", ";", "Û", "û", "Č", "č", },
|
||||||
|
{ "H", "h", '"', "'", "Ê", "ê", "Đ", "đ", },
|
||||||
|
{ "J", "j", "{", "[", "Ș", "ș", "Š", "š", },
|
||||||
|
{ "K", "k", "}", "]", "Ț", "ț", "Ž", "ž", },
|
||||||
|
{ "L", "l", "_", "-", "Â", "â", "§", "§", },
|
||||||
|
},
|
||||||
|
-- third row
|
||||||
|
{ -- 1 2 3 4 5 6 7 8
|
||||||
|
{ label = "",
|
||||||
|
width = 1.5
|
||||||
|
},
|
||||||
|
{ "Z", "z", "&", "7", "Ѣ", "ѣ", "Ű", "ű", },
|
||||||
|
{ "X", "x", "*", "8", "Ѩ", "ѩ", "Ã", "ã", },
|
||||||
|
{ "C", "c", "£", "9", "Ѥ", "ѥ", "Þ", "þ", },
|
||||||
|
{ "V", "v", "<", com, "Ó", "ó", "Ý", "ý", },
|
||||||
|
{ "B", "b", ">", prd, "É", "é", "†", "‡", },
|
||||||
|
{ "N", "n", "‘", "↑", "Ŭ", "ŭ", "–", "—", },
|
||||||
|
{ "M", "m", "’", "↓", "Ĭ", "ĭ", "…", "¨", },
|
||||||
|
{ label = "",
|
||||||
|
width = 1.5,
|
||||||
|
bold = false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- fourth row
|
||||||
|
{
|
||||||
|
{ "123", "123", "ABC", "ABC", "alt", "alt", "ABC", "ABC",
|
||||||
|
width = 1.5},
|
||||||
|
{ label = "🌐", },
|
||||||
|
{ "Îșț", "Îșț", "Îșț", "Îșț", "Îșț", "Îșț", "Îșț", "Îșț", },
|
||||||
|
{ label = "spațiu",
|
||||||
|
" ", " ", " ", " ", " ", " ", " ", " ",
|
||||||
|
width = 3.0},
|
||||||
|
{ com, com, "“", "←", "Ç", "ç", com, com, },
|
||||||
|
{ prd, prd, "”", "→", "Ŏ", "ŏ", prd, prd, },
|
||||||
|
{ label = "⮠",
|
||||||
|
"\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n",
|
||||||
|
width = 1.5,
|
||||||
|
bold = true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -25,6 +25,8 @@ local Language = {
|
|||||||
pl_PL = "Polski2",
|
pl_PL = "Polski2",
|
||||||
pt_PT = "Português",
|
pt_PT = "Português",
|
||||||
pt_BR = "Português do Brasil",
|
pt_BR = "Português do Brasil",
|
||||||
|
ro = "Română",
|
||||||
|
ro_MD = "Română (Moldova)",
|
||||||
sk = "Slovenčina",
|
sk = "Slovenčina",
|
||||||
sv = "Svenska",
|
sv = "Svenska",
|
||||||
vi = "Tiếng Việt",
|
vi = "Tiếng Việt",
|
||||||
@@ -96,6 +98,8 @@ function Language:getLangMenuTable()
|
|||||||
--self:genLanguageSubItem("pl_PL"),
|
--self:genLanguageSubItem("pl_PL"),
|
||||||
self:genLanguageSubItem("pt_PT"),
|
self:genLanguageSubItem("pt_PT"),
|
||||||
self:genLanguageSubItem("pt_BR"),
|
self:genLanguageSubItem("pt_BR"),
|
||||||
|
--self:genLanguageSubItem("ro"),
|
||||||
|
--self:genLanguageSubItem("ro_MD"),
|
||||||
self:genLanguageSubItem("sk"),
|
self:genLanguageSubItem("sk"),
|
||||||
self:genLanguageSubItem("sv"),
|
self:genLanguageSubItem("sv"),
|
||||||
self:genLanguageSubItem("vi"),
|
self:genLanguageSubItem("vi"),
|
||||||
|
|||||||
@@ -661,6 +661,7 @@ local VirtualKeyboard = FocusManager:new{
|
|||||||
he = "he_keyboard",
|
he = "he_keyboard",
|
||||||
ja = "ja_keyboard",
|
ja = "ja_keyboard",
|
||||||
pt_BR = "pt_keyboard",
|
pt_BR = "pt_keyboard",
|
||||||
|
ro = "ro_keyboard",
|
||||||
ko_KR = "ko_KR_keyboard",
|
ko_KR = "ko_KR_keyboard",
|
||||||
ru = "ru_keyboard",
|
ru = "ru_keyboard",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user