Template talk:Nth century

(Redirected from Template talk:Nth century/doc)
Latest comment: 9 days ago by Mathglot in topic Substing, and cat or hidden self-ident tag

Questionable default

edit

Using {{CURRENTCENTURY}} as the default is leading to undetected errors. Some obvious century values such as "18" are not recognized in the switch statement ({{Nth century|18}} → 21th century), we get invalid values that are difficult to detect in a programmatic way. Perhaps the default should emit an error message and a tracking category instead of a value. – Jonesey95 (talk) 17:28, 22 November 2024 (UTC)Reply

I have changed the default to use the input |1=. I think that will suffice. I added examples to the /doc page. – Jonesey95 (talk) 14:36, 23 November 2024 (UTC)Reply
Looks fine to me. Mathglot (talk) 00:23, 25 November 2024 (UTC)Reply

Substing, and cat or hidden self-ident tag

edit

Jonesey95, regarding making it subst-only and re-adding the banner about that, I agree, but I would prefer if we would also either categorize it and/or add a hidden, template self-id such as are seen in many substed templates, for example in {{uw-v1}} and pretty much all the other warning templates. Either way would allow us to track and follow up on them to see what happens to them; at least for a while.

I'm somewhat sensitive to the intrusiveness of a long, hidden comment in the wikicode, and a new shortcut would allow us to just add <--T:NthC-->, which would solve the problem in 12 code characters. A category is easier to deal with for the average Wikipedian, but would be longer. But given that neither solution renders anything visible on the page, maybe it doesn't matter which one we choose. Do you see an advantage to one over the other? Or do you see a better way? Mathglot (talk) 00:42, 25 November 2024 (UTC)Reply

In my experience, templates substed into article space do not leave behind comments in article prose (i.e. within paragraphs). Sometimes you'll see comments in infobox vertical layouts that have been copy/pasted from documentation, but infoboxen are expected to take up vertical space, and a small horizontal comment is unobtrusive. I think that a comment in article prose after something like "18th century" would not make sense to editors. I think we should either be confident that this template works or completely rethink how to deal with {{S-}} in translated articles. – Jonesey95 (talk) 04:52, 25 November 2024 (UTC)Reply
Okay. I still need to do the upgrade mentioned on the doc page to handle century ranges. There are a bewildering variety of these templates at fr-wiki, but I think after the single century version that we are now handling, the simple, A–B range is next most common.
Should also note that in fr-wiki, fr:S- is only for AD. For years BC, they have fr:-s-, with 16,304 transclusions. We should ○reate {{-s-}} for BC values. Mathglot (talk) 18:56, 25 November 2024 (UTC)Reply