Content deleted Content added
No edit summary |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 6:
local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization
local err_texts = { -- because wrapper templates have Latn/non-Latn text ordered according to the wrapper template's name
['lang-sh-cyrl-latn'] = true, -- this template has |1=cyrl script |2=latn script
}
Line 18 ⟶ 22:
local category = 'Lang and lang-xx';
table.insert (out, table.concat ({'<span style=\"color:#d33\">Error: <span style="font-family: monospace, monospace;">{{', template, '}}</span>: '}));
table.insert (out, msg);
table.insert (out, table.concat ({' ([[Template:
table.insert (out, '</span>');
Line 156 ⟶ 160:
end
if tag:find ('-', 1, true) then
return error_msg_make ('invalid language tag: <
end
if not is_latn then
return error_msg_make ('<span style="font-family: monospace, monospace;"><' .. ((err_texts[template_name:lower()] and 'text2') or 'text1') .. '></span> is not Latin script (pos ' .. pos .. ')', template_name, nocat);
end
if is_latn then
return error_msg_make ('<span style="font-family: monospace, monospace;"><' .. ((err_texts[template_name:lower()] and 'text1') or 'text2') .. '></span> is Latin script (pos ' .. pos .. ')', template_name, nocat);
end
|