BC vs BCE era names

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

BC vs BCE era names

Bill Clark-2
I've added the ability to specify a preference (or no preference) for
era names in dates (BC vs. BCE).  I've also fixed a couple bugs in the
regular expressions that match for dates, that were preventing the
parser from recognizing (and converting) dates that ended in BCE or
which were written in ISO format and fell between -999-01-01 and
999-12-31 (i.e. had a one-, two-, or three-digit year).

I'm not an actual committer so I'm submitting this as a diff -ru to
the mailing list.  I'm sure that's the wrong procedure and I'll be
scolded for it, but hey I'll learn.

I've tested this and it works on my local version (checked out of svn
a few hours ago) but I imagine it should be tested more.

-Bill Clark

---------- Forwarded message ----------
From: Charlie Root <[hidden email]>
Date: Sep 4, 2006 9:12 PM
Subject:
To: [hidden email]


Only in phase3.new/: LocalSettings.php
Only in phase3.new/config: LocalSettings.php
diff -ru --exclude=.svn phase3/includes/DateFormatter.php
phase3.new/includes/DateFormatter.php
--- phase3/includes/DateFormatter.php   Mon Sep  4 21:07:04 2006
+++ phase3.new/includes/DateFormatter.php       Mon Sep  4 21:03:26 2006
@@ -49,9 +49,9 @@
                # Partial regular expressions
                $this->prxDM = '\[\[(\d{1,2})[ _](' . $this->monthNames . ')]]';
                $this->prxMD = '\[\[(' . $this->monthNames . ')[ _](\d{1,2})]]';
-               $this->prxY = '\[\[(\d{1,4}([ _]BC|))]]';
-               $this->prxISO1 = '\[\[(-?\d{4})]]-\[\[(\d{2})-(\d{2})]]';
-               $this->prxISO2 = '\[\[(-?\d{4})-(\d{2})-(\d{2})]]';
+               $this->prxY = '\[\[(\d{1,4}([ _]BCE?|))]]';
+               $this->prxISO1 = '\[\[(-?\d{1,4})]]-\[\[(\d{2})-(\d{2})]]';
+               $this->prxISO2 = '\[\[(-?\d{1,4})-(\d{2})-(\d{2})]]';

                # Real regular expressions
                $this->regexes[self::DMY] = "/{$this->prxDM} *,?
*{$this->prxY}{$this->regexTrail}";
@@ -121,12 +121,13 @@
         * @param string $preference User preference
         * @param string $text Text to reformat
         */
