Jump to content

Template talk:Updated

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

Unclear; doesn't work properly?

[edit]

I've been trying this. Unless I'm making an obvious mistake, this template doesn't work properly, particularly if the date is omitted, and the format is unclear, {{updated|date|<ref>reference</ref>}}. I was expecting to enter "2015|11|8" or "date=2015|11|8" or "date=November 2015" or the like, but it seems to accept and display almost any text, which could be "8 November 2015", without any processing. And an empty date doesn't seem to work, either as {{updated||<ref>reference</ref>}} or {{updated|<ref>reference</ref>}}

{{updated|2015|11|8|<ref>reference</ref>}} ==>

As of 201511

{{updated|date=2015|11|8|<ref>reference</ref>}} ==>

As of 118

{{updated|Any old text|<ref>reference</ref>}} ==>

As of Any old text[3]

{{updated||<ref>reference</ref>}} ==>

As of [4]

{{updated|<ref>reference</ref>}} ==>

As of [5]

{{updated|date=November 2015|<ref>reference</ref>}} ==>

As of [6]

{{updated|date=1995}} (!!!)

As of (!!!)

This form obviously works, trivially:
{{updated|8 November 2015|<ref>reference</ref>}} ==>

As of 8 November 2015[7]

The template works for the current timestamp with no arguments (neither date nor ref):
{{updated}} ==>

As of

I don't see any advantage to using this template instead of {{As of|2015|11|8}}<ref>reference</ref> ==> As of 8 November 2015[8] ("As of" will mark the article as needing future updating, bjut that seems to make sense.)

So either I don't understand this, or it is rather useless; it needs either correcting or documenting.

Ignore

  1. ^ reference
  2. ^ reference
  3. ^ reference
  4. ^ reference
  5. ^ reference
  6. ^ reference
  7. ^ reference
  8. ^ reference

Pol098 (talk) 19:54, 8 November 2015 (UTC)[reply]

Space between the punctuation and ref tag

[edit]

As you can see in the examples above there is in some cases a space between the punctuation and ref tag. According to Help:Footnotes#Footnotes: the basics, this should not happen. Could anyone who knows more about template code than I please fix that? --Jaellee (talk) 08:26, 19 October 2017 (UTC)[reply]

The example above (using |date=, which is invalid) puts the reference in the first unnamed parameter, which is supposed to contain the date. Using the template incorrectly will result in incorrect formatting.
That said, the examples above show the fundamental problem with using unnamed parameters; if one is missing, everything goes sideways. – Jonesey95 (talk) 08:16, 23 October 2018 (UTC)[reply]

No longer formatting correctly for American English?

[edit]

It looks like the date no longer formats correctly for MDY? Seany91 (talk) 18:56, 19 June 2024 (UTC)[reply]

Always link to an example when reporting a problem. See {{Updated/testcases}} for various date formats. – Jonesey95 (talk) 05:42, 20 June 2024 (UTC)[reply]
It seems to have been changed when {{date}} was added to the template a month ago. SounderBruce 23:54, 24 June 2024 (UTC)[reply]
What has been changed? If you link to an example or add one to the test cases page, that will help. – Jonesey95 (talk) 19:12, 26 June 2024 (UTC)[reply]
Look at the MDY example in Template:Updated/testcases. The sandbox code is what the mainspace used to be before May 26, 2024. BLAIXX 17:52, 28 June 2024 (UTC)[reply]
Strange. When I set up the testcases page, I am pretty sure that it was showing the dates as they were input. Now they are all showing "15 June 2004", regardless of the input. I have reverted the latest change. – Jonesey95 (talk) 15:21, 29 June 2024 (UTC)[reply]

Convert to module

[edit]

Hi. I've created a module implementation of this template at Module:Updated as requested at Wikipedia:Lua/To do and did some testing, where it seemed to work. I'm therefore requesting that the template be replaced with {{#invoke:Updated|main|{{{1}}}}} and its documentation updated accordingly, thanks. '''[[User:CanonNi]]''' (talkcontribs) 08:45, 2 November 2024 (UTC)[reply]

This seems like a clear example of a template that really isn't improved by being converted to Lua IMO - it doesn't do anything complicated enough to warrant the a module. I did replace the manual hatnote implementation with {{hatnote}}, though. * Pppery * it has begun... 02:30, 4 November 2024 (UTC)[reply]
(which was reverted, see the below section). * Pppery * it has begun... 16:38, 4 November 2024 (UTC)[reply]
I don't see the Lua implementation the sandbox or on the testcases page. That would be a good next step if this work is to be evaluated. – Jonesey95 (talk) 06:13, 5 November 2024 (UTC)[reply]
 Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. – Jonesey95 (talk) 06:14, 5 November 2024 (UTC)[reply]

Problems caused by hatnote use

[edit]

I don't understand what exactly is being done with the template at the moment and if it is related to this, but the template is now incorrectly creating a line break. See for example AC Milan#First-team squad and FK Mladá Boleslav#Current squad, So, however it came about, I'm asking for a fix or a rollback. Thank you in advance. FromCzech (talk) 07:41, 4 November 2024 (UTC)[reply]

There is also a discussion at WT:FOOTY raising the same issue. It seems to happen when there is a ref directly following the template: previously there was no new line between them. @FromCzech have you tried including the ref as the second parameter to the template, rather than separately? Spike 'em (talk) 11:15, 4 November 2024 (UTC)[reply]
Moving the ref inside the {{Updated}} seems to work, (see User:Spike 'em/sandbox/updated) but there are an unknown number of pages where there is a ref directly following the call. @Pppery : I'm minded to revert the change until we can work out how many pages are affected (it's been a while since I did any searches of page contents at that level). Spike 'em (talk) 11:41, 4 November 2024 (UTC)[reply]
First results: A search for insource:/(\{\{updated\|[^\|\n]+?\}\})[\w\<\.]/ on pages transcluding this template returns 27k pages, so this is a major testcase and/or requires amendment of a large number of pages. It would also seem that the template is used in tables, rather than just at the start of a section. I've reverted the change having copied the changed code into the sandbox. My sandbox page above hopefully shows the problem. (The regexp is trying to find uses of the template with a single parameter and with some content following on the same line. 23k of then are using "<ref" so may be solveable by shifting this into the second parameter). Spike 'em (talk) 14:04, 4 November 2024 (UTC)[reply]
It is common practice, so I'd say it affects the vast majority of club pages. FromCzech (talk) 11:57, 4 November 2024 (UTC)[reply]
Sorry for causing trouble there - and yes, if this hadn't happened while I was asleep I would probably have reverted myself - I see another template editor has already done so, which is fine with me. This is orthogonal to the original edit request, which I've split to its own section. * Pppery * it has begun... 16:37, 4 November 2024 (UTC)[reply]
I have added this format to the testcases page to aid in future troubleshooting. – Jonesey95 (talk) 06:17, 5 November 2024 (UTC)[reply]
Thanks, I was trying to figure out how to add a test case within the {{test case table}} framework, but I see this is not the only way to do it. Spike 'em (talk) 11:08, 5 November 2024 (UTC)[reply]