Content deleted Content added
No edit summary |
No edit summary |
||
Line 1:
require ('Module:No globals');
--[[--------------------------< I S _ C J K >------------------------------------------------------------------▼
]]▼
local function is_cjk_code (code)▼
end▼
local is_latn = require ("Module:Unicode data").is_Latin;▼
end▼
end▼
Line 371 ⟶ 328:
end
▲--[[--------------------------<
support for {{Category articles containing non-English-language text}} that tests the language parameters provided
to that template against the category name.
{{#invoke:Lang/utilities/sandbox|cat_test}}
▲]]
local args = require ('Module:Arguments').getArgs (frame);
local err = false; -- boolean set true when an error is detected; one error message only
local cat_page_title = mw.title.getCurrentTitle(); -- get the category title
for i, v in ipairs (args) do
if lang_module._is_ietf_tag (v) then
lang_name = lang_module._name_from_tag (v); -- is a tag so get the language name
else
lang_name = v;
▲ end
if not mw.ustring.find (cat_page_title, lang_name, 1, true) then
err = true;
end
▲ end
return err and '<span style=\"font-size:100%; font-style:normal;\" class=\"error\">error: template / category title language mismatch</span>[[Category:Lang and lang-xx template errors]]' or nil;
▲end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
Line 381 ⟶ 367:
nihongo3 = nihongo3,
nihongo_foot = nihongo_foot,
cat_test = cat_test,
}
|