Module:Lang: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
m (and) |
No edit summary |
||
Line 18: | Line 18: | ||
local maint_cats = {}; -- maintenance categories go here |
local maint_cats = {}; -- maintenance categories go here |
||
local maint_msgs = {}; -- and their messages go here |
|||
Line 192: | Line 193: | ||
if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym |
if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym |
||
table.insert (maint_cats, {'Lang and lang-xx code promoted to ISO 639-1', code}); |
table.insert (maint_cats, table.concat ({'Lang and lang-xx code promoted to ISO 639-1|', code})); |
||
table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code][1]})); |
|||
code = synonym_table[code][1]; -- use the synonym |
code = synonym_table[code][1]; -- use the synonym |
||
end |
end |
||
Line 568: | Line 570: | ||
table.insert (out, make_text_span (args.code, args.text, args.rtl, args.italic, args.size)); |
table.insert (out, make_text_span (args.code, args.text, args.rtl, args.italic, args.size)); |
||
table.insert (out, make_category (code, language_name, args.nocat)); |
table.insert (out, make_category (code, language_name, args.nocat)); |
||
if 0 < #maint_msgs then |
|||
table.insert (out, table.concat ({'<span class="lang-comment" style="display:none; color:#33aa33; margin-left:0.3em">'})); |
|||
for _, msg in ipairs (maint_msgs) do |
|||
table.insert (out, table.concat ({msg, ' '})); |
|||
end |
|||
table.insert (out, '</span>'); |
|||
end |
|||
if 0 < #maint_cats then |
if 0 < #maint_cats then |
||
for _, |
for _, cat in ipairs (maint_cats) do |
||
table.insert (out, table.concat ({'[[Category:', |
table.insert (out, table.concat ({'[[Category:', cat, ']]'})); |
||
end |
end |
||
end |
end |