Template talk:Copied
| This template was considered for merging with Template:Merged-from on 12 March 2025. The result of the discussion was "keep". |
| Template:Copied is indefinitely protected from editing as it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
Text has been copied to or from this page; see the list below. The source pages now serve to provide attribution for the content in the destination pages and must not be deleted as long as the copies exist. For attribution and to access older versions of the copied text, please see the history links below.
|
Backend rewrite
[edit]This edit request to Module:Copied has been answered. Set the |answered= parameter to no to reactivate your request. |
I have made some modifications to the module so as to invoke it from {{merged-from}} (for reasons detailed at request link in the hatnote).
The only change that should affect normal {{Copied}} usage is the to parameters will now default to the page the template is invoked on (I previously requested this at #Merged-from nesting). I have also added talk parameters which link to the froms' talk pages, it defaults off (so no change unless explicitly desired).
Other than those modifications, the rest are basically aesthetic to match the language of the current {{merged-from}} (they only apply when invoked from the rewritten merged-from - I use a meta-parameter mergedFrom which shouldn't be used manually). (I also distinguished Category:Wikipedia pages using merged-from template without oldid, which might be unnecessary.) Tule-hog (talk) 03:42, 2 April 2025 (UTC)
- @Tule-hog: at the risk of scope creep: your thoughts on backend rewrites of other WP:CWW-adjacent templates, like {{split}} or {{merge-to}}? (Non-template editor comment three weeks later) Rotideypoc41352 (talk · contribs) 04:20, 25 April 2025 (UTC)
- Those templates are for proposals, whereas
{{merged-from}}is for completed merges (note merged-from is the target of{{merged}}, so usable on source pages as well as destinations; however, use on a source page requires explicitly setting to & from, since 'to' defaults to the transcluding page). - Looks like they both already support multiple articles per banner, so I have no improvements for those in mind. Tule-hog (talk) 17:27, 25 April 2025 (UTC)
- Ah, sorry, @Tule-hog, I meant {{split article}} and {{merged-to}} (with a "d". I am sparing {{afd-merged-from}} for now because I'm not sure how much Module:Copied would have to change for that one). Thanks! Rotideypoc41352 (talk · contribs) 20:22, 25 April 2025 (UTC)
- Those do seem like they could potentially benefit from unifying with Module:Copied, but I'll hold off to see if this initial request goes through. Tule-hog (talk) 23:15, 25 April 2025 (UTC)
- Ah, sorry, @Tule-hog, I meant {{split article}} and {{merged-to}} (with a "d". I am sparing {{afd-merged-from}} for now because I'm not sure how much Module:Copied would have to change for that one). Thanks! Rotideypoc41352 (talk · contribs) 20:22, 25 April 2025 (UTC)
- Those templates are for proposals, whereas
- I see quite a few differences on Template:Merged-from/testcases. Can you confirm all these changes are intentional? — Martin (MSGJ · talk) 07:18, 6 May 2025 (UTC)
- Yep, all intentional (see corresponding request for justification). Importantly though, it should be completely backwards compatible - the exact same information should be displayed when invoked with the original template arguments (with minor aesthetic differences, which could be eliminated if desired); tested on transclusions and verified existing parameters. Tule-hog (talk) 15:51, 6 May 2025 (UTC)
- Okay, sorry this has taken so long to be looked at, but I intend to implement this tomorrow (assuming no one else beats me to it!) — Martin (MSGJ · talk) 21:24, 6 May 2025 (UTC)
- /me nudges @MSGJ. Izno (talk) 23:43, 23 May 2025 (UTC)
Done. Apologies again to Tule-hog that this has taken two months to complete. Please let me know if you need further help — Martin (MSGJ · talk) 13:08, 2 June 2025 (UTC)
- /me nudges @MSGJ. Izno (talk) 23:43, 23 May 2025 (UTC)
- Okay, sorry this has taken so long to be looked at, but I intend to implement this tomorrow (assuming no one else beats me to it!) — Martin (MSGJ · talk) 21:24, 6 May 2025 (UTC)
- Yep, all intentional (see corresponding request for justification). Importantly though, it should be completely backwards compatible - the exact same information should be displayed when invoked with the original template arguments (with minor aesthetic differences, which could be eliminated if desired); tested on transclusions and verified existing parameters. Tule-hog (talk) 15:51, 6 May 2025 (UTC)
Edit request 8 July 2025
[edit]This edit request to Module:Copied has been answered. Set the |answered= parameter to no to reactivate your request. |
Description of suggested change: In module, change "was" to "were" when mergedFrom == "yes". This is because "contents" which the mergedFrom adds in line 16 should take a plural verb. Diff:
| − | if (merge == "yes") or (mergedFrom == "yes") or not (afd == "") then | + | if (merge == "yes") or (mergedFrom == "yes") or not (afd == "") then
if (mergedFrom == "yes") then
text = text .. " were"
else
text = text .. " was"
end
text = text .. " [[Wikipedia:Merging|merged]] into"
else
text = text .. " was copied or moved into"
end |
Bensci54 (talk) 16:35, 8 July 2025 (UTC)
- To editor Bensci54: that word "contents" is one of those special English words that may be very confounding for those who learn English as a second or third language, and even so sometimes for native English speakers. "Contents" can act as both a plural noun and as a singular noun, a synonym, for the word "content". So a sentence like "The contents was merged," is correct usage. The word "contents" has been changed to "content" on line 16 of the module. In my humble opinion that is the best way to dispel confusion, as well as being consistent with the rest of the text in the template. P.I. Ellsworth , ed. put'er there 22:37, 8 July 2025 (UTC)
- From what I can tell from some googling, singular contents is an edge case and is only valid if used in reference to a "table of contents" so you can say "The contents of the document is on page 3" and that is valid, but you can't say "The contents of my suitcase is missing." Regardless, singular content is acceptable here and does avoid making the code more complex, so I am okay with your solution. However, note that {{merged-to}} uses the phrasing "the contents were merged." Since it would be good for them to align in phrasing, I will put in a request to have that one changed to "the content was" to align. Bensci54 (talk) 16:27, 10 July 2025 (UTC)
Template-protected edit request on 21 July 2025 fix broken wikitext in wikipedia talk namespace
[edit]This edit request to Module:Copied has been answered. Set the |answered= parameter to no to reactivate your request. |
Please apply Special:Diff/1301656057.
This fixes the talk page link being broken wikitext on the page Wikipedia talk:Hatnote. I did this by using the proper properties of mw:Extension:Scribunto/Lua_reference_manual#Title_objects instead of messing with strings. 174.138.212.166 (talk) 01:36, 21 July 2025 (UTC)
Done with a small change so that Template:Merged-from isn't left displaying a lua error. Aidan9382 (talk) 07:37, 21 July 2025 (UTC)
Bug report
[edit]The diff link fails to parse in Talk:List of Genshin Impact characters. SuperGrey (talk) 12:26, 4 November 2025 (UTC)
|diff=is used for providing an exact url to a diff, and|to_diff=/|to_oldid=are used for providing IDs for the module to automatically make the link with, and those won't be used if|diff=is specified. I've simply removed those parameters since this template doesn't seem to have a parameter for "edit that removed the copied content from the other page". Aidan9382 (talk) 12:48, 4 November 2025 (UTC)- Thanks for explanation! SuperGrey (talk) 12:52, 4 November 2025 (UTC)
Edit request, 28 February 2026
[edit]This edit request to Module:Copied has been answered. Set the |answered= parameter to no to reactivate your request. |
Please make the changes below to the code of this template's module. This will ensure that text in the template will display properly when it is set to collapse. See this talk page to view the implemented fix, I've temporarily set it to use the sandbox; compare it with this earlier version of the same page, where you can see the display issue.
You can also copypaste from the sandbox if it's easier. Newbzy (talk) 07:18, 28 February 2026 (UTC)
| − | collapsedText = '<table style="width:100%%; background: | + | collapsedText = '<table style="width:100%%; background: transparent; color: inherit !important;" class="mw-collapsible mw-collapsed">\n<tr><th><span style="color: inherit !important;">Merged pages:</span></th></tr>\n<tr><td style="color: inherit !important;"> %s </td></tr></table>'
else
collapsedText = '<table style="width:100%%; background: transparent; color: inherit !important;" class="mw-collapsible mw-collapsed">\n<tr><th><span style="color: inherit !important;">Copied pages:</span></th></tr>\n<tr><td style="color: inherit !important;"> %s </td></tr></table>' |
- I don't see a difference on my computer between the [earlier version] and your [sandbox fix]. What exactly is it that this edit fixes? Could this be a browser issue? I use Chrome on a Windows platform. (I also wondered about that in connection with the dark mode issue you asked about earlier on my talk page.) P.I. Ellsworth , ed. – welcome! – 12:08, 28 February 2026 (UTC)
- I'm using Edge on a Windows 11 laptop, but I tried installing Chrome and I still have the problem. This is so strange... I have fixed dark mode colouring before, notably on this requested edit to {{refideas}} and for a lot of the Featured list pages.
- I'm just speculating here, but it is possible you have some common.js/common.css code fixing it for you, or have some Wikipedia extension (or third-party program) modifying pages that you view? Newbzy (talk) 12:25, 28 February 2026 (UTC)
- Yes that's possible. So does this mean that you also use Google Chrome browser in Windows? or do you use a different browser or possibly a different platform? P.I. Ellsworth , ed. – welcome! – 12:30, 28 February 2026 (UTC)
- I'm just speculating here, but it is possible you have some common.js/common.css code fixing it for you, or have some Wikipedia extension (or third-party program) modifying pages that you view? Newbzy (talk) 12:25, 28 February 2026 (UTC)
- Nope, this is a new laptop and I'd turned over completely to Microsoft Edge some time ago on my old laptop (better RAM efficiency than Chrome, or so I've heard). I only just installed Chrome within the hour to test if the dark mode issues aren't present on that browser, but there's no difference for me.
- I also tried your common.css and it's pretty cool... safe to say it doesn't seem to be what's causing the difference in what we're seeing. Newbzy (talk) 13:04, 28 February 2026 (UTC)
- It is required that both
backgroundandcoloris present for the dark mode. But why inherit and important? Can you be sure what the table inherits from? And also why you settdto inherit color fromtr, when tr doesn't seem to have color? Nux (talk) 12:30, 28 February 2026 (UTC)
- Well, to run you through the steps I took to achieve this code alteration, I first fixed the colour of the heading and the text that appears when the template is collapsed. The code changes up to that point:
| − | collapsedText = '<table style="width:100%%; background: | + | collapsedText = '<table style="width:100%%; background: transparent; color: inherit !important;" class="mw-collapsible mw-collapsed">\n<tr><th style="color: inherit !important;">Merged pages:</th></tr>\n<tr><td style="color: inherit !important;"> %s </td></tr></table>'
else
collapsedText = '<table style="width:100%%; background: transparent; color: inherit !important;" class="mw-collapsible mw-collapsed">\n<tr><th style="color: inherit !important;">Copied pages:</th></tr>\n<tr><td style="color: inherit !important;"> %s </td></tr></table>' |
- But then I realised that the [show] button was having problems, it was going white like the rest of the text even though, one, it was displaying properly already, and two, it needed to retain blue colouring for the actual "show" text. To fix that, I excluded the ".mw-collapsible" toggle from inheriting by wrapping only the heading text in a span that inherits colour, instead of the whole "<th>".
- Also, could you please tell us, is the display issue occurring for you in your UI? Take a look at the template on this page, before and after. Newbzy (talk) 12:53, 28 February 2026 (UTC)
- @Newbzy Yes, I do see the problem on the collapsed testcase. I'm just not sure if you really need important there, it shouldn't be needed. Did you check if all of the changes are needed? Using important is typically last resort.
- BTW. The problems/guidelines are describe here: mw:Recommendations_for_night_mode_compatibility_on_Wikimedia_wikis#Always_define_color_when_defining_background. You might want to look at: mw:Recommendations_for_night_mode_compatibility_on_Wikimedia_wikis#Avoid_using_background:_none_or_background:_transparent Nux (talk) 14:20, 28 February 2026 (UTC)
- @Newbzy let me know if the new sandbox works for you (e.g. on Template:Copied/testcases). If it does I can apply changes. Nux (talk) 14:37, 28 February 2026 (UTC)
- Also, could you please tell us, is the display issue occurring for you in your UI? Take a look at the template on this page, before and after. Newbzy (talk) 12:53, 28 February 2026 (UTC)
- Apologies, I had to go to bed. Yep, on that testcases page, the sandbox version of the banner is displaying properly – but that's because it's set to use the sandbox module, which I edited to use the changes above. Would you like me to try and reduce/remove the use of important before we implement the changes, though? Newbzy (talk) 23:16, 28 February 2026 (UTC)
- No worries. I already reduced the changes, and now also applied them.
Done Nux (talk) 23:25, 28 February 2026 (UTC)
- Thanks very much! Newbzy (talk) 23:28, 28 February 2026 (UTC)