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

削除された内容 追加された内容
モジュール:Citation/CS1 oldid=75568205 よりコピー
タグ: サイズの大幅な増減
-コメント
(同じ利用者による、間の14版が非表示)
3,173行目:
------------------------------------ totally unrelated data
if is_set(Via) then
if is_set(ArchiveDate) then
Via = " " .. wrap_msg ('via', Via);
else
Via = sepc .. " " .. wrap_msg ('via', Via);
end
end
 
3,190 ⟶ 3,194行目:
 
if is_set(AccessDate) then
local retrv_text = " " .. cfg.messages['retrieved'];
 
AccessDate = nowrap_date (AccessDate); -- wrap in nowrap span if date in appropriate format
3,196 ⟶ 3,200行目:
AccessDate = substitute (retrv_text, AccessDate); -- add retrieved text
 
if is_set(Via) then
AccessDate = substitute (cfg.presentation['accessdate'], {sepc"", AccessDate}); -- allow editors to hide accessdates
elseif is_set(ArchiveDate) then
AccessDate = substitute (cfg.presentation['accessdate'], {"。", AccessDate}); -- allow editors to hide accessdates
else
AccessDate = substitute (cfg.presentation['accessdate'], {" " .. sepc, AccessDate}); -- allow editors to hide accessdates
end
end
3,217 ⟶ 3,227行目:
Quote = Quote:sub(2,-2); -- strip them off
end
if is_set(ArchiveDate) or is_set(Via) or is_set(AccessDate) or is_set(Lay) then
Quote = sepc .." " .. wrap_style ('quoted-text', Quote ); -- wrap in <q>...</q> tags
Quote = "。" .. wrap_style ('quoted-text', Quote ); -- wrap in <q>...</q> tags
else
Quote = sepc .." " .. wrap_style ('quoted-text', Quote ); -- wrap in <q>...</q> tags
end
PostScript = ""; -- cs1|2 does not supply terminal punctuation when |quote= is set
end
3,238 ⟶ 3,252行目:
if sepc ~= "." then arch_text = arch_text:lower() end
if in_array (DeadURL, {'unfit', 'usurped', 'bot: unknown'}) then
Archived = sepc .. " " .. 'Archived from the original on 'ArchiveDate .. ArchiveDate'時点のオリジナルよりアーカイブ'; -- format already styled
if 'bot: unknown' == DeadURL then
add_maint_cat ('bot:_unknown'); -- and add a category if not already added
3,268 ⟶ 3,282行目:
LaySource = "";
end
if sepcis_set(ArchiveDate) ==or '.'is_set(AccessDate) then
Lay = sepc .. " " .. external_link( LayURL, cfg.messages['lay summary'], A:ORIGIN('LayURL'), nil ) .. LayFormat .. LaySource .. LayDate;
else
Lay = sepc .. " " .. external_link( LayURL, cfg.messages['lay summary']:lower(), A:ORIGIN('LayURL'), nil ) .. LayFormat .. LaySource .. LayDate;
end
elseif is_set (LayFormat) then -- Test if |lay-format= is given without giving a |lay-url=
Lay = sepc .. LayFormat; -- if set and LayURL not set, then LayFormat has error message
end
 
3,365 ⟶ 3,379行目:
end
local idcommon = safe_join( { ID_list, URL, Archived, AccessDateVia, ViaAccessDate, SubscriptionRequired, Lay, Quote }, sepc"。" ); --日本語版独自の変更:ViaをAccessDateの前に置くほうが自然
local text;
local pgtext = Position .. Sheet .. Sheets .. Page .. Pages .. At;
3,441 ⟶ 3,455行目:
text = safe_join( {text, sepc}, sepc ); --Deals with italics, spaces, etc.
text = text:sub(1,-sepc:len()-1);
elseif not is_set(Quote) and mw.ustring.len(idcommon) > 0 then
end
text = safe_join( {text, sepc}, sepc ); --Deals with italics, spaces, etc.
text = text:sub(1,-sepc:len()-1);
PostScript = '。';
end
text = safe_join( {text, PostScript}, sepc );