-       function reformat( $preference, $text ) {
+       function reformat( $preference, $eraPreference, $text ) {
                if ( isset( $this->preferences[$preference] ) ) {
                        $preference = $this->preferences[$preference];
                } else {
                        $preference = self::NONE;
                }
+               $this->eraPreference = $eraPreference;
                for ( $i=1; $i<=self::LAST; $i++ ) {
                        $this->mSource = $i;
                        if ( @$this->rules[$preference][$i] ) {
@@ -219,7 +220,13 @@
                                        if ( !isset( $bits['Y'] ) ) {
                                                $text .=
$this->makeNormalYear( $bits['y'] );
                                        } else {
-                                               $text .= $bits['Y'];
+                                               if (
$this->eraPreference == 'BCE' ) {
+                                                       $text .=
preg_replace( '/BC$/', 'BCE', $bits['Y']);
+                                               } elseif (
$this->eraPreference == 'BC' ) {
+                                                       $text .=
preg_replace( '/BCE$/', 'BC', $bits['Y']);
+                                               } else {
+                                                       $text .= $bits['Y'];
+                                               }
                                        }
                                        break;
                                default:
@@ -264,7 +271,11 @@
         */
        function makeIsoYear( $year ) {
                # Assumes the year is in a nice format, as enforced by the regex
-               if ( substr( $year, -2 ) == 'BC' ) {
+               if ( substr( $year, -3 ) == 'BCE' ) {
+                       $num = intval(substr( $year, 0, -4 )) - 1;
+                       # PHP bug note: sprintf( "%04d", -1 ) fails poorly
+                       $text = sprintf( '-%04d', $num );
+               } elseif ( substr( $year, -2 ) == 'BC' ) {
                        $num = intval(substr( $year, 0, -3 )) - 1;
                        # PHP bug note: sprintf( "%04d", -1 ) fails poorly
                        $text = sprintf( '-%04d', $num );
@@ -280,7 +291,11 @@
         */
        function makeNormalYear( $iso ) {
                if ( $iso{0} == '-' ) {
-                       $text = (intval( substr( $iso, 1 ) ) + 1) . ' BC';
+                       if ( $this->eraPreference == 'BCE' ) {
+                               $text = (intval( substr( $iso, 1 ) ) +
1) . ' BCE';
+                       } else {
+                               $text = (intval( substr( $iso, 1 ) ) +
1) . ' BC';
+                       }
                } else {
                        $text = intval( $iso );
                }
diff -ru --exclude=.svn phase3/includes/Parser.php
phase3.new/includes/Parser.php
--- phase3/includes/Parser.php  Mon Sep  4 21:07:04 2006
+++ phase3.new/includes/Parser.php      Mon Sep  4 20:28:24 2006
@@ -961,7 +961,7 @@
                $text = $this->doHeadings( $text );
                if($this->mOptions->getUseDynamicDates()) {
                        $df =& DateFormatter::getInstance();
-                       $text = $df->reformat(
$this->mOptions->getDateFormat(), $text );
+                       $text = $df->reformat(
$this->mOptions->getDateFormat(), $this->mOptions->getEraFormat(),
$text );
                }
                $text = $this->doAllQuotes( $text );
                $text = $this->replaceInternalLinks( $text );
@@ -4613,6 +4613,13 @@
                        $this->mDateFormat = $this->mUser->getDatePreference();
                }
                return $this->mDateFormat;
+       }
+
+       function getEraFormat() {
+               if ( !isset( $this->mEraFormat ) ) {
+                       $this->mEraFormat = $this->mUser->getEraPreference();
+               }
+               return $this->mEraFormat;
        }

        function setUseTeX( $x )                    { return wfSetVar(
$this->mUseTeX, $x ); }
diff -ru --exclude=.svn phase3/includes/SpecialPreferences.php
phase3.new/includes/SpecialPreferences.php
--- phase3/includes/SpecialPreferences.php      Mon Sep  4 21:07:05 2006
+++ phase3.new/includes/SpecialPreferences.php  Mon Sep  4 20:14:50 2006
@@ -23,7 +23,7 @@
  */
 class PreferencesForm {
        var $mQuickbar, $mOldpass, $mNewpass, $mRetypePass, $mStubs;
-       var $mRows, $mCols, $mSkin, $mMath, $mDate, $mUserEmail,
$mEmailFlag, $mNick;
+       var $mRows, $mCols, $mSkin, $mMath, $mDate, $mEra,
$mUserEmail, $mEmailFlag, $mNick;
        var $mUserLanguage, $mUserVariant;
        var $mSearch, $mRecent, $mHourDiff, $mSearchLines,
$mSearchChars, $mAction;
        var $mReset, $mPosted, $mToggles, $mSearchNs, $mRealName, $mImageSize;
@@ -46,6 +46,7 @@
                $this->mSkin = $request->getVal( 'wpSkin' );
                $this->mMath = $request->getVal( 'wpMath' );
                $this->mDate = $request->getVal( 'wpDate' );
+               $this->mEra = $request->getVal( 'wpEra' );
                $this->mUserEmail = $request->getVal( 'wpUserEmail' );
                $this->mRealName = $wgAllowRealName ?
$request->getVal( 'wpRealName' ) : '';
                $this->mEmailFlag = $request->getCheck( 'wpEmailFlag' ) ? 0 : 1;
@@ -169,6 +170,21 @@
        }

        /**
+        * @access private
+        */
+       function validateEra( $val ) {
+               global $wgLang, $wgContLang;
+               if ( $val !== false && (
+                       in_array( $val, (array)$wgLang->getEraPreferences() ) ||
+                       in_array( $val,
(array)$wgContLang->getEraPreferences() ) ) )
+               {
+                       return $val;
+               } else {
+                       return $wgLang->getDefaultEraFormat();
+               }
+       }
+
+       /**
         * Used to validate the user inputed timezone before saving it as
         * 'timeciorrection', will return '00:00' if fed bogus data.
         * Note: It's not a 100% correct implementation timezone-wise, it will
@@ -263,6 +279,7 @@
                        $wgUser->setOption( 'math', $this->mMath );
                }
                $wgUser->setOption( 'date', $this->validateDate(
$this->mDate ) );
+               $wgUser->setOption( 'era', $this->validateEra( $this->mEra ) );
                $wgUser->setOption( 'searchlimit',
$this->validateIntOrNull( $this->mSearch ) );
                $wgUser->setOption( 'contextlines',
$this->validateIntOrNull( $this->mSearchLines ) );
                $wgUser->setOption( 'contextchars',
$this->validateIntOrNull( $this->mSearchChars ) );
@@ -362,6 +379,7 @@
                $this->mSkin = Skin::normalizeKey( $wgUser->getOption(
'skin' ) );
                $this->mMath = $wgUser->getOption( 'math' );
                $this->mDate = $wgUser->getDatePreference();
+               $this->mEra = $wgUser->getEraPreference();
                $this->mRows = $wgUser->getOption( 'rows' );
                $this->mCols = $wgUser->getOption( 'cols' );
                $this->mStubs = $wgUser->getOption( 'stubthreshold' );
@@ -476,6 +494,7 @@
                $skinNames = $wgLang->getSkinNames();
                $mathopts = $wgLang->getMathNames();
                $dateopts = $wgLang->getDatePreferences();
+               $eraopts = $wgLang->getEraPreferences();
                $togs = User::getToggles();

                $titleObj = Title::makeTitle( NS_SPECIAL, 'Preferences' );
@@ -805,6 +824,19 @@
                        $wgOut->addHTML( "</fieldset>\n" );
                }

+               if ($eraopts) {
+                       $wgOut->addHTML( "<fieldset>\n<legend>" .
wfMsg( 'eraformat' ) . "</legend>\n" );
+                       $idCnt = 0;
+                       foreach( $eraopts as $key ) {
+                               $formatted = wfMsgHtml( 'era'.$key );
+                               ($key == $this->mEra) ? $checked = '
checked="checked"' : $checked = '';
+                               $wgOut->addHTML( "<div><input
type='radio' name=\"wpEra\" id=\"wpEra$idCnt\" ".
+                                       "value=\"$key\"$checked />
<label for=\"wpEra$idCnt\">$formatted</label></div>\n" );
+                               $idCnt++;
+                       }
+                       $wgOut->addHTML( "</fieldset>\n" );
+               }
+
                $nowlocal = $wgLang->time( $now = wfTimestampNow(), true );
                $nowserver = $wgLang->time( $now, false );

@@ -820,6 +852,7 @@
                                </td></tr></table></fieldset>
                        <div class='prefsectiontip'>¹" .  wfMsg(
'timezonetext' ) . "</div>
                </fieldset>\n\n" );
+

                # Editing
                #
diff -ru --exclude=.svn phase3/includes/User.php phase3.new/includes/User.php
--- phase3/includes/User.php    Mon Sep  4 21:07:04 2006
+++ phase3.new/includes/User.php        Mon Sep  4 20:13:47 2006
@@ -1174,6 +1174,18 @@
        }

        /**
+        * Get the user's era names preference.
+        */
+       function getEraPreference() {
+               if ( is_null( $this->mEraPreference ) ) {
+                       global $wgLang;
+                       $value = $this->getOption( 'era' );
+                       $this->mEraPreference = $value;
+               }
+               return $this->mEraPreference;
+       }
+
+       /**
         * @param string $oname The option to check
         * @return bool False if the option is not selected, true if it is
         */
diff -ru --exclude=.svn phase3/languages/Language.php
phase3.new/languages/Language.php
--- phase3/languages/Language.php       Mon Sep  4 21:07:24 2006
+++ phase3.new/languages/Language.php   Mon Sep  4 20:01:35 2006
@@ -67,7 +67,7 @@
                'separatorTransformTable', 'fallback8bitEncoding',
'linkPrefixExtension',
                'defaultUserOptionOverrides', 'linkTrail', 'namespaceAliases',
                'dateFormats', 'datePreferences', 'datePreferenceMigrationMap',
-               'defaultDateFormat', 'extraUserToggles' );
+               'defaultDateFormat', 'eraPreferences', 'extraUserToggles' );

        static public $mMergeableMapKeys = array( 'messages',
'namespaceNames', 'mathNames',
                'dateFormats', 'defaultUserOptionOverrides', 'magicWords' );
@@ -269,6 +269,11 @@
        function getDatePreferences() {
                $this->load();
                return $this->datePreferences;
+       }
+
+       function getEraPreferences() {
+               $this->load();
+               return $this->eraPreferences;
        }

        function getDateFormats() {
diff -ru --exclude=.svn phase3/languages/MessagesEn.php
phase3.new/languages/MessagesEn.php
--- phase3/languages/MessagesEn.php     Mon Sep  4 21:07:24 2006
+++ phase3.new/languages/MessagesEn.php Mon Sep  4 21:05:23 2006
@@ -179,6 +179,17 @@
        'ISO 8601 both' => 'xnY-xnm-xnd"T"xnH:xni:xns',
 );

+/**
+ * A list of era naming preference keys which can be selected in user
+ * preferences.
+ *
+ */
+$eraPreferences = array(
+       'default',
+       'BC',
+       'BCE',
+);
+
 $bookstoreList = array(
        'AddALL' => 'http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN',
        'PriceSCAN' => 'http://www.pricescan.com/books/bookDetail.asp?isbn=$1',
@@ -1007,6 +1018,10 @@
 'dateformat'           => 'Date format',
 'datedefault'          => 'No preference',
 'datetime'             => 'Date and time',
+'eraformat'            => 'Era Names',
+'eradefault'           => 'No Preference',
+'eraBC'                        => 'AD/BC',
+'eraBCE'               => 'CE/BCE',
 'math_failure'         => 'Failed to parse',
 'math_unknown_error'   => 'unknown error',
 'math_unknown_function'        => 'unknown function',
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Simetrical
On 9/5/06, Bill Clark <[hidden email]> wrote:
> I'm not an actual committer so I'm submitting this as a diff -ru to
> the mailing list.  I'm sure that's the wrong procedure and I'll be
> scolded for it, but hey I'll learn.

The procedure is to file a feature request (bug) at
http://bugs.wikimedia.org/, then attach this as a patch.  That
provides a centralized place to discuss, note updates, get people to
vote for it, etc.
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Bill Clark-2
On 9/4/06, Simetrical <[hidden email]> wrote:
> On 9/5/06, Bill Clark <[hidden email]> wrote:
> > I'm not an actual committer so I'm submitting this as a diff -ru to
> > the mailing list.  I'm sure that's the wrong procedure and I'll be
> > scolded for it, but hey I'll learn.
>
> The procedure is to file a feature request (bug) at
> http://bugs.wikimedia.org/, then attach this as a patch.  That
> provides a centralized place to discuss, note updates, get people to
> vote for it, etc.

Thanks!  I've submitted the bug and attached the patch.

-Bill
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Neil Harris
In reply to this post by Bill Clark-2
Bill Clark wrote:

> I've added the ability to specify a preference (or no preference) for
> era names in dates (BC vs. BCE).  I've also fixed a couple bugs in the
> regular expressions that match for dates, that were preventing the
> parser from recognizing (and converting) dates that ended in BCE or
> which were written in ISO format and fell between -999-01-01 and
> 999-12-31 (i.e. had a one-, two-, or three-digit year).
>
> I'm not an actual committer so I'm submitting this as a diff -ru to
> the mailing list.  I'm sure that's the wrong procedure and I'll be
> scolded for it, but hey I'll learn.
>
> I've tested this and it works on my local version (checked out of svn
> a few hours ago) but I imagine it should be tested more.
>
> -Bill Clark
>
>  
That's a great idea. It might also be useful to make the code also
switch 'AD' and 'CE', for dates such as, for example, 4 AD / 4 CE.

-- Neil

_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Bill Clark-2
On 9/5/06, Neil Harris <[hidden email]> wrote:

> That's a great idea. It might also be useful to make the code also
> switch 'AD' and 'CE', for dates such as, for example, 4 AD / 4 CE.

I didn't think anybody actually used AD or CE in articles, but I see
now on the Manual of Style page that it reads:

>> Normally you should use plain numbers for years in the Anno
Domini/Common Era,
>> but when events span the start of the Anno Domini/Common Era, use
AD or CE for
>> the date at the end of the range (note that AD precedes the date
and CE follows it).
>> For example, [[1 BC]]–[[1|AD 1]] or [[1 BCE]]–[[1|1 CE]].

There doesn't seem to be any code to handle this currently for AD,
which is why it didn't occur to me right off the bat.  You're right
though, and it should be included.  I'm busy over the next few days
but I can add this into the patch sometime this week (along with
whatever other changes people suggest).

-Bill
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

David Gerard-2
On 05/09/06, Bill Clark <[hidden email]> wrote:

> There doesn't seem to be any code to handle this currently for AD,
> which is why it didn't occur to me right off the bat.  You're right
> though, and it should be included.  I'm busy over the next few days
> but I can add this into the patch sometime this week (along with
> whatever other changes people suggest).


It's been a vexed question on en:. I mentioned it on wikien-l, you may
want to ask there for any missing features (though I can't think of
any past automatic conversion).


- d.
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Bill Clark-2
> On 05/09/06, Bill Clark <[hidden email]> wrote:
> > There doesn't seem to be any code to handle this currently for AD,
> > which is why it didn't occur to me right off the bat.  You're right
> > though, and it should be included.  I'm busy over the next few days
> > but I can add this into the patch sometime this week (along with
> > whatever other changes people suggest).

On 9/5/06, David Gerard <[hidden email]> wrote:
> It's been a vexed question on en:. I mentioned it on wikien-l, you may
> want to ask there for any missing features (though I can't think of
> any past automatic conversion).

Thanks for the pointer; I've subscribed to that list.

I went ahead and started looking into adding AD/CE rewriting
functionality, and noticed something that might put a damper on those
plans.. AD or CE only ever appear in the right (display) portion of a
wikilinked date, as in:

... lasted from [[August 13]], [[10 BC]]&ndash;[[January 23]], [[15|AD 15]] ...

Both the current code and my patch would leave the date on the right
entirely alone, since it contains explicit display text.  This makes
sense, since the editor actually went to the trouble of specifying how
to display the date, and we wouldn't want to thoughtlessly override
that.

So it seems we're left with three options:

1) Ignore wikilinked dates that contain explicit display text, leaving
them untouched.
2) Change all wikilinked dates and associated display text according
to user preferences.
3) Encourage a mass renaming of year articles from (e.g.) [[1984]] to
[[AD 1984]].

Even though option 3 is completely unrealistic, I mention it because
it actually makes the most sense (how did we get started having bare
numbers assumed to be a date by default, anyway?).  That said, I think
option 2 is the best bet, so long as it's considered more important to
have consistent date formatting than to honor the display text put in
place by editors.

Note that this is already a problem on the current WP, since the
following won't display according to a user's preferences anyway:

[[March 21]], [[1974|1974]]

The current solution is to follow option 1, and that's what's already
in place in the patch I just submitted.  I've posted some of this
discussion there as well (bug 7239) in case people would rather follow
up there.

I'm really really going to bed now and not going to work on this
anymore for a few days, I swear, so I'll get back to this later.

-Bill Clark
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Steve Bennett-4
On 9/5/06, Bill Clark <[hidden email]> wrote:

>
> 1) Ignore wikilinked dates that contain explicit display text, leaving
> them untouched.
> 2) Change all wikilinked dates and associated display text according
> to user preferences.
> 3) Encourage a mass renaming of year articles from (e.g.) [[1984]] to
> [[AD 1984]].
>
> Even though option 3 is completely unrealistic, I mention it because
> it actually makes the most sense (how did we get started having bare
> numbers assumed to be a date by default, anyway?).  That said, I think
> option 2 is the best bet, so long as it's considered more important to
> have consistent date formatting than to honor the display text put in
> place by editors.



