Module:languages-oow: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 10: Line 10:
function format_gender(gender)
function format_gender(gender)
local temp = gender
local temp = gender
for code in string.gmatch(gender, "%S+") do
for code in string.gmatch(gender, "[a-z]+") do
gender_obj = assert(available_genders[code], "Invalid gender code detected")
gender_obj = assert(available_genders[code], "Invalid gender code detected")
temp = string.gsub(temp, code, '<abbr title="' .. gender_obj.hint .. '">' .. gender_obj.label .. "</abbr>")
temp = string.gsub(temp, code, '<abbr title="' .. gender_obj.hint .. '">' .. gender_obj.label .. "</abbr>")

Navigation menu