Module:rad-pronunciation: Difference between revisions

Added <> alternative pronunciation generation functionality
mNo edit summary
(Added <> alternative pronunciation generation functionality)
Line 110: Line 110:
else
else
temp_arg = mw.ustring.match(temp_arg, "(%[.*%])")
temp_arg = mw.ustring.match(temp_arg, "(%[.*%])")
end
elseif mw.ustring.find(temp_arg, "^%<(.*)%>$") and mode_dialect == "standard" then
temp_arg_match = mw.ustring.match(temp_arg, "^%<(.*)%>$")
temp_arg_ipa = m_rad_IPA.generate({temp_arg_match})
temp_arg_ipa_phon = m_rad_IPA.generate({temp_arg_match, "phon"})
temp_arg_ipa_hj = m_rad_IPA.generate({temp_arg_match, "hj"})
temp_arg_ipa_hj_phon = m_rad_IPA.generate({temp_arg_match, "hj", "phon"})
temp_arg = "/" .. temp_arg_ipa .. "/"
if temp_arg_ipa_phon ~= temp_arg_ipa then
temp_arg = temp_arg .. " [" .. temp_arg_ipa_phon .. "]"
end
if temp_arg_ipa_hj ~= temp_arg_ipa then
temp_arg_hj = "/" .. temp_arg_ipa_hj .. "/"
if temp_arg_ipa_hj_phon ~= temp_arg_hj_ipa then
temp_arg_hj = temp_arg_hj .. " [" .. temp_arg_ipa_hj_phon .. "]"
end
table.insert(IPA["hjádvanþs"][mode_register], temp_arg_hj)
end
end
else
else
temp_arg = "/" .. temp_arg .. "/ "
temp_arg = "/" .. temp_arg .. "/"
end
end
end
end