Module:IPA: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
Tag: Manual revert
No edit summary
Line 18: Line 18:
local correspondences = mw.loadData("Module:IPA/SAMPA")
local correspondences = mw.loadData("Module:IPA/SAMPA")


ipa = mw.ustring.gsub(ipa, "'''", "ʹʹ")
ipa = mw.ustring.gsub(ipa, "''", "ʹ")
for from, to in pairs(correspondences) do
for from, to in pairs(correspondences) do
ipa = mw.ustring.gsub(ipa, "'''", "ʹʹ")
ipa = mw.ustring.gsub(ipa, "''", "ʹ")
ipa = mw.ustring.gsub(ipa, "([^%#])" .. from, "%1" .. to)
ipa = mw.ustring.gsub(ipa, "([^%#])" .. from, "%1" .. to)
ipa = mw.ustring.gsub(ipa, "^" .. from, to)
ipa = mw.ustring.gsub(ipa, "^" .. from, to)
ipa = mw.ustring.gsub(ipa, "ʹʹ", "'''")
ipa = mw.ustring.gsub(ipa, "ʹ", "''")
end
end
ipa = mw.ustring.gsub(ipa, "ʹʹ", "'''")
ipa = mw.ustring.gsub(ipa, "ʹ", "''")
ipa = mw.ustring.gsub(ipa, "%#", "")
return ipa
return ipa
end
end