Modifiche

⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

Modulo:Fan-accento

836 byte rimossi, 05:18, 3 ott 2018
nessun oggetto della modifica
Riga 29: Riga 29:  
           word = word:gsub("ğ","ʤ")     
 
           word = word:gsub("ğ","ʤ")     
 
         end
 
         end
         local decomposed = mw.ustring.toNFD(word)
+
         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 transcription
  −
end
  −
 
  −
   
-- Transcriptions must contain an acute or grave, to indicate stress
 
-- Transcriptions must contain an acute or grave, to indicate stress
 
-- This does not handle phrases containing more than one stressed word.
 
-- This does not handle phrases containing more than one stressed word.
Riga 79: Riga 57:  
local transcription = decomposed
 
local transcription = decomposed
   −
 
+
end
    
function export.show(frame)
 
function export.show(frame)

Menu di navigazione