Modifiche

⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

Modulo:Headword/templates

55 byte aggiunti, 13:30, 8 mag 2017
allow headers belonging to other scripts to be tagged by simply adding them to a table
Riga 70: Riga 70:  
end
 
end
 
 
-- Script-tags the header in Mongolian-script entries.
+
-- Script-tags the topmost header.
 
local display_title = ""
 
local display_title = ""
 
 
Riga 81: Riga 81:  
mw.log("script of first head = " .. data.sc:getCode())
 
mw.log("script of first head = " .. data.sc:getCode())
 
 
if data.sc and data.sc:getCode() == "Mong" then
+
local to_be_tagged = {
display_title = frame:callParserFunction("DISPLAYTITLE", '<span class="Mong">' .. pagename .. '</span>')
+
["Mong"] = true,
 +
}
 +
 +
if data.sc and to_be_tagged[data.sc:getCode()] then
 +
display_title = frame:callParserFunction("DISPLAYTITLE", '<span class="' .. data.sc:getCode() .. '">' .. pagename .. '</span>')
 
end
 
end
 
 
Utente anonimo

Menu di navigazione