Content deleted Content added
request by User:HouseBlaster |
m sync to live |
||
(39 intermediate revisions by 7 users not shown) | |||
Line 11:
local afd = args["afd"] or args["afd1"] or ""
local merge = args["merge"] or args["merge1"] or ""
local
local text
if (mergedFrom == 'yes') then
text = "The content of"
text = "Text and/or other creative content from"
if not (from_oldid == "") then
text = string.format("%s [%s this version] of", text, tostring(mw.uri.fullUrl(from, {oldid=from_oldid} )))
end
if from then
text = string.format("%s [[%s]]",text,from)▼
if (merge == "yes") or not (afd == "") then▼
else
text = text .. " was merged into"▼
text = text .. '[[]]'
end
▲ if (merge == "yes") or (mergedFrom == "yes") or not (afd == "") then
▲ text = text .. " was [[Wikipedia:Merging|merged]] into"
else
text = text .. " was copied or moved into"
end
if (
to = mw.title.getCurrentTitle().subjectPageTitle.fullText
end
▲ else
▲ end
local diff = args["diff"] or args["diff1"]
local to_diff = args["to_diff"] or args["to_diff1"]
Line 44 ⟶ 53:
end
end
text = text .. "." -- Finish first
text = string.format("%s The former page's [%s history] now serves to [[WP:Copying within Wikipedia|provide attribution]] for that content in the latter page, and it must not be deleted
if (args["talk"] == 'yes' or (mergedFrom == 'yes' and args["talk"] ~= 'no')) then
local fromPage = mw.title.new(from)
local fromTalk = fromPage and fromPage.talkPageTitle.fullText or "Talk:" .. from
text = string.format("%s For the discussion at that ___location, see its [[%s|talk page]].", text, fromTalk)
end
return text
end
Line 52 ⟶ 66:
local text = ""
local afd = args["afd" .. i]
if (afd or args["merge" .. i] or args["mergedFrom"]) then
text = string.format("%s\n*Merged",text)
else
Line 64 ⟶ 78:
if (from_oldid) then
text = string.format("%s[%s oldid], ",text,tostring(mw.uri.fullUrl(from, {oldid = from_oldid} )))
end
local talk = args["talk".. i] or ""
if (talk == "yes" or (args["mergedFrom"] == 'yes' and talk ~= "no")) then
local fromPage = mw.title.new(from)
local fromTalk = fromPage and fromPage.talkPageTitle.fullText or "Talk:" .. from
end
local to = args["to".. i] or ""
if (to == "") then -- If no target given assume current page is the target
▲ text = string.format("%s[%s history]) → [[%s]]",text,tostring(mw.uri.fullUrl(from, {action = "history"} )), to)
to = mw.title.getCurrentTitle().subjectPageTitle.fullText
end
text = string.format("%s[%s history]) → [[:%s]]",text,tostring(mw.uri.fullUrl(from, {action = "history"} )), to)
local diff = args["diff" .. i]
Line 90 ⟶ 114:
end
if (not (args["to_oldid" .. i] or args["to_diff".. i])) then
if (args["mergedFrom"] == 'yes') then
text = string.format("%s[[Category:Wikipedia pages using copied template without oldid]]",text)▼
text = string.format("%s[[Category:Wikipedia pages using merged-from template without oldid]]",text)
else
▲ text = string.format("%s[[Category:Wikipedia pages using copied template without oldid]]",text)
end
end
Line 122 ⟶ 150:
local historyList = list(args)
if (args["collapse"] == 'yes') then
local collapsedText
if (args["mergedFrom"] == 'yes') then collapsedText = '<table style="width:100%%; background: transparent;" class="mw-collapsible mw-collapsed">\n<tr><th> else
collapsedText = '<table style="width:100%%; background: transparent;" class="mw-collapsible mw-collapsed">\n<tr><th>Copied pages:</th></tr>\n<tr><td> %s </td></tr></table>'
end
historyList = string.format(collapsedText, historyList)
end
local mergedFrom
local text = "Text has been copied to or from this %s; see the list below. The source pages now serve to [[WP:Copying within Wikipedia|provide attribution]] for the content in the destination pages and must not be deleted so long as the copies exist. For attribution and to access older versions of the copied text, please see the history links below. %s"▼
local copies
text = string.format(text, pageType, historyList)▼
if (args["mergedFrom"]) then
mergedFrom = "merged into"
copies = "this page"
else
mergedFrom = "copied to or from"
copies = "the copies"
end
▲ local text = "Text has been
▲ text = string.format(text, mergedFrom, pageType, copies, historyList)
return text
end
Line 136 ⟶ 178:
local text = "[[Category:Wikipedia pages using copied template]]"
if ((not from_oldid) or (not to_oldid)) and not multiUsed then
if (args["mergedFrom"] == 'yes') then
text = text .. "[[Category:Wikipedia pages using copied template without oldid]]"▼
text = text .. "[[Category:Wikipedia pages using merged-from template without oldid]]"
else
▲ text = text .. "[[Category:Wikipedia pages using copied template without oldid]]"
end
end
return text
Line 154 ⟶ 200:
local function renderBanner(args)
local image
if args.mergedFrom then
else
image = '[[File:Splitsection.svg|frameless|upright=0.23|link=|alt=]]'
end
return MessageBox.main('tmbox', {
class = "copiednotice",
small = args["small"],
image = image,
▲ image = '[[File:Splitsection.svg|upright=0.23|link=|alt=]]',
text = BannerText(args)
})
|