I vote for option 3. There are only 2006 or so of them.

Steve
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Neil Harris
Steve Bennett wrote:

> On 9/5/06, Bill Clark <[hidden email]> wrote:
>  
>> 1) Ignore wikilinked dates that contain explicit display text, leaving
>> them untouched.
>> 2) Change all wikilinked dates and associated display text according
>> to user preferences.
>> 3) Encourage a mass renaming of year articles from (e.g.) [[1984]] to
>> [[AD 1984]].
>>
>> Even though option 3 is completely unrealistic, I mention it because
>> it actually makes the most sense (how did we get started having bare
>> numbers assumed to be a date by default, anyway?).  That said, I think
>> option 2 is the best bet, so long as it's considered more important to
>> have consistent date formatting than to honor the display text put in
>> place by editors.
>>    
>
>
>
> I vote for option 3. There are only 2006 or so of them.
>
> Steve
>
>  
Oh, please, please, don't even _think_ about option 3. You are now
required to chant WP:LAME backwards whilst throwing salt over your left
shoulder.

-- Neil, on baktun 12 katun 19 tun 13 uinal 11 kin 1.

_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Steve Bennett-4
On 9/5/06, Neil Harris <[hidden email]> wrote:
> Oh, please, please, don't even _think_ about option 3. You are now
> required to chant WP:LAME backwards whilst throwing salt over your left
> shoulder.

