Module:translations: Difference between revisions

Jump to navigation Jump to search
m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 23: Line 23:
if mw.ustring.match(to_process, "%*[^%*]+%*") then
if mw.ustring.match(to_process, "%*[^%*]+%*") then
local pre = mw.ustring.match(to_process, "^([^%*]+)%*")
local pre = mw.ustring.match(to_process, "^([^%*]+)%*")
local pre_len = 0
local translink = mw.ustring.match(to_process, "%*([^%*]+)%*")
local translink = mw.ustring.match(to_process, "%*([^%*]+)%*")
to_process = mw.ustring.sub(to_process, mw.ustring.len(pre) + mw.ustring.len(translink) + 2)
if pre then pre_len = mw.ustring.len(pre) end
to_process = mw.ustring.sub(to_process, pre_len + mw.ustring.len(translink) + 2)
translink = m_links.full_link{term = translink, language = language}
translink = m_links.full_link{term = translink, language = language}
bytext = bytext .. pre .. translink
bytext = bytext .. pre .. translink

Navigation menu