Module:Lang: Difference between revisions

Content deleted Content added
sync from sandbox;
No edit summary
Line 1,197:
return make_error_msg (msg, args, template);
end
-- TODO: anythis wayappears to make this more lang()-like?work so we canmight in future dispense withinherit_t in Module:Lang/langx
-- retain existing system until {{langx}} has replaced {{lang-??}}
-- if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls
-- if ('latn' == subtags.script) or -- script is latn
-- (this_wiki_lang_tag ~= code and not is_set (subtags.script) and unicode.is_Latin (args.text)) then -- text is not this wiki's language, no script specified and is wholly latn script (auto-italics)
-- args.italic = 'italic'; -- set font-style:italic
-- else
-- args.italic = 'inherit'; -- italic not set; script not latn; inherit current style
-- end
-- end
 
-- TODO: retain this system until {{langx}} has replaced {{lang-??}}
if nil == args.italic then -- args.italic controls
if is_set (subtags.script) then
Line 1,433 ⟶ 1,444:
return _langx (args_t);
-- local inherit_t = mw.loadData ('Module:Lang/langx').inherit_t; -- get list of language tags extracted from the {{lang-??}} template names for languages that are rendered in upright font
-- args_t.code = args_t[1] or args_t.code; -- get the language tag; must be {{{1}}} or |code=
-- args_t[1] = nil; -- unset to mimic {{lang-??}} which set |code=xx
 
-- initial_style_state = inherit_t[args_t.code] and 'inherit' or 'italic'; -- if listed in inherit_t set as 'inherit'; 'italic' else
 
-- return _lang_xx (args_t, 'Langx'); -- and go do it
end