5 517
contributi
Modifiche
nessun oggetto della modifica
word = word:gsub("ğ","ʤ")
end
local decomposed = mw.ustring.toNFD(word) -- Transcriptions must contain an acute or grave, to indicate stress position. -- This does not handle phrases containing more than one stressed word. -- Default to penultimate stress rather than throw error? if not mw.ustring.find(word, acute_or_grave) then -- Allow monosyllabic unstressed words. local vowel_count = select(2, word:gsub("[æaeiou]", "%1")) if vowel_count ~= 1 then -- Add acute accent on second-to-last vowel. word = mw.ustring.gsub(word, "(" .. vowel .. ")(" .. not_vowel .. "*" .. vowel .. not_vowel .. "*)$", "%1" .. mw.ustring.char(0x301) .. "%2") else word=mw.ustring.gsub(word,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1' ..mw.ustring.char(0x301).. '%2') end end local transcription=word return transcriptionend
-- Transcriptions must contain an acute or grave, to indicate stress
-- This does not handle phrases containing more than one stressed word.
local transcription = decomposed
end
function export.show(frame)