Module:translations: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
 
Line 30: Line 30:
local translink = mw.ustring.match(to_process, "%*([^%*]+)%*")
local translink = mw.ustring.match(to_process, "%*([^%*]+)%*")
local translink_alt
local translink_alt
to_process = mw.ustring.sub(to_process, mw.ustring.len(pre) + mw.ustring.len(translink) + 3)
if mw.ustring.find(translink, "[^%:]+%:[^%:]+") then
if mw.ustring.find(translink, "[^%:]+%:[^%:]+") then
translink, translink_alt = mw.ustring.match(translink, "([^%:]+)%:([^%:]+)")
translink_alt, translink = mw.ustring.match(translink, "([^%:]+)%:([^%:]+)")
else
else
translink_alt = nil
translink_alt = nil
end
end
to_process = mw.ustring.sub(to_process, mw.ustring.len(pre) + mw.ustring.len(translink) + 3)
translink = m_links.full_link{term = translink, alt = translink_alt, language = tr_language, nobold = true}
translink = m_links.full_link{term = translink, alt = translink_alt, language = tr_language, nobold = true}
bytext = bytext .. pre .. translink
bytext = bytext .. pre .. translink