Module:also: Difference between revisions

m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
mNo edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 6: Line 6:
function export.codify(text) --removes diacritics and non-alphanumeric characters, converts to upper case
function export.codify(text) --removes diacritics and non-alphanumeric characters, converts to upper case
text = mw.ustring.toNFC(text)
text = mw.ustring.toNFC(text)
text = mw.ustring.gsub(text,"[ÁÀÂÄǍĂĀÃÅĄ]","A")
text = mw.ustring.lower(text)
text = mw.ustring.gsub(text,"[ÆǢǼ]","Ae")
text = mw.ustring.gsub(text,"[ĆĊĈČÇ]","C")
text = mw.ustring.gsub(text,"[ĎĐḌÐḐ]","D")
text = mw.ustring.gsub(text,"[ÉÈĖÊËĚĔĒẼĘẸƐƎƏỀỂỄẾỆ]","E")
text = mw.ustring.gsub(text,"[ĠĜĞĢ]","G")
text = mw.ustring.gsub(text,"[ĤĦḤ]","H")
text = mw.ustring.gsub(text,"[İÍÌÎÏǏĬĪĨĮỊ]","I")
text = mw.ustring.gsub(text,"[Ĵ]","J")
text = mw.ustring.gsub(text,"[Ķ]","K")
text = mw.ustring.gsub(text,"[ĹĿĽĻŁḶḸ]","L")
text = mw.ustring.gsub(text,"[Ṃ]","M")
text = mw.ustring.gsub(text,"[ŃŇÑŅṆŊ]","N")
text = mw.ustring.gsub(text,"[ÓÒÔÖǑŎŌÕǪỌŐØƆ]","O")
text = mw.ustring.gsub(text,"[Œ]","Oe")
text = mw.ustring.gsub(text,"[ŔŘŖṚṜꝚⱤɌƦȐȒṘ]","R")
text = mw.ustring.gsub(text,"[ŚŜŠŞȘṢ]","S")
text = mw.ustring.gsub(text,"[ŤŢȚṬ]","T")
text = mw.ustring.gsub(text,"[Þ]","Th")
text = mw.ustring.gsub(text,"[ÚÙÛÜǓŬŪŨŮŲỤŰǗǛǙǕ]","U")
text = mw.ustring.gsub(text,"[Ŵ]","W")
text = mw.ustring.gsub(text,"[ÝŶŸỸȲ]","Y")
text = mw.ustring.gsub(text,"[ŹŻŽ]","Z")
text = mw.ustring.gsub(text,"[áàâäǎăāãåąắăằắẳẵặâầẩẫấậả]","a")
text = mw.ustring.gsub(text,"[áàâäǎăāãåąắăằắẳẵặâầẩẫấậả]","a")
text = mw.ustring.gsub(text,"[æǣǽ]","ae")
text = mw.ustring.gsub(text,"[æǣǽ]","ae")