Module:translations: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 29: Line 29:
local pre = mw.ustring.match(to_process, "^([^%*]+)%*") or ""
local pre = mw.ustring.match(to_process, "^([^%*]+)%*") or ""
local translink = mw.ustring.match(to_process, "%*([^%*]+)%*")
local translink = mw.ustring.match(to_process, "%*([^%*]+)%*")
local translink_alt
if mw.ustring.find(translink, "[^%:]+%:[^%:]+") then
translink, translink_alt = mw.ustring.match(translink, "([^%:]+)%:([^%:]+)")
else
translink_alt = nil
end
to_process = mw.ustring.sub(to_process, mw.ustring.len(pre) + mw.ustring.len(translink) + 3)
to_process = mw.ustring.sub(to_process, mw.ustring.len(pre) + mw.ustring.len(translink) + 3)
translink = m_links.full_link{term = translink, 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
else
else

Navigation menu