「モジュール:Citation/CS-ja」の版間の差分
削除された内容 追加された内容
パターンマッチングの不具合を修正 |
暫定的にeditorsとcoauthorsに対応させる。|ref=harvを許可し、メンテナンスカテゴリを付与するようにする。その他変更。 |
||
1,296行目:
end
if proj then
proj = ({['d'] = '
if proj then
one = one .. utilities.wrap_style ('interproj', proj); -- add resized leading space, brackets, static text, language name
2,646行目:
elseif 3 == selected then
Authors = A['Authors']; -- use content of |authors=
--if 'authors' == A:ORIGIN('Authors') then -- but add a maint cat if the parameter is |authors=
-- utilities.set_message ('maint_authors'); -- because use of this parameter is discouraged; what to do about the aliases is a TODO:
--end
end
if utilities.is_set (Collaboration) then
2,659行目:
do -- to limit scope of selected
local selected = select_author_editor_source (A['Veditors'],
if 1 == selected then
e, editor_etal = extract_names (args, 'EditorList'); -- fetch editor list from |editorn= / |editor-lastn= / |editor-firstn=, |editor-linkn=, and |editor-maskn=
2,665行目:
NameListStyle = 'vanc'; -- override whatever |name-list-style= might be
e, editor_etal = parse_vauthors_veditors (args, args.veditors, 'EditorList'); -- fetch editor list from |veditors=, |editor-linkn=, and |editor-maskn=
elseif 3 == selected then
Editors = A['Editors']; -- |editors=の値を使用する
--utilities.set_message ('maint_editors');
end
end
3,154 ⟶ 3,157行目:
local PublicationDate = A['PublicationDate'];
local Year = A['Year'];
-- 日本語版独自: month引数に暫定対応▼
do▼
local Month = A['Month'];▼
if utilities.is_set (Month) then▼
local m = mw.ustring.match(Month, '^(%d%d?)月?$');▼
if utilities.is_set (Year) then▼
y = mw.ustring.match(Year, '^(%d%d%d%d?)[a-z年]?$');▼
end▼
if utilities.is_set (Date) and not utilities.is_set (y) then▼
end▼
if utilities.is_set (y) then▼
Date = y .. '年' .. m ..'月';▼
end▼
end▼
end▼
if not utilities.is_set (Date) then
3,185 ⟶ 3,170行目:
else
Date_origin = A:ORIGIN('Date'); -- not a promotion; name required for error messaging
▲ end
▲ -- 日本語版独自: month引数に暫定対応
▲ do
▲ local Month = A['Month'];
▲ if utilities.is_set (Month) then
▲ local m = mw.ustring.match(Month, '^(%d%d?)月?$');
utilities.set_message ('maint_month'); -- メンテナンスカテゴリを付与する
if utilities.is_set (suffix) and '年' ~= suffix then -- Dateの末尾にアルファベットの接尾辞があれば
Year = Date; -- Dateを上書きする前に、Yearにコピーする
end
▲ Date = y .. '年' .. m ..'月';
▲ end
▲ end
▲ end
end
3,507 ⟶ 3,510行目:
utilities.set_message ('maint_overridden_setting'); -- set a maint message
end
do -- 日本語版独自処理
local Coauthors = A['Coauthors'];
Coauthors, author_etal = name_has_etal (Coauthors, author_etal, true);
table.insert(a, { last = Coauthors });
▲ end
end
last_first_list = list_people (control, a, author_etal);
4,233 ⟶ 4,244行目:
options_t.class = cite_class_attribute_make (config.CitationClass, Mode);
-- 日本語版独自: 当面の間|ref=harvを許可する
--local Ref = is_valid_parameter_value (A['Ref'], A:ORIGIN('Ref'), cfg.keywords_lists['ref'], nil, true); -- nil when |ref=harv; A['Ref'] else
local Ref = A['Ref']
if utilities.in_array (Ref, cfg.keywords_lists['ref']) then -- |ref=harvが指定されていれば
utilities.set_message ('maint_ref_harv'); -- メンテナンスカテゴリを付与する
Ref = nil; -- デフォルトのアンカーを生成するようにする
end
if 'none' ~= cfg.keywords_xlate[(Ref and Ref:lower()) or ''] then
|