317
редагувань
starcitizen>Alistair3149 Немає опису редагування |
м (6 ревізій: Template:Main_page/headerTemplate:Main page/header/styles.css) |
||
| (Не показано 4 проміжні версії 2 користувачів) | |||
| Рядок 164: | Рядок 164: | ||
end | end | ||
local lc = id:lower() | local lc = id:lower() | ||
local text = keyText[lc] or keyText[keyAlias[lc]] or | local text = keyText[lc] or keyText[keyAlias[lc]] | ||
result:add(kbdPrefix .. text .. kbdSuffix) | local leftRight = lc:match("^left ") or lc:match("^right ") | ||
if not text and leftRight then | |||
local _lc = lc:gsub("^" .. leftRight, "") | |||
local suffix = keyText[_lc] or keyText[keyAlias[_lc]] | |||
if suffix then | |||
text = leftRight:gsub("^%l", string.upper) .. " " .. suffix | |||
end | |||
end | |||
result:add(kbdPrefix .. (text or id) .. kbdSuffix) | |||
end | end | ||
return mw.getCurrentFrame():extensionTag{ | return mw.getCurrentFrame():extensionTag{ | ||