Content deleted Content added
No edit summary |
some simplifications |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 68:
args_t.fontsize - deprecated alias of |parensize=
args_t.nolink - any value inhibits wikilinking of language name
args_t.suppress_empty_list_error - when set to 'yes', suppresses an 'empty' error message; mostly for use within another template
this function calls these functions in Module:lang:
Line 116 ⟶ 118:
if args_t.nolink then
table.insert (out_t, table.concat ({'(', lang_module._name_from_tag ({args_t[1], ['template']=template}), ')'}));
else
▲ if lang_module._is_ietf_tag (args_t[1]) then
▲ table.insert (out_t, table.concat ({'(', lang_module._name_from_tag ({args_t[1], ['link'] ='yes', ['template']=template}), ')'}));
else▼
▲ table.insert (out_t, '(language?)'); -- TODO: any reason to keep this?
end
Line 161:
also supports:
args_t.postfixn - wikitext to be appended to list item n (references other appropriate text)
args_t.suppress_empty_list_error - when set to 'yes', suppresses an 'empty list' error message; mostly for use within another template
]]
Line 193 ⟶ 194:
for _, n in ipairs (enumerators_t) do -- loop through the sorted enumerators
table.insert (list_t, table.concat ({
_native_name ({ -- go render the native name
args_t['tag'..n],
Line 206:
['template'] = 'native name list', -- for error messaging
['index'] = n, -- for error messaging
args_t['postfix'..n] or '',
}));
end
if 0
return (yes_no (args_t.suppress_empty_list_error) and '') or -- return empty string when error suppressed▼
if 1 < #list_t then▼
return require ('Module:List').unbulleted (list_t); -- use unbulleted list from module
▲ return (yes_no (args_t.suppress_empty_list_error) and '') or -- return empty string
▲ error_msg (messages_t.empty_list, 'native name list'); -- error message else
end
end
Line 275 ⟶ 268:
return table.concat ({value, error_msg (messages_t.malformed_param, 'native name checker')}, ' '); -- no {{lang}} or {{native_name}} template
end
if 1 < count
and value:find ('</div>$'))
then return table.concat ({value, error_msg (messages_t.list_markup, 'native name checker')}, ' '); end
|