Module:labels: Difference between revisions

126 bytes removed ,  10 December 2023
m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 35: Line 35:
end
end
l_id = l_data.aliases[l_id] or l_id
l_id = l_data.aliases[l_id] or l_id mw.ustring.gsub(l_id, "(\")([^\"]+)(\")", "</i>[[%2#" .. language.name .. "|%2]]<i>")
local label = l_data.labels[l_id]
local label = l_data.labels[l_id]
if i > 1 then
if i > 1 then
Line 50: Line 50:
if l_id == "/" then
if l_id == "/" then
out = out .. "</i>/<i>"
out = out .. "</i>/<i>"
elseif mw.ustring.find(l_id, "^\"[^%[%]]+\"$") then
local l_id_link = mw.ustring.match(l_id, "\"([^%[%]]+)\"")
out = out .. "</i>[[" .. l_id_link .. "#" .. language.name .. "|" .. l_id_link .. "]]<i>"
else
else
out = out .. l_id
out = out .. l_id