On 9/8/06, ScottL scott@mu.org wrote:
While I do not like the idea of someone using AWB to go through and change one to the other. If the feature works well enough in the preferences they could go through and rewikify the dates to make the feature detect them (leaving the displayed version alone). I think that is what is currently done when someone wikifies [[June 22, 2005]] a bot of some sort comes and changes it.
The problem is that AD/CE are only supposed to be displayed (according to the manual of style) if you're dealing with a span of time that crosses the BC-AD (or BCE-CE) boundary. In other words, this is proper:
[[July 4]], [[1776 BC]]–[[July 4]], [[1776|AD 1776]]
...and this is proper:
[[March 21]], [[1974]]–[[October 16]],[[1975]]
...but this is not:
[[March 21]], [[1974|AD 1974]]–[[October 16]],[[1975|AD 1975]]
...and this is not:
[[July 4]], [[1776 BC]]–[[July 4]], [[1776]]
Now, it would certainly be possible to include this level of context-awareness into the parser, but it's probably not a good idea. So we're left with trusting the editors to provide the correct display text in wikilinks, in the manner appropriate to the situation.
If we're going to keep using display text in wikilinks to provide the AD/CE (as opposed to BC/BCE, which is mandatory and thus easily parsed) then whatever date display mechanism we use, whether it's the current one or my patched one or some other one, will have to deal with this situation.
I'm leaning toward having the parser just rewrite the display text as well as the link itself, since the other "reasonable" alternative is to leave the display text alone, and (assuming we put in place my BC/BCE rewriting patch) this could result in aesthetically unappealing situations where BCE and AD are mixed in a date range, if the user has BCE set as their preference (or BC and CE mixed for users who prefer BC).
The display text is already provided automatically for users who set a preference and for wikilinked dates that don't already include display text, so there's already an expectation that dates won't necessarily display according to the regular rules of interpreting wikicode. Rewriting display text would make it impossible for editors to specify something other than what users prefer to see, but I can't think of any situations where that would be truly disasterous.
-Bill Clark
"Bill Clark" wclarkxoom@gmail.com wrote in message news:741500800609082032x7df90e7by572b2d8c1447ae34@mail.gmail.com...
On 9/8/06, ScottL scott@mu.org wrote:
While I do not like the idea of someone using AWB to go through and change one to the other. If the feature works well enough in the preferences they could go through and rewikify the dates to make the feature detect them (leaving the displayed version alone). I think that is what is currently done when someone wikifies [[June 22, 2005]] a bot of some sort comes and changes it.
[SNIP]
I'm leaning toward having the parser just rewrite the display text as well as the link itself, since the other "reasonable" alternative is to leave the display text alone, and (assuming we put in place my BC/BCE rewriting patch) this could result in aesthetically unappealing situations where BCE and AD are mixed in a date range, if the user has BCE set as their preference (or BC and CE mixed for users who prefer BC).
The display text is already provided automatically for users who set a preference and for wikilinked dates that don't already include display text, so there's already an expectation that dates won't necessarily display according to the regular rules of interpreting wikicode. Rewriting display text would make it impossible for editors to specify something other than what users prefer to see, but I can't think of any situations where that would be truly disasterous.
Why not have a rewrite rule, that looks at the format of the display text and rewrites it only if appropriate?
e.g.
[[1976|AD 1976]] is detected as being an AD date, and rewritten if necessary [[1976|the following year]] does not match, so no changes are made.
If the display text matches Year Epoch or Epoch Year (where Epoch = BC, AD, BCE or CE and ignoring case and whitespace) then rewrite according to user preferences, in all other cases leave as it is.
- Mark Clements (HappyDog)
On 9/10/06, Mark Clements gmane@kennel17.co.uk wrote:
Why not have a rewrite rule, that looks at the format of the display text and rewrites it only if appropriate?
e.g.
[[1976|AD 1976]] is detected as being an AD date, and rewritten if necessary [[1976|the following year]] does not match, so no changes are made.
If the display text matches Year Epoch or Epoch Year (where Epoch = BC, AD, BCE or CE and ignoring case and whitespace) then rewrite according to user preferences, in all other cases leave as it is.
That sounds like a good idea, so I'll go ahead and add that into the patch.
It'll mean some additional regular expression matching, which will slow down parsing and page display ever-so-slightly, but that seems better than rewriting display text in a potentially unexpected (or unwanted) manner.
-Bill
wikitech-l@lists.wikimedia.org