Template talk:London Gazette/Archive 2
Appearance
This is an archive of past discussions about Template:London Gazette. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 |
Unnamed parameters
I had deliberately removed comments in the documentation about unnamed parameters from the documentation, as they need to be removed, so once all unnamed parameters have been removed from the current instances, unnamed parameters can then be passed through to {{cite magazine}}
for error checking. -- PBS (talk) 11:57, 15 May 2017 (UTC)
- Until now, you haven't said anything about that. It is not clear to me that they 'need' to be removed. It is one thing to say that they should be removed, perhaps for clarity or for readability or for consistency with cs1|2, but those reason are different from an imperative 'need'.
- The first unnamed parameter shall always be treated as the issue number and made into the cs1|2 title when
|issue=
is omitted and|title=
is either empty or omitted. There is no opportunity for cs1|2 error checking (missing title) here because the first line of the template howls when there isn't an issue number.
- The second unnamed parameter has become an alias of
|page=
(because|startpage=
is deprecated). Because Module:Gazette util creates values for both of the cs1|2 parameters|page=
and|pages=
, that module does the error checking that would have been done in cs1|2 (more than one of page and pages). - —Trappist the monk (talk) 09:52, 16 May 2017 (UTC)
- Keeping a unnamed parameter in the wrapper will cause errors. The classic example is when someone enters mode-cs2 or modecs2 instead of mode=cs2, if unnamed parameters are passed on to the next level down then the error will be picked up in the LUA module. -- PBS (talk) 11:38, 16 May 2017 (UTC)
- Ok, I've added Category:London Gazette templates using positional parameters to the template to collect information about how many pages have templates that use the unnamed parameters either intentionally or because of errors like the missing assignment operator case.
- —Trappist the monk (talk) 16:31, 16 May 2017 (UTC)
- When I looked there were about half a dozen. There are none at the moment did you change them to use named parameters? -- PBS (talk) 15:29, 20 May 2017 (UTC)
- Keeping a unnamed parameter in the wrapper will cause errors. The classic example is when someone enters mode-cs2 or modecs2 instead of mode=cs2, if unnamed parameters are passed on to the next level down then the error will be picked up in the LUA module. -- PBS (talk) 11:38, 16 May 2017 (UTC)