local U = mw.ustring.char
local caron = U(0x30C)
local breve = U(0x306)
local grave = U(0x300)
local hook = U(0x328)
local data = {
{
-- Letters with diacritics in a shortcut sequence are decomposed before
-- being run through the substitutions
= "щ",
},
{
= "ѭ",
= "ѩ",
= "ь", -- ĭ
= "ѣ", -- ě
= "ѫ", -- ǫ
= "ѧ", -- ę
= "і", -- ì
= "ж", -- ž
= "ч", -- č
= "ш", -- š
= "щ",
= "ъ", -- ŭ
},
{
= "ж",
= "ѕ",
= "і",
= "ѡ",
= "ч",
= "ш",
= "ъ",
= "ь",
= "ѣ",
= "ꙗ",
= "ѥ",
= "ю",
= "ѫ",
= "ѭ",
= "ѧ",
= "ѩ",
= "ѯ",
= "ѱ",
= "ѳ",
= "ѵ",
},
{
= "а",
= "б",
= "в",
= "г",
= "д",
= "е",
= "з",
= "и",
= "к",
= "л",
= "м",
= "н",
= "о",
= "п",
= "р",
= "с",
= "т",
= "оу",
= "ф",
= "х",
= "ѡ",
= "ц",
= "ꙑ",
= "ѯ",
= "ѱ",
= "ѳ",
= "ѵ",
= "ҁ",
},
}
-- Add replacements for capitals: both an all-caps version ("JA")
-- and capitalized version ("Ja").
for _, replacements in ipairs(data) do
-- sortedPairs saves the list of table keys so that we can modify the table
-- while iterating over it.
for text, replacement in require "Module:table".sortedPairs(replacements) do
replacement = mw.ustring.upper(replacement)
replacements = replacement
replacements = replacement
end
end
return data