Jump to content

Template talk:Reply to

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Reply to/doc)

Defaulting to no colon?

[edit]

I often see people double-punctuating pings, given that the colon is included as a default after the @[username]. Plus, I think the colon—as an indicator of address—is largely implied anyway since we have the @, which is the standard way of "talking" to people on the internet. What say others about removing the colon as a default, and instead defaulting to @[username] only? I see this was discussed in 2013, but I assume the template is much more widely used now and people might have new opinions. AleatoryPonderings (talk) 15:24, 3 September 2020 (UTC)[reply]

@AleatoryPonderings: I definitely would support removing the colon. theleekycauldron (talkcontribs) (they/them) 21:08, 10 October 2021 (UTC)[reply]
@AleatoryPonderings and Theleekycauldron: The colon is there to help separate the message body from the call-out, especially when that call-out goes out to multiple users, and even more so when the username is more a statement than a name. And sometimes the colon that a user might enter can cause confusion for the software as it tries to make the message body a list item. That's actually what a talk page is: an unbulleted tiered list or outline.  — Myk Streja (beep) 17:17, 23 October 2021 (UTC)[reply]

"Template:Ui" listed at Redirects for discussion

[edit]

An editor has identified a potential problem with the redirect Template:Ui and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2022 January 17#Template:Ui until a consensus is reached, and readers of this page are welcome to contribute to the discussion. Q28 (talk) 12:05, 17 January 2022 (UTC)[reply]

Rewrite

[edit]

I rewrote the module to greatly simplify it, taking advantage of the mw.text.listToText function, at Module:Reply to/sandbox (and implemented at Template:Reply to/sandbox). It passes all the testcases, and the only change to the output text is that it fixes a bug that had caused multiple spaces to be inserted after the penultimate list item. Since this is a very widely used template, I thought I'd open it up to public review before copying it to the main template. --Ahecht (TALK
PAGE
) 18:21, 30 March 2022 (UTC)[reply]

Looks good. Line 13 uses pairs(args). Shouldn't that be ipairs? Line 14 uses mw.ustring.match(v,'%S'). Plain string.match works for that and is faster (not that the speed would be noticed). Johnuniq (talk) 02:09, 31 March 2022 (UTC)[reply]
@Johnuniq turns out I need both pairs and ipairs to allow it to work if the numbered parameters are non-sequential and to preserved their order. I think the resulting code is a bit less efficient that the non-sandbox version, since there's now an extra loop and a sort operation, but at least it looks cleaner. --Ahecht (TALK
PAGE
) 15:12, 31 March 2022 (UTC)[reply]
@Ahecht That's good but just to be argumentative (hey, this is Wikipedia!) I edited Module:Reply to/sandbox to try the code without skipping nil entries. The only way a nil entry can occur would be if someone purposefully inserts them such as with {{reply to|Jimbo Wales|4=Example}}. That has parameters 1 and 4 with nils for 2 and 3. If someone complained that they used that syntax but Example wasn't pinged, I would tell them to do what the documentation says. However, the overhead of your more thorough code is trivial and if you think coping with skipped parameters is needed, undo my edit and proceed. Johnuniq (talk) 02:05, 1 April 2022 (UTC)[reply]
The use case was that someone could add a bunch of numbered usernames and then decide that they don't want to ping the first one in the list after all. If you allow nil entries, they wouldn't have to renumber. --Ahecht (TALK
PAGE
) 03:51, 6 April 2022 (UTC)[reply]
I don't understand. Say the user writes {{reply to|Example1|Example2|Example3}} and then changes it to {{reply to||Example2|Example3}}. That should work. Unless the module does something very strange, there is no nil. Is the module using Module:Arguments and it inserts nil? There should be parameters to stop that, although a better solution would be to not use Module:Arguments. Johnuniq (talk) 05:25, 6 April 2022 (UTC)[reply]
@Johnuniq It was more the case where the user writes {{reply to|1=Example1|2=Example2|3=Example3|label1=1|label2=2|label3=3}} and wants to delete one, but I guess that's a pretty uncommon situation. --Ahecht (TALK
PAGE
) 13:22, 6 April 2022 (UTC)[reply]
 On hold pending the outcome of Phab:T306735. --Ahecht (TALK
PAGE
) 17:04, 25 April 2022 (UTC)[reply]

The redirect Template:Pin has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Wikipedia:Redirects for discussion/Log/2023 March 6 § Template:Pin until a consensus is reached. {{ping|ClydeFranklin}} (t/c) 01:36, 6 March 2023 (UTC)[reply]