Module:Lang/utilities: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 14:
]]
 
local function error_msg_make (msg, template, args)
local out = {};
local category = 'Lang and lang-xx';
Line 146:
local function _lang_x2 (args_t)
if not (args_t[1] and args_t[2] and args_t[3]) then
return error_msg_make ('missing a required argument', 'lang-x2', args);
end
if args_t[1]:find ('-', 1, true) then
return error_msg_make ('invalid language code: <code style="color: inherit; background: inherit; border: none; padding: inherit;">' .. args_t[1] .. '</code>; IETF format not supported', 'lang-x2', args);
end
if not unicode.is_Latin (args_t[2]) then
return error_msg_make ('<code style="color: inherit; background: inherit; border: none; padding: inherit;">&lt;text1></code> is not Latin script', 'lang-x2', args);
end
if unicode.is_Latin (args_t[3]) then
return error_msg_make ('<code style="color: inherit; background: inherit; border: none; padding: inherit;">&lt;text2></code> is Latin script', 'lang-x2', args);
end