Ok, I'm going to plead ignorance. Is the problem with option 3 that
1995 is a better name for an article than AD 1995, or that renaming
1995 to *anything* is not worth the trouble?

Steve
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Tuvic
Steve Bennett wrote:
> Ok, I'm going to plead ignorance. Is the problem with option 3 that
> 1995 is a better name for an article than AD 1995, or that renaming
> 1995 to *anything* is not worth the trouble?

It may be that 1995 is a better name, but renaming 1995 to *anything is
indeed not worth the trouble. After 2060 page moves, you have to check for
double redirects, and maybe correct all links to "1995". Also, you're left
with the choise: do you leave the 2060 redirects the way they are, or do you
make a disambiguation page from them? Of worse, do you move the number where
the year used to be.

Whatever you do, interwikilinking will be totally (and really totally)
broken for the year-articles, and will probably take years to correct it. In
my point of view, this is the most significant reason to not move the
year-pages.

Greetings, Tuvic
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Neil Harris
Tuvic wrote:

> Steve Bennett wrote:
>  
>> Ok, I'm going to plead ignorance. Is the problem with option 3 that
>> 1995 is a better name for an article than AD 1995, or that renaming
>> 1995 to *anything* is not worth the trouble?
>>    
>
> It may be that 1995 is a better name, but renaming 1995 to *anything is
> indeed not worth the trouble. After 2060 page moves, you have to check for
> double redirects, and maybe correct all links to "1995". Also, you're left
> with the choise: do you leave the 2060 redirects the way they are, or do you
> make a disambiguation page from them? Of worse, do you move the number where
> the year used to be.
>
> Whatever you do, interwikilinking will be totally (and really totally)
> broken for the year-articles, and will probably take years to correct it. In
> my point of view, this is the most significant reason to not move the
> year-pages.
>
>
>  
And, _then_, you will have problem of fixing all the links in the
continual move/edit war that will inevitably result from this, as each
of the 2060 different year articles is repeatedly moved from [[AD X]] to
[[X CE]], to [[X AD]], then to [[X]] again, and on, and on, and on,
whilst each group of combatants desperately tries to fix the links in
all linking articles to point to their preferred version, in the
greatest and [[WP:LAME]]st ever edit war in the history of Wikipedia.

