Modulo:Cs1 documentation support/pagipadasan: Paggiddiatan a nagbaetan dagiti rebision

Content deleted Content added
Linia 670:
local function cat_link_make (cat)
return table.concat ({'[[:Kategoria:', cat, ']]'});
end
 
 
--[[--------------------------< S C R I P T _ C A T _ L I S T E R >--------------------------------------------
 
utility function to get script-language categories
 
]]
 
local lang_list_t = mw.language.fetchLanguageNames ('en', 'all');
local function script_cat_lister (script_lang_codes_t, lang_code_remap_t, cats_list_t)
for _, lang_code in ipairs (script_lang_codes_t) do
local lang_name = lang_code_remap_t[lang_code] or lang_list_t[lang_code]; -- use remap table to get Bengali instead of Bangla and the like; else use standard MediaWiki names
local cat = 'CS1 uses ' .. lang_name .. '-language script (' .. lang_code .. ')'; -- build a category name
cats_list_t[cat] = 1; -- and save it
end
end
 
Line 746 ⟶ 763:
list_live_cats[cat] = 1; -- add to the list
end
 
script_cat_lister (cfg.script_lang_codes, cfg.lang_code_remap, list_live_cats); -- get live module's foriegn language script cats
 
if sandbox then -- if ~/sandbox module exists and |sandbox= not set to 'no'
for _, cat in pairs (sb_cfg.prop_cats) do -- get the livesandbox module's categories
cat = cat:gsub ('|(.*)$', ''); -- strip sort key if any
list_sbox_cats[cat] = 1; -- add to the list
end
 
script_cat_lister (sb_cfg.script_lang_codes, sb_cfg.lang_code_remap, list_sbox_cats); -- get sandbox module's foriegn language script cats
end
else