Modifiche

⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

Modulo:Fan-pronunciation

147 byte rimossi, 05:34, 2 ott 2018
nessun oggetto della modifica
Riga 51: Riga 51:  
         if not mw.ustring.find(decomposed, acute_or_grave) then
 
         if not mw.ustring.find(decomposed, acute_or_grave) then
 
      -- Allow monosyllabic unstressed words.
 
      -- Allow monosyllabic unstressed words.
     
+
    local vowel_count = select(2, decomposed:gsub("[æaeiou]", "%1"))
 
             transcriptio=mw.ustring.sub(decomposed,-1)
 
             transcriptio=mw.ustring.sub(decomposed,-1)
 
             if transcriptio ~= 'a'or'æ'or'e'or'i'or'o'or'u' then  
 
             if transcriptio ~= 'a'or'æ'or'e'or'i'or'o'or'u' then  
 
             decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1' ..mw.ustring.char(0x301).. '%2')
 
             decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1' ..mw.ustring.char(0x301).. '%2')
             end
+
             elseif vowel_count ~= 1 then
        end
+
            decomposed = mw.ustring.gsub(decomposed,"(" .. vowel .. ")(" .. not_vowel .. "*" .. vowel .. not_vowel .."*)$","%1" ..  mw.ustring.char(0x301) .. "%2")
        local vowel_count = select(2, decomposed:gsub("[æaeiou]", "%1"))
  −
-- Add acute accent on second-to-last vowel.
  −
        if not mw.ustring.find(decomposed, acute_or_grave) then
  −
            if vowel_count ~= 1 then
  −
              decomposed = mw.ustring.gsub(decomposed,"(" .. vowel .. ")(" .. not_vowel .. "*" .. vowel .. not_vowel .."*)$","%1" ..  mw.ustring.char(0x301) .. "%2")
   
             --else  
 
             --else  
 
               --decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1'..mw.ustring.char(0x301)..%2')
 
               --decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1'..mw.ustring.char(0x301)..%2')

Menu di navigazione