-- Neil
>
>  

_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Andre Engels
In reply to this post by Tuvic
2006/9/7, Tuvic <[hidden email]>:

> Whatever you do, interwikilinking will be totally (and really totally)
> broken for the year-articles, and will probably take years to correct it. In
> my point of view, this is the most significant reason to not move the
> year-pages.

That's much less work than you think - if I set my interwiki bot to
work on it (it already has settings for it, actually), I will have
things fixed in about 2 days. Although I would suppose that some
languages would get angry with me for flooding recent changes....


--
Andre Engels, [hidden email]
ICQ: 6260644  --  Skype: a_engels
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: BC vs BCE era names

Tuvic
Andre Engels wrote:
> That's much less work than you think - if I set my interwiki bot to
> work on it (it already has settings for it, actually), I will have
> things fixed in about 2 days. Although I would suppose that some
> languages would get angry with me for flooding recent changes....

Indeed, you'll probably get blocked, most likely somewhere halfway.
Also, you take to take into account that a lot of interwikilinks are
pointing to the wrong things. For example, the Japanese articles about
years have a Japanese character after the name, but in som wiki's, all
interwikilinks are pointing to the wrong articles, the ones about
numbers. Also, some wikis have turned the years into redirects to
decades, and some of those decades are already spread around in the
years.

