Modul:Lang: Perbezaan antara semakan

Kandungan dihapus Kandungan ditambah
kTiada ringkasan suntingan
kemaskini
Baris 826:
 
if args[1] and args.code then
return make_error_msg ('conflicting: {{{1}}} and |code=', args, 'lang'template);
else
args.code = args[1] or args.code; -- prefer args.code
Baris 832:
 
if args[2] and args.text then
return make_error_msg ('conflicting: {{{2}}} and |text=', args, 'lang'template);
else
args.text = args[2] or args.text; -- prefer args.text
Baris 851:
 
if msg then
return make_error_msg ( msg, args, 'lang'template);
end
 
args.italic, msg = validate_italic (args);
if msg then
return make_error_msg (msg, args, 'lang'template);
end
 
Baris 1,159:
initial_style_state = 'inherit';
return _lang_xx (frame);
end
 
 
--[[--------------------------< I S _ I E T F _ C O D E >------------------------------------------------------
 
Returns true when a language name associated with IETF language tag exists; nil else.
 
All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function.
 
The purpose of this function is to replace {{#ifexist:Template:ISO 639 name xx|<exists>|<does not exist>}} in
templates that are better served by using {{#invoke:lang|name_from_code|<code>}}
 
]]
 
local function is_ietf_code (frame)
return get_ietf_parts (frame.args[1]) and true;
end
 
Baris 1,289 ⟶ 1,305:
return {
lang = lang, -- entry point for {{lang}}
is_ietf_code = is_ietf_code,
lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}}
lang_xx_italic = lang_xx_italic,