Module:Lang: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
No edit summary |
||
Line 339: | Line 339: | ||
if not (code and script and region and variant) then |
if not (code and script and region and variant) then |
||
return make_error_msg (table.concat ({'lang: unknown language code: ', args.code or 'missing'}), args.no_cat); |
|||
-- if 0 ~= namespace then -- only categorize in article space |
|||
-- table.insert (out, '[[Category:lang and lang-xx template errors'); |
|||
⚫ | |||
-- table.insert (out, '|' .. args.code); -- add a sort key |
|||
-- end |
|||
-- table.insert (out, ']]'); |
|||
⚫ | |||
return table.concat (out); -- emit an error message and category |
|||
end |
end |
||
⚫ | |||
return make_error_msg ('lang: no text', args.no_cat); |
|||
⚫ | |||
if lang_data.override[code] then |
if lang_data.override[code] then |
||
language_name = lang_data.override[code][1] |
language_name = lang_data.override[code][1] |
||
Line 400: | Line 395: | ||
if not (code and script and region and variant) then |
if not (code and script and region and variant) then |
||
return make_error_msg (table.concat ({'lang-xx: unknown language code: ', args.code or 'missing'}), args.no_cat); |
|||
-- if 0 ~= namespace then -- only categorize in article space |
|||
-- table.insert (out, '[[Category:lang and lang-xx template errors'); |
|||
⚫ | |||
-- table.insert (out, '|' .. args.code); -- add a sort key |
|||
-- end |
|||
-- table.insert (out, ']]'); |
|||
⚫ | |||
return table.concat (out); -- emit an error message and category |
|||
end |
end |
||
⚫ | |||
return make_error_msg ('lang-xx: no text', args.no_cat); |
|||
⚫ | |||
if lang_data.override[code] then |
if lang_data.override[code] then |
||
language_name = lang_data.override[code][1] |
language_name = lang_data.override[code][1] |
||
Line 442: | Line 432: | ||
table.insert (out, translit); |
table.insert (out, translit); |
||
else |
else |
||
return make_error_msg (table.concat ({'lang-xx: invalid translit std: \'', args.std or 'missing', '\' or script: \'', args.script or 'missing', '\''}), args.nocat); |
|||
end |
end |
||
end |
end |