Template talk:Being merged: Difference between revisions

From Wikipedia, the free encyclopedia

Content deleted Content added


Line 58: Line 58:

::Wasn’t necessarily a search and replace error, more so just a remnant from my tinkering to make pagelist work with the template, as it could only take a singular article input before. <code><nowiki>{{#if:{{1|}}|</nowiki></code> would indeed make much more sense to use there, pagelist is overkill ~ [[User:Oklopfer|<span style=”color: #e3308a”>oklopfer</span>]] ([[User talk:Oklopfer|💬]]) 04:05, 22 November 2025 (UTC)

::Wasn’t necessarily a search and replace error, more so just a remnant from my tinkering to make pagelist work with the template, as it could only take a singular article input before. <code><nowiki>{{#if:{{1|}}|</nowiki></code> would indeed make much more sense to use there, pagelist is overkill ~ [[User:Oklopfer|<span style=”color: #e3308a”>oklopfer</span>]] ([[User talk:Oklopfer|💬]]) 04:05, 22 November 2025 (UTC)

:::OK, I went ahead and changed it. Hopefully won’t break anything. — [[User:Chrisahn|Chrisahn]] ([[User talk:Chrisahn|talk]]) 04:30, 22 November 2025 (UTC)

:::OK, I went ahead and changed it. Hopefully won’t break anything. — [[User:Chrisahn|Chrisahn]] ([[User talk:Chrisahn|talk]]) 04:30, 22 November 2025 (UTC)

::::Thanks! [[User:FaviFake|FaviFake]] ([[User talk:FaviFake|talk]]) 09:29, 22 November 2025 (UTC)


Revision as of 09:29, 22 November 2025

@Trialpears: Looking again at this, I wonder whether we need this template and Template:Merging. Klbrain (talk) 18:49, 16 October 2019 (UTC)[reply]

Klbrain How could I forget about that! Yep they’re intended for the same purpose with the main difference being the categorization, which is basically useless for {{merging}} since it places it together with all the thousands of proposals without consensus. I will take care of it tomorrow. I don’t think a whole TfD should be necessary. —Trialpears (talk) 21:55, 16 October 2019 (UTC)[reply]
The categorization process is helpful, though; keeping a (hopefully small) list of mergers ready to be completed. So, I’m sitting on the fence … Klbrain (talk) 22:10, 16 October 2019 (UTC)[reply]
I was planning on changing it to Category:Articles currently being merged, which is what {{Being merged}} is currently using. —Trialpears (talk) 22:15, 16 October 2019 (UTC)[reply]
That sounds like a good idea. Klbrain (talk) 07:38, 17 October 2019 (UTC)[reply]

Soumya-8974 I think your recent changes broke the namespace detection that ensured {{Being deleted}} was invoked in template space. This used to be a redirect there and I think we should keep it working since in many cases the template is being merged and not deleted. One example of an affected page is {{Infobox name module}}. Could you take a look at this? ‑‑Trialpears (talk) 22:40, 30 April 2020 (UTC)[reply]

Hey! I can’t really think of a significant or reasonable reason why {{Being merged}} needs a switch for different page types – is this template really being used in non-article pages? ItsPugle (please ping on reply) 09:14, 9 November 2020 (UTC)[reply]

ItsPugle, it used to be a redirect to {{Being deleted}} which is used for TfDs and used to be backwards compatible using switches when I created it. Looks like someone removed that feature though. —Trialpears (talk) 09:21, 9 November 2020 (UTC)[reply]
@Trialpears: Hm, I think {{Being deleted}} is a significantly different template here. {{Being merged}} has its own place I feel. Apart from its historical use with TfD, is {{Being merged}} used on any other non-article pages? ItsPugle (please ping on reply) 09:56, 9 November 2020 (UTC)[reply]
ItsPugle, Tep, currently it’s used at MOS:ROMANIZATION and it may be used for other non-article mergers in the future. —Trialpears (talk) 10:33, 9 November 2020 (UTC)[reply]
@Trialpears: 👍 I’ll have a crack at improving how it works for non-article pages. ItsPugle (please ping on reply) 09:27, 10 November 2020 (UTC)[reply]

A minor point, but I wonder whether it might be better to “merge this page to” rather than “merge this page with” when a ‘target’ is set; it’s helpful for readers to see the intended direction. Klbrain (talk) 10:09, 6 September 2023 (UTC)[reply]

 Done FaviFake (talk) 09:12, 22 November 2025 (UTC)[reply]

I think there are some issues with the logic that decides whether to use the target or the unnamed parameters. What’s the intended behavior? I can specify a target parameter, or I can use unnamed parameters. What if I use both? Is that allowed? What will the template do in this case? Come to think of it, do we even need the target parameter? We also have a dir parameter that can be “from” or “to”. I guess I understand what target means when dir is “to”, but what if it’s “from”? Maybe it would be better to drop the target parameter and tell users to always use dir and unnamed parameters. Or if we want to keep target while it’s still in use somewhere, mark it as deprecated. — Chrisahn (talk) 03:11, 22 November 2025 (UTC)[reply]

@Chrisahn I introduced that logic to prevent breakage from the old template usage; target used to be a synonym for unnamed 1, and there appears to be quite a few instances of its usage, still. On the other hand, {{merge}} had a different meaning for target, and my implementation allows for both versions:
  • if no unnamed is provided, target functions as if it were unnamed 1 (regardless of dir), just as in the old usage
  • if both are provided, and no dir is provided, then target functions as the destination, just as it does in {{merge}}
The intended function is the latter, while the former is deprecated. ~ oklopfer (💬) 03:58, 22 November 2025 (UTC)[reply]
What if unnamed, target, and dir are provided? More generally, your description seems to say that dir is useless in either of the two cases you mentioned – in the first case, it’s ignored, in the second case, it’s disallowed. I’m still confused. 🙂 — Chrisahn (talk) 04:07, 22 November 2025 (UTC)[reply]
in that case target becomes ignored; it is only useful either when there is no unnamed, or when specifying a destination for multiple articles like in {{merge}}; the idea is for {{merge}}/{{merge to}}/{{merge from}} to be able to be drop-in replaced by {{being merged}}/{{being merged to}}/{{being merged from}} ~ oklopfer (💬) 04:13, 22 November 2025 (UTC)[reply]
and it’s not ignored in the first scenario! my point is that if you combine target and dir, without unnamed, then it functions exactly as it did before; i.e. Being merged|dir=to|target=destination ~ oklopfer (💬) 04:16, 22 November 2025 (UTC)[reply]
Now I’m even more confused.
  • {{Merge}}, {{Merge from}} and {{Merge to}} don’t have a dir parameter.
  • {{Merge from}} and {{Merge to}} don’t have a target parameter.
  • {{Merge}} requires unnamed parameters. Its target parameter is optional; if it is present, “to target” is added to the output.
Chrisahn (talk) 04:30, 22 November 2025 (UTC)[reply]
  • not yet! I am working on it 🙂
  • correct – again, target is only meant for the deprecated old use when dir is provided
  • yes, that is how it works if you do being merged|a|target=b
~ oklopfer (💬) 04:50, 22 November 2025 (UTC)[reply]
I think it might be better to implement {{Being merged to}} and {{Being merged from}} as separate templates that don’t invoke {{Being merged}}. Similar to {{Merge to}} and {{Merge from}}. Because it has to handle invocations from the other two templates, the logic in {{Being merged}} is complex and unreadable. In contrast, {{Merge}}, {{Merge to}} and {{Merge from}} are rather simple. Sure, there’s a good deal of copied code, but I think that’s easier to deal with than the complexity. — Chrisahn (talk) 04:52, 22 November 2025 (UTC)[reply]
I’ll let more discussion play out as I saw you left some comments on the other talk page, but if it is too confusing then I am happy to re-split them; the only problem is that {{being merged}} had the dir param before I even touched it, so there are a lot of cases of it in current usages of the template ~ oklopfer (💬) 05:08, 22 November 2025 (UTC)[reply]
According to https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=Being+merged, dir is used in 47 pages. Or that was the case on 2025-11-01, if I understand correctly. I think these could be replaced by {{Being merged to}} and {{Being merged from}}. Shouldn’t take too long. I’d be happy to help. — Chrisahn (talk) 05:17, 22 November 2025 (UTC)[reply]
To implement {{Being merged to}} and {{Being merged from}} as separate templates, we simply have to copy the code of {{Merge to}} and {{Merged from}} and change a bit of text, right? — Chrisahn (talk) 05:18, 22 November 2025 (UTC)[reply]
Wait, what would be the benefit in having 3 different codebases instead of 1? {{being merged from}} was already a wrapper and it has always worked fine afaik.The thing I find very annoying is having to edit three different templates, as I’ve had to do multiple times with {{Merge}}, {{Merge from}}, and {{Merge to}}, for every simple change i want to make, or to copy over a change that someone made to 1 but (understandably) forgot to make to the other 2. FaviFake (talk) 09:22, 22 November 2025 (UTC)[reply]

This code seems strange: {{#if:{{Pagelist .... Why do we invoke {{Pagelist}} just to test whether it returns an empty string? If I understand correctly, the invocation of {{Pagelist}} returns an empty string if all the numbered parameters are empty. If that’s correct, we can replace {{#if:{{Pagelist ... by {{#if:{{1|}}| .... (Strictly speaking, we’d have to test all numbered parameters, because someone could invoke the template using {{Being merged|2=...}} or something similar, but I think we can ignore such corner cases.) — Chrisahn (talk) 03:20, 22 November 2025 (UTC)[reply]

The {{#if:{{Pagelist ... code was introduced in Special:Diff/1323264746, which also introduced similar {{Pagelist ... invocations in several other places. Maybe it was search-and-replace error? — Chrisahn (talk) 03:23, 22 November 2025 (UTC)[reply]
Wasn’t necessarily a search and replace error, more so just a remnant from my tinkering to make pagelist work with the template, as it could only take a singular article input before. {{#if:{{1|}}| would indeed make much more sense to use there, pagelist is overkill ~ oklopfer (💬) 04:05, 22 November 2025 (UTC)[reply]
OK, I went ahead and changed it. Hopefully won’t break anything. — Chrisahn (talk) 04:30, 22 November 2025 (UTC)[reply]
Thanks! FaviFake (talk) 09:29, 22 November 2025 (UTC)[reply]

Leave a Comment

Your email address will not be published. Required fields are marked *

Exit mobile version