ページ「モジュール:Citation/CS1/Utilities」と「モジュール:Citation/CS1/Utilities/sandbox」の間の差分

(ページ間の差分)
ページ 1
ページ 2
削除された内容 追加された内容
en:Module:Citation/CS1/Utilities oldid=1067249005 より更新
 
add_prop_cat()に暫定処理を追加
 
199行目: 199行目:
local function set_message (error_id, arguments, raw, prefix, suffix)
local function set_message (error_id, arguments, raw, prefix, suffix)
local error_state = cfg.error_conditions[error_id];
local error_state = cfg.error_conditions[error_id];
if error_id:find ('maint_') then -- 日本語版独自:maint系カテゴリを一旦全除去
return;
end
prefix = prefix or '';
prefix = prefix or '';
312行目: 309行目:


local function add_maint_cat (key, arguments)
local function add_maint_cat (key, arguments)
if not added_maint_cats [key] then
--今のところ、ウィキペディア日本語版ではエラーカテゴリでない追跡カテゴリを導入していません
--if not added_maint_cats [key] then
added_maint_cats [key] = true; -- note that we've added this category
table.insert (z.maint_cats_t, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table
--added_maint_cats [key] = true; -- note that we've added this category
end
--table.insert (z.maint_cats_t, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table
--end
end
end


334行目: 330行目:


local function add_prop_cat (key, arguments, key_modifier)
local function add_prop_cat (key, arguments, key_modifier)
if not cfg.prop_cats [key] then -- 暫定: cfg.prop_cats[key]が存在するかどうかを予め確認する
return;
end
local key_modified = key .. ((key_modifier and key_modifier) or ''); -- modify <key> with <key_modifier> if present and not nil
local key_modified = key .. ((key_modifier and key_modifier) or ''); -- modify <key> with <key_modifier> if present and not nil