I did a bot-run on the years (a lot of small ones actually) in july,
ranging from -500 up to 2060, and I found a lot of really stupid
mistakes and silly things: like making an typo, which off course makes
it ambigious. I fixed a lot of things, but there's still a lot of
mistakes out there...

Greetings, Tuvic

P.S. This might be a little off topic.
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Fwd: [WikiEN-l] Fwd: BC vs BCE era names

Bill Clark-2
In reply to this post by Bill Clark-2
On 9/8/06, ScottL <[hidden email]> 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]]&ndash;[[July 4]], [[1776|AD 1776]]

...and this is proper:

[[March 21]], [[1974]]&ndash;[[October 16]],[[1975]]

...but this is not:

[[March 21]], [[1974|AD 1974]]&ndash;[[October 16]],[[1975|AD 1975]]

...and this is not:

[[July 4]], [[1776 BC]]&ndash;[[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
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [WikiEN-l] Fwd: BC vs BCE era names

Mark Clements (HappyDog)
"Bill Clark" <[hidden email]> wrote in
message news:[hidden email]...
> On 9/8/06, ScottL <[hidden email]> 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)



_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [WikiEN-l] Fwd: BC vs BCE era names

Bill Clark-2
On 9/10/06, Mark Clements <[hidden email]> 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 mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l