loc, at
[edit]Would be nice for conversion ease and memorability if |loc=
had an alias of |at=
to match all the CS1/CS2 templates, and the /doc pages were updated to use the latter instead of the confusingly different former (or at least list both). I'm willing to take care of the latter part if someone with more Lua skillz does the first. — SMcCandlish ☏ ¢ 😼 21:44, 12 January 2024 (UTC)
- Knock knock, anyone home? — SMcCandlish ☏ ¢ 😼 01:01, 5 February 2024 (UTC)
- Yes, please! Gawaon (talk) 16:01, 5 February 2024 (UTC)
- @SMcCandlish and Gawaon: Template:Sfn/testcases Rjjiii (talk) 04:41, 31 March 2024 (UTC)
- Thank you! But hmm, while the new test case uses "at" in the header, it still uses "loc" in the actual example. Is that a mistake or are I misunderstanding something? Gawaon (talk) 07:09, 31 March 2024 (UTC)
- Whatever the issue was, it seems resolved now. I see a test case for
|loc=
and one just below it for|at=
, with the live template not showing that new parameter working (since it's not implemented yet), but the sandbox version showing it working as-expected. — SMcCandlish ☏ ¢ 😼 02:18, 1 April 2024 (UTC)- Any news on when this will actually appear in the wild? So far it's not working outside the sandbox prototype, it seems. Gawaon (talk) 10:42, 3 May 2024 (UTC)
- There are a bunch of separate templates. Let me drop a notification at each to give folks a chance to comment if there are any issues. Rjjiii (talk) 02:36, 4 May 2024 (UTC)
- I've been waiting 6 years for this. (See prior discussion at Template talk:Sfn/Archive 3#at parameter.) Thank you! Daask (talk) 10:01, 14 May 2024 (UTC)
- @SMcCandlish: this should now work on the various templates. For {{sfnm}} and {{sfnmp}},
|xat=
works the same as|xloc=
. For the technically unrelated {{harvs}}, I added "at" as an alias for "loc", but didn't add anything for its rarely used "loc2" and so on parameters. Rjjiii (talk) 01:55, 18 May 2024 (UTC)- Huzzah! Thanks for getting that taken care of. — SMcCandlish ☏ ¢ 😼 03:23, 18 May 2024 (UTC)
- There are a bunch of separate templates. Let me drop a notification at each to give folks a chance to comment if there are any issues. Rjjiii (talk) 02:36, 4 May 2024 (UTC)
- Any news on when this will actually appear in the wild? So far it's not working outside the sandbox prototype, it seems. Gawaon (talk) 10:42, 3 May 2024 (UTC)
- Whatever the issue was, it seems resolved now. I see a test case for
- Thank you! But hmm, while the new test case uses "at" in the header, it still uses "loc" in the actual example. Is that a mistake or are I misunderstanding something? Gawaon (talk) 07:09, 31 March 2024 (UTC)
- @SMcCandlish and Gawaon: Template:Sfn/testcases Rjjiii (talk) 04:41, 31 March 2024 (UTC)
More whitelist requests
[edit]Several Harry Potter templates have been added and should probably be whitelisted.
['CITEREFRowling1997'] = template_names['HP1ref'], ['CITEREFRowling1998'] = template_names['HP2ref'], ['CITEREFRowling1999'] = template_names['HP3ref'], ['CITEREFRowling2000'] = template_names['HP4ref'], ['CITEREFRowling2003'] = template_names['HP5ref'], ['CITEREFRowling2005'] = template_names['HP6ref'], ['CITEREFRowling2007'] = template_names['HP7ref'],
Thanks. Andy02124 (talk) 15:51, 25 July 2024 (UTC)
- Those shouldn't be using template_name, the correct format is:
['CITEREFRowling1997'] = {'HP1ref'}, ['CITEREFRowling1998'] = {'HP2ref'}, ['CITEREFRowling1999'] = {'HP3ref'}, ['CITEREFRowling2000'] = {'HP4ref'}, ['CITEREFRowling2003'] = {'HP5ref'}, ['CITEREFRowling2005'] = {'HP6ref'}, ['CITEREFRowling2007'] = {'HP7ref'},
- template_name is used for templates with multiple names, and need additional setup. These are just standard templates. -- LCU ActivelyDisinterested «@» °∆t° 17:13, 25 July 2024 (UTC)
- Thanks for the correction. Andy02124 (talk) 03:41, 26 July 2024 (UTC)
Oh that's how this works
[edit]I figured my new bespoke single source CS1 wrapper working in practice but categorizing articles into Category:Harv and Sfn no-target errors was a transclusion issue with a known fix.
Anyway, from the above I take it I should request the following:
['CITEREFShiji'] = {'Cite Shiji'}, ['CITEREFSimaSima'] = {'Cite Shiji'},
In case I've done wrong, Template:Cite Shiji/testcases surfaces the CITEREFs for those with the harv-error detection script. Folly Mox (talk) 02:04, 5 August 2024 (UTC)
- You may want to rethink how you format you
|ref=
field. Each different cite needs a separate reference, you can't just use 'Sima, Sima' as that will link to four of your examples at the same time. If they're on the same page the link won't know which one to use and will give an error. - Normally this is handled by including the year (so 'Sima, Sima (1959)' and 'Sima, Sima (1739)') but you have three examples for the year 1959. You could use 1959a, 1959b, 1959c, which is the standard way of differentiating works on the same year, or some custom method.
- Also did you mean CITEREFSima instead of CITEREFShiji, as the reference for when sole is selected? -- LCU ActivelyDisinterested «@» °∆t° 08:57, 5 August 2024 (UTC)
- ActivelyDisinterested, the template in not intended to be called ten times in an article or however many testcases I have there. Those were for checking other behaviour, and I only mentioned it because the CITEREFs are visible and I don't know what I'm doing here and may have fouled up the syntax. I did forget that when the flags
|sole=
and|comma=
are both set, the template uses CITEREFSima.The relevant line from the template code (which I still need to format sanely; it's my first) is| ref= {{#if:{{{comma|}}}|{{#if:{{{sole|}}}|{{sfnref|Sima}}|{{sfnref|Sima|Sima}}}}|{{sfnref|''Shiji''}}}}
Folly Mox (talk) 10:30, 5 August 2024 (UTC)- Incidentally, I recorded my rationale for citing by title instead of author surname at Template:Cite Shiji/doc § Use with shortened footnotes. For clarity, I certainly don't intend to transclude this template more than once per article: I'm planning on adding support for multiple chapters, but even if I don't it's still best practice to cite the full bibliographic information once rather than multiple times, as the existence of this module attests. Folly Mox (talk) 10:37, 5 August 2024 (UTC)
- Thanks I just wanted to make sure. There's a few outstanding updates that need doing, I've reposted these all together in the section below (with the addition of CITEREFSima). -- LCU ActivelyDisinterested «@» °∆t° 10:52, 5 August 2024 (UTC)
- Incidentally, I recorded my rationale for citing by title instead of author surname at Template:Cite Shiji/doc § Use with shortened footnotes. For clarity, I certainly don't intend to transclude this template more than once per article: I'm planning on adding support for multiple chapters, but even if I don't it's still best practice to cite the full bibliographic information once rather than multiple times, as the existence of this module attests. Folly Mox (talk) 10:37, 5 August 2024 (UTC)
- ActivelyDisinterested, the template in not intended to be called ten times in an article or however many testcases I have there. Those were for checking other behaviour, and I only mentioned it because the CITEREFs are visible and I don't know what I'm doing here and may have fouled up the syntax. I did forget that when the flags
Consolidated updates
[edit]Renata3 there's a few updates waiting to be done, could you add the following entries?
['CITEREFMarshall1969'] = {'Lancashire & Yorkshire Railway 1'},
['CITEREFMarshall1970'] = {'Lancashire & Yorkshire Railway 2'},
['CITEREFRowling1997'] = {'HP1ref'},
['CITEREFRowling1998'] = {'HP2ref'},
['CITEREFRowling1999'] = {'HP3ref'},
['CITEREFRowling2000'] = {'HP4ref'},
['CITEREFRowling2003'] = {'HP5ref'},
['CITEREFRowling2005'] = {'HP6ref'},
['CITEREFRowling2007'] = {'HP7ref'},
['CITEREFShiji'] = {'Cite Shiji'},
['CITEREFSima'] = {'Cite Shiji'},
['CITEREFSimaSima'] = {'Cite Shiji'},
Thanks, -- LCU ActivelyDisinterested «@» °∆t° 10:52, 5 August 2024 (UTC)
Done Renata•3 03:14, 6 August 2024 (UTC)
- Thanks Renata. -- LCU ActivelyDisinterested «@» °∆t° 10:23, 6 August 2024 (UTC)
- Thank you -- Nempnet (talk) 13:57, 8 August 2024 (UTC)