Module talk:Citation/CS1/Archive 10
![]() | This is an archive of past discussions about Module:Citation. 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 5 | ← | Archive 8 | Archive 9 | Archive 10 | Archive 11 | Archive 12 |
Checking for invalid |lccn=
This one won't come up very often, but an invalid |lccn=
can make it so that the automatic link to lccn.loc.gov does not work. I came across one in a citation today. I'm guessing that there are approximately a few dozen invalid LCCN parameters in all of WP, but they should be easy to detect.
Here is a straightforward explanation (scroll to "identifier-syntax") of valid LCCN syntax that will work with the LCCN web site. – Jonesey95 (talk) 05:16, 17 March 2014 (UTC)
- length=10
- pass. LCCN aa12345678.
- pass. LCCN 9912345678.
- fail. LCCN a912345678.
{{cite book}}
: Check|lccn=
value (help) - fail. LCCN 9a12345678.
{{cite book}}
: Check|lccn=
value (help)
- length=11
- pass. LCCN aaa12345678.
- pass. LCCN a9912345678.
- fail. LCCN 99912345678.
{{cite book}}
: Check|lccn=
value (help) - fail. LCCN 9aa12345678.
{{cite book}}
: Check|lccn=
value (help) - fail. LCCN aa912345678.
{{cite book}}
: Check|lccn=
value (help) - fail. LCCN a9a12345678.
{{cite book}}
: Check|lccn=
value (help)
- length=12
- pass. LCCN aa9912345678.
- fail. LCCN 0a9912345678.
{{cite book}}
: Check|lccn=
value (help) - fail. LCCN a09912345678.
{{cite book}}
: Check|lccn=
value (help)
- length=13
- fail. LCCN aa99123456789.
{{cite book}}
: Check|lccn=
value (help)
- If retained, error category will be Category:CS1 errors: LCCN.
- length=12
- fail. LCCN 779912345678.
{{cite book}}
: Check|lccn=
value (help)
- Looks good to me. – Jonesey95 (talk) 03:55, 21 March 2014 (UTC)
Well, not quite right. The check needs to be improved so that lccns with hyphens are normalized before they are checked.
—Trappist the monk (talk) 14:20, 30 March 2014 (UTC)
- Ok, I think that I've fixed the issue. New function
normalize_lccn()
normalizes the lccn according to the Normalization of LCCNs procedure. These test citations all work correctly.normalize_lccn()
is able to normalize them all; the two fails are because there are spaces in the lccn that cause improper display of the lccn link- pass. LCCN n78-890351.
- pass. LCCN n78-89035.
- fail (white space). LCCN 78890351 n 78890351.
{{cite book}}
: Check|lccn=
value (help)[http://lccn.loc.gov/n 78890351 n 78890351]
- pass. LCCN 85000002.
- pass. LCCN 85-2.
- pass. LCCN 2001-000002.
- pass. LCCN 75-425165//r75.
- fail (white space). LCCN /AC/r932 79139101 /AC/r932.
{{cite book}}
: Check|lccn=
value (help)[http://lccn.loc.gov/79139101 /AC/r932 79139101 /AC/r932]
- —Trappist the monk (talk) 17:41, 30 March 2014 (UTC)
- Should the red error message be set to "hidden=true" in the live module until this bug fix is rolled out? I recommend doing so in order to avoid false positives. – Jonesey95 (talk) 00:03, 31 March 2014 (UTC)
Possible small bug in new year range code
I think I have found a small bug in the new year range code (which is great, by the way!). Here's what I have so far:
Author (1901–02). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help); Check date values in: |year=
(help)
Author (1901–04). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help); Check date values in: |year=
(help)
Author (1909–10). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help); Check date values in: |year=
(help)
Author (1911–12). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help); Check date values in: |year=
(help)
Author (1918–20). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help)
Author (1921–22). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help)
Author (1931–36). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help)
Author (1984–86). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help)
Author (2001–02). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help); Check date values in: |year=
(help)
Author (2001–04). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help); Check date values in: |year=
(help)
Author (2009–10). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help); Check date values in: |year=
(help)
Author (2011–12). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help); Check date values in: |year=
(help)
Author - future year (2018–20). "Foo Title". Journal Name. 23: 4. {{cite journal}}
: |author=
has generic name (help)
The year ranges are changed and are in |year=
. The citations are otherwise identical except for the future year. – Jonesey95 (talk) 00:17, 31 March 2014 (UTC)
- Not a bug. All of those errors occur where the two-digit year is less than 13 which makes for a possibly ambiguous date: YYYY-MM? or YYYY-YY?
- The warning violates WP:MONTH which reserves the
YYYY-YYYYYY–YY format for years with this statement: "Do not use YYYY-MM format (e.g. 2001-03 for March 2001, which may be confused with the year range 2001–2003)." Jc3s5h (talk) 01:27, 31 March 2014 (UTC) Corrected format; year ranges should use an n-dash, not a hyphen. 14:55, 31 March 2014 UT.
- The warning violates WP:MONTH which reserves the
- What is the proposed way to remove the date error for "date=1901–02"?
- The RFC on the YYYY-MM date format was just closed in favor of YYYY-MM remaining as a proscribed format, so 1901–02 can only be a year range.
- If I recall correctly, the date-checking code is picky about hyphens (required for YYYY-MM-DD, marked as an error in other formats) versus endashes (required for all ranges, marked as an error in other formats). The examples above all use endashes, so they should be valid, whereas the YYYY-MM format, if it were acceptable, would use a hyphen. Since the above examples (a) are all in
|year=
and (b) all use endashes, I propose that they should be acceptable to the date-checking code. – Jonesey95 (talk) 02:44, 31 March 2014 (UTC)
- If I recall correctly, the date-checking code is picky about hyphens (required for YYYY-MM-DD, marked as an error in other formats) versus endashes (required for all ranges, marked as an error in other formats). The examples above all use endashes, so they should be valid, whereas the YYYY-MM format, if it were acceptable, would use a hyphen. Since the above examples (a) are all in
- Yes, Module:Citation/CS1 is picky about hyphens and endashes. Hyphens are only allowed in YYYY-MM-DD dates; ranges require endashes.
- I'm not sure that we can rely on endashes, or on particular date-holding parameter names, or on editors adhering to the strictures of WP:MONTH, to divine intended meaning when we find AAAA-BB format in a date-holding parameter. You've been sorting through the gibberish that editors dump into CS1 template parameters long enough to know that editors aren't all that careful. I, for one, would like to see
|year=
go the way of|day=
and|month=
.
- I'm not sure that we can rely on endashes, or on particular date-holding parameter names, or on editors adhering to the strictures of WP:MONTH, to divine intended meaning when we find AAAA-BB format in a date-holding parameter. You've been sorting through the gibberish that editors dump into CS1 template parameters long enough to know that editors aren't all that careful. I, for one, would like to see
- I don't think that readers (who aren't versed in the intricacies of WP:MOS) can easily determine by inspection if Journal Name 23, 1901–02, is the February issue or covers the period 1901–1902. Interpretation of such date ranges occurring in article text at least has some possibility of context to aid the reader; context in an isolated citation is much more limited and may not exist.
- So, the fix for
|date=1901–02
is|date=1901–1902
.
- So, the fix for
- I'll add this to the CS1/WP:DATESNO compliance table.
- "So, the fix for
|date=1901–02
is|date=1901–1902
." This is wrong on a few levels. First, this thread is about a bug in checking code. The checking code doesn't fix anything, an editor does. Next, since MOSNUM allows 1901–02 (that's an n-dash) this style of range should be acceptable by the checking code. I think the code already would disallow a hyphen in any date expression except YYYY-MM-DD, so even after the code is fixed to accept 1901–02 the expressions 1901-02 and 1901-99 (with hyphens) would still be flagged as errors. Jc3s5h (talk) 15:11, 31 March 2014 (UTC)
- "So, the fix for
- As I wrote before, not a bug, the code was intentionally written to exclude AAAA–BB dates where BB is less than 13. AAAA-BB dates are invalid because of the hyphen, regardless of the value in BB.
- Yep, the code doesn't fix anything; never has, never will, and I never said that it would. Please stop putting words in my mouth that I have never written nor spoken.
- I have noted before that CS1 is compliant with a subset of WP:DATESNO, itself a subset of WP:MOSNUM, CS1 will never be fully compliant with either.
- YYYY-MM-DD is the only date format where hyphens are allowed and in fact required by CS1.
- We seem to have a breakdown in terminology. There is a Citation Style 1, as described in Help:Citation Style 1, which is the way citation should be entered into templates and be displayed. Then there is the implementation of Citation Style 1 by the various bits of template code. Sometimes the template implementation is deficient. For example, if a source were written in the year 46, it would have to be so described in the citation, but the implementation doesn't support it. So the editor most likely would write a hand-coded citation that resembles Citaton Style 1 as much as possible.
- Help:Citation Style 1#CS1 compliance with Wikipedia's Manual of Style describes certain aspects of dates that, at present, are not feasible to implement, or are still on the to-do list for implementation. It should not be a description of free choices to create differences between CS1 and MOSNUM, because no such free choices were agreed to by the community. It would be inappropriate for a template coder to chose to implement templates in defiance of WP:MOSNUM if it is reasonably feasible to follow WP:MOSNUM. Jc3s5h (talk) 17:47, 31 March 2014 (UTC)
- Perhaps it should be a lower class of warning, but we are used to ignoring certain date errors, already. I see how this range can be ambiguous, even though it is compliant. Warning that it could be a problem is not actively trying to fix something that isn't broken. I'd support adding the word possibly to this detection, or a different differentiation, if the code became that sophisticated. (It is already quite complicated.) —PC-XT+ 00:47, 1 April 2014 (UTC)
- Help:Citation Style 1#CS1 compliance with Wikipedia's Manual of Style describes certain aspects of dates that, at present, are not feasible to implement, or are still on the to-do list for implementation. It should not be a description of free choices to create differences between CS1 and MOSNUM, because no such free choices were agreed to by the community. It would be inappropriate for a template coder to chose to implement templates in defiance of WP:MOSNUM if it is reasonably feasible to follow WP:MOSNUM. Jc3s5h (talk) 17:47, 31 March 2014 (UTC)
PC-XT, I think this is the wrong place to argue that YYYY–YY is too ambiguous to use in a citation, because a citation has less context than other parts of an article. If that's what you believe, you should bring it up at Help talk:Citation Style 1, and argue that page should declare that Citation Style 1 permanently rejects YYYY–YY, as an exception to the general acceptance of WP:MOSNUM date guidance, and it should be spelled out the rejection is on the basis of ambiguity (which is permanent) rather than it being unfeasible to check (which may be temporary). Jc3s5h (talk) 01:13, 1 April 2014 (UTC)
- I don't mean to argue. I simply think there is room for compromise, at least for the moment. Some people find it ambiguous. I'm not sure I understand the arguments of whether it should be ambiguous, as I haven't read most of the other discussions about it. I may propose that the help page mention that some find it ambiguous, but I don't plan to try to outlaw it. I also have no opinion on whether this check remains the way it is due to ambiguity or turns into something else, other than that I prefer that templates, modules, userscripts, etc. follow consensus. I don't think this change is as bad as it could be. We have already had date errors against the MOS for a while, so I expect editors are used to them by now, and will generally use proper judgement. It's not perfect, but it's generally improving, and there is time. —PC-XT+ 01:56, 1 April 2014 (UTC)
- CS1 does not do repairs. It can't. Besides, we have editors and robots to do the menial labor.
- I'm sure that it's possible to have different levels of errors but what I think that amounts to is hidden error messages and perhaps different categorization. These particular error message are currently hidden so there isn't much to be gained there. Where would the word 'possibly' go?
- —Trappist the monk (talk) 01:09, 1 April 2014 (UTC)
- I meant that the current implementation doesn't do anything wrong. It simply alerts editors to possible ambiguity, without changing anything in the display. I don't think it really needs different levels, but since it may be controversial, it could possibly be separated into a different category or use some kind of lesser error orange color, though I don't really see the point. As far as the word possible, it could go into the documentation at Help:CS1 errors#bad date. I prefer templates to follow documentation, but this case is not going to be so straightforward. —PC-XT+ 01:56, 1 April 2014 (UTC)
- —Trappist the monk (talk) 01:09, 1 April 2014 (UTC)
- At present the code not only issues a warning message, but also throws a page into . One goal of more precise date checking is to reduce the number of false alarms in this category. So the code would have to have a level of warning which would issue a warning, but not put the page in the category. Also, eventually this is supposed to be fully turned on so all readers see it. I don't think we want to be showing warnings for things that might be wrong, rather than a clear violation of Citation Style 1. Jc3s5h (talk) 02:07, 1 April 2014 (UTC)
- I've added a section at Help talk:CS1 errors with more details. I agree that reducing false alarms is a goal worth pursuing. I also agree that when the messages are turned on for everyone, each message should ideally link to help text with MOS links supporting its statements. It seems to be too soon to try for that, at the moment. I might support removing the category from this error, but leaving the hidden red text for now. That way, pages with less contentious errors can be given priority over those with this error only. —PC-XT+ 02:26, 1 April 2014 (UTC)
- Regretably, the development of CS1 was not a neatly planned, well organized engineering project. It was/is a mess. In the best of all possible worlds, the developers of CS1 would have started with a specifications document. That document would have directed the implementation; it would have served as the basis for the user documentation. Alas, twas not to be. This is Wikipedia. Multiple authors created multiple templates that evolved into multiple templates using the common
{{citation/core}}
. Continuing evolution is bringing them all into Module:Citation/CS1; new features are added, old features are pared away, and somehow, somehow, it is beginning to coalesce into a single entity. There is no plan for this, it just happens because Wikipedia happens. Documentation in this kind of environment lags behind the implementation; it will always lag behind.
- Regretably, the development of CS1 was not a neatly planned, well organized engineering project. It was/is a mess. In the best of all possible worlds, the developers of CS1 would have started with a specifications document. That document would have directed the implementation; it would have served as the basis for the user documentation. Alas, twas not to be. This is Wikipedia. Multiple authors created multiple templates that evolved into multiple templates using the common
- Help:Citation Style 1 is not a specifications document, nor a design guide, nor is it even a style guide; it is not
a description of free choices to create differences between CS1 and MOSNUM
, though it does reflect those choices; it isn't even good user documentation. It is a mess. Help:Citation Style 1 is merely a collection of writings that attempts to describe how CS1 works and how to use it. Expecting more from it than that will lead to despair.
- Help:Citation Style 1 is not a specifications document, nor a design guide, nor is it even a style guide; it is not
- I choose think that this particular coding choice was made not in
defiance of WP:MOSNUM
, but rather, to the benefit of CS1.
- I choose think that this particular coding choice was made not in
It is a mess, and documentation isn't going to be perfect. Nevertheless, when it is clear what the documentation says, and it is reasonably feasible to write checking code that follows the documentation, that should be done. It is inappropriate to use a position as a code writer to ignore the consensus process and just implement whatever the coder prefers. If you think 1901–02 is ambiguous in the context of a citation, get consensus to modify Help:Citation Style 1 accordingly, instead of throwing it on a list of stuff that is infeasible or in the queue. Jc3s5h (talk) 01:21, 1 April 2014 (UTC)
origyear --> origdate?
Should we deprecate origyear and make it a synonym of a new parameter called origdate so that the naming format is consistent. Jason Quinn (talk) 03:43, 3 April 2014 (UTC)
- No.
|origyear=
is mainly used for books, where a second or subsequent edition is common, but the exact publication date is unimportant; for a non-first edition of a book, the actual and original year of publication are both useful. The exact publication date is mainly of use for periodicals, where although there is almost always more than one issue, there is rarely more than one edition. Some newspapers do have one or more pages re-set during a print run, in order to cover breaking news; but the cover date doesn't change, and so the "original date" is pretty much a non-existent concept. --Redrose64 (talk) 10:02, 3 April 2014 (UTC)
No consensus on whether YYYY-MM is acceptable or unacceptable
An RFC that sought to determine whether YYYY-MM was an acceptable date format was recently closed.
The YYYY-MM format is currently in the Unacceptable column of the table at WP:BADDATEFORMAT, but I expect that to change soon. It was added there because the initial RFC closure said that there was "no consensus to change anything", implying that the state of the table at the opening of the RFC (YYYY-MM was in the Unacceptable column at that point) was how it should remain. The closure was subsequently revised to read: "There is no consensus that YYYY-MM is an acceptable format, nor any consensus that it is an unacceptable format. I would recommend against any mass changes being made purely on the basis of this RfC."
Based on this reasonably-attended RFC, despite the lack of consensus, it appears that the CS1 module's date-checking code should stop flagging YYYY-MM as an invalid date format. Thoughts? – Jonesey95 (talk) 00:48, 3 April 2014 (UTC)
- The RfC pretty much starts off with:
The recent (29 Nov 2013) banning of the yyyy-mm format ...
which apparently arises from this conversation and this change to the table at WP:BADDATEFORMAT.
- The table at WP:BADDATEFORMAT was then subjected to quite a few edits to change its format but YYYY-MM remained in the table until this edit (3 Feb 2014) when it was hidden pending the outcome of the RfC.
- Another version of the ban was added 31 Mar 2014. That same day, the ban was modified a bit and then hidden only to be almost immediately unhidden following the closure of the RfC.
- It doesn't appear to me that the ban on YYYY-MM was added to WP:BADDATEFORMAT because of the closure of the RfC but rather, was restored following the closure.
- The ban was always there in the "Month" section, it was just repeated in the unacceptable date format table for convenience. I think it was a mistake to comment it out from the unacceptable date format table while leaving the "Month" section alone. I think we have always taken the position that when we mention the YYYY-MM-DD format, we mean exactly that, and do not allow any of the related forms mentioned in ISO 8601 such as 2014-04, 20140403, 2014-04-03T13:12, etc.
- I think this puts the English Wikipedia in an analogous position to the UK House of Lords[1]; a bill was introduced to clarify whether the legal time in the UK, which is called in the law "Greenwich Mean Time", was UTC or UT1. The lords had a debate but left the question unanswered. Wikipedia editors had a debate but couldn't come to a conclusion about whether YYYY-MM is acceptable. Jc3s5h (talk) 13:18, 3 April 2014 (UTC)
- Sorry if I wasn't clear above. Here's the timeline:
- The ban was added to the table (by me, after a discussion with clear consensus against YYYY-MM on the MOS/Dates Talk page) in November.
- After the RFC started, someone commented out the ban from the table.
- When the RFC was initially closed with the statement that there was "no consensus to change anything", the ban was restored (since "no consensus to change" implied that the ban should stay, i.e. no change from the state of the table when the RFC started).
- After the ban was reinstated, the resolution of the RFC was edited to its current state. After reading the comments above and rereading the Talk page discussion, it appears that the proper path may be to leave the YYYY-MM prohibition in the CS1 module code, remove YYYY-MM from the Unacceptable list, and leave the recommendation against YYYY-MM in the "Month" section of MOS/Dates. That would restore everything to its pre-RFC state, I believe. – Jonesey95 (talk) 17:20, 3 April 2014 (UTC)
- Sorry if I wasn't clear above. Here's the timeline:
- I think that the current state of things is just as it was prior to the RfC. So, I agree with all of item 4 except:
remove YYYY-MM from the Unacceptable list
, which would would leave us in a state different from that which existed at the initiation of the RfC. If you are looking to undo this change to the table at WP:BADDATEFORMAT, then I think that Module talk:Citation/CS1 is the wrong forum.
- I think that the current state of things is just as it was prior to the RfC. So, I agree with all of item 4 except:
- I think leaving the "Month" section alone, removing YYYY-MM from the unacceptable format table, and leaving it in the CS1 module would be sweeping the problem under the rug. Advice in MOSNUM should be easy to find; it is fundamentally sneaky to keep controversial advice in there and hope nobody notices it. As for CS1 warnings, if the community can't decide what they want, they don't deserve help from automated tools, so remove the warning. Jc3s5h (talk) 18:04, 3 April 2014 (UTC)
- Re item 4 above: I'm not saying that I am going to modify the date format table. There's too much kerfuffle on that page and its Talk page for my taste. I tried to be helpful once, after a clear consensus, and it got me nowhere. I'll stick to what I'm good at. Personally, I think the error message should stay, because the YYYY-MM guidance has been in the "month" section and because YYYY-MM will either be "unacceptable" or not displayed in the date format table.
- I think leaving the "Month" section alone, removing YYYY-MM from the unacceptable format table, and leaving it in the CS1 module would be sweeping the problem under the rug. Advice in MOSNUM should be easy to find; it is fundamentally sneaky to keep controversial advice in there and hope nobody notices it. As for CS1 warnings, if the community can't decide what they want, they don't deserve help from automated tools, so remove the warning. Jc3s5h (talk) 18:04, 3 April 2014 (UTC)
- And because YYYY-MM is fundamentally ambiguous and less clear than it should be, but I recognize that this amounts to the same thing as me just not liking it. – Jonesey95 (talk) 18:10, 3 April 2014 (UTC)