"contextlines" => 5, "contextchars" => 50,
"skin" => 0, "math" => 1, "rcdays" => 7, "rclimit" => 50,
"highlightbroken" => 1, "stubthreshold" => 0,
- "previewontop" => 1
+ "previewontop" => 1, "editsection"=>1,"editsectiononrightclick"=>0, "showtoc"=>1,
+ "date" => 0
);
/* private */ $wgQuickbarSettingsEn = array(
"Recommended for modern browsers"
);
+/* private */ $wgDateFormatsEn = array(
+ "No preference",
+ "January 15, 2001",
+ "15 January 2001",
+ "2001 January 15"
+);
+
/* private */ $wgUserTogglesEn = array(
"hover" => "Show hoverbox over wiki links",
"underline" => "Underline links",
"hideminor" => "Hide minor edits in recent changes",
"usenewrc" => "Enhanced recent changes (not for all browsers)",
"numberheadings" => "Auto-number headings",
+ "editondblclick" => "Edit pages on double click (JavaScript)",
+ "editsection"=>"Enable section editing via [edit] links",
+ "editsectiononrightclick"=>"Enable section editing by right clicking<br> on section titles (JavaScript)",
+ "showtoc"=>"Show table of contents<br>(for articles with more than 3 headings)",
"rememberpassword" => "Remember password across sessions",
"editwidth" => "Edit box has full width",
- "editondblclick" => "Edit pages on double click (JavaScript)",
- "watchdefault" => "Watch new and modified articles",
+ "watchdefault" => "Add pages you edit to your watchlist",
"minordefault" => "Mark all edits minor by default",
"previewontop" => "Show preview before edit box and not after it",
"nocache" => "Disable page caching"
"yo" => "Yoruba",
"za" => "Zhuang",
"zh" => "中文 (Zhongwen)",
+ "zh-cn" => "中文(简体) (Simplified Chinese)",
+ "zh-tw" => "中文(繁体) (Traditional Chinese)",
"zu" => "Zulu"
);
"Whatlinkshere" => "",
"Recentchangeslinked" => "",
"Movepage" => "",
- "Booksources" => "External book sources"
+ "Booksources" => "External book sources",
+"Categories" => "Page categories",
);
/* private */ $wgSysopSpecialPagesEn = array(
# Bits of text used by many pages:
#
+"categories" => "Page categories",
+"category" => "category",
+"category_header" => "Articles in category \"$1\"",
+"subcategories" => "Subcategories",
+
"linktrail" => "/^([a-z]+)(.*)\$/sD",
"mainpage" => "Main Page",
"mainpagetext" => "Wiki software successfully installed.",
"unprotectthispage" => "Unprotect this page",
"newpage" => "New page",
"talkpage" => "Discuss this page",
+"postcomment" => "Post a comment",
"articlepage" => "View article",
"subjectpage" => "View subject", # For compatibility
"userpage" => "View user page",
"viewtalkpage" => "View discussion",
"otherlanguages" => "Other languages",
"redirectedfrom" => "(Redirected from $1)",
-"lastmodified" => "It was last modified $1.",
+"lastmodified" => "This page was last modified $1.",
"viewcount" => "This page has been accessed $1 times.",
"gnunote" => "All text is available under the terms of the <a class=internal href='/wiki/GNU_FDL'>GNU Free Documentation License</a>.",
"printsubtitle" => "(From http://www.wikipedia.org)",
"retrievedfrom" => "Retrieved from \"$1\"",
"newmessages" => "You have $1.",
"newmessageslink" => "new messages",
+"editsection"=>"edit",
+"toc" => "Table of contents",
+"showtoc" => "show",
+"hidetoc" => "hide",
# Main script and global functions
#
\"$1\"
from within function \"$2\".
MySQL returned error \"$3: $4\".\n",
-"noconnect" => "Could not connect to DB on $1",
+"noconnect" => "Sorry! The wiki is experiencing some technical difficulties, and cannot contact the database server.",
"nodb" => "Could not select database $1",
+"cachederror" => "The following is a cached copy of the requested page, and may not be up to date.",
"readonly" => "Database locked",
"enterlockreason" => "Enter a reason for the lock, including an estimate
of when the lock will be released",
# Edit pages
#
"summary" => "Summary",
+"subject" => "Subject/headline",
"minoredit" => "This is a minor edit",
"watchthis" => "Watch this article",
"savearticle" => "Save page",
"previewconflict" => "This preview reflects the text in the upper
text editing area as it will appear if you choose to save.",
"editing" => "Editing $1",
+"sectionedit" => " (section)",
+"commentedit" => " (comment)",
"editconflict" => "Edit conflict: $1",
"explainconflict" => "Someone else has changed this page since you
started editing it.
Search in namespaces :<br>
$1<br>
$2 List redirects Search for $3 $9",
-
+"blanknamespace" => "(Main)",
# Preferences page
#
wfLocalUrl( "Special:Userlogin" ) . "\">logged in</a>
to set user preferences.",
"prefslogintext" => "You are logged in as \"$1\".
-Your internal ID number is $2.",
+Your internal ID number is $2.
+
+See [[Wikipedia:User preferences help]] for help deciphering the options.",
"prefsreset" => "Preferences have been reset from storage.",
"qbsettings" => "Quickbar settings",
"changepassword" => "Change password",
"skin" => "Skin",
"math" => "Rendering math",
+"dateformat" => "Date format",
"math_failure" => "Failed to parse",
"math_unknown_error" => "unknown error",
"math_unknown_function" => "unknown function ",
"servertime" => "Server time is now",
"guesstimezone" => "Fill in from browser",
"emailflag" => "Disable e-mail from other users",
+"defaultns" => "Search in these namespaces by default:",
# Recent changes
#
"rcnotefrom" => "Below are the changes since <b>$2</b> (up to <b>$1</b> shown).",
"rclistfrom" => "Show new changes starting from $1",
# "rclinks" => "Show last $1 changes in last $2 hours / last $3 days",
-"rclinks" => "Show last $1 changes in last $2 days.",
+# "rclinks" => "Show last $1 changes in last $2 days.",
+"rclinks" => "Show last $1 changes in last $2 days; $3 minor edits",
"rchide" => "in $4 form; $1 minor edits; $2 secondary namespaces; $3 multiple edits.",
+"rcliu" => "; $1 edits from logged in users",
"diff" => "diff",
"hist" => "hist",
"hide" => "hide",
"uploadnologintext" => "You must be <a href=\"" .
wfLocalUrl( "Special:Userlogin" ) . "\">logged in</a>
to upload files.",
-"uploadfile" => "Upload file",
+"uploadfile" => "Upload images, sounds, documents etc.",
"uploaderror" => "Upload error",
"uploadtext" => "<strong>STOP!</strong> Before you upload here,
make sure to read and follow Wikipedia's <a href=\"" .
"longpages" => "Long pages",
"listusers" => "User list",
"specialpages" => "Special pages",
-"spheading" => "Special pages",
-"sysopspheading" => "Special pages for sysop use",
-"developerspheading" => "Special pages for developer use",
+"spheading" => "Special pages for all users",
+"sysopspheading" => "For sysop use only",
+"developerspheading" => "For developer use only",
"protectpage" => "Protect page",
"recentchangeslinked" => "Related changes",
"rclsub" => "(to pages linked from \"$1\")",
#
"deletepage" => "Delete page",
"confirm" => "Confirm",
+"excontent" => "content was:",
+"exbeforeblank" => "content before blanking was:",
+"exblank" => "page was empty",
"confirmdelete" => "Confirm delete",
"deletesub" => "(Deleting \"$1\")",
+"historywarning" => "Warning: The page you are about to delete has a history: ",
"confirmdeletetext" => "You are about to permanently delete a page
or image along with all of its history from the database.
Please confirm that you intend to do this, that you understand the
"imagereverted" => "Revert to earlier version was successful.",
"rollback" => "Roll back edits",
"rollbacklink" => "rollback",
-"cantrollback" => "Can't revert edit; last contributor is only author of this article.",
+"rollbackfailed" => "Rollback failed",
+"cantrollback" => "Cannot revert edit; last contributor is only author of this article.",
+"alreadyrolled" => "Cannot rollback last edit of [[$1]]
+by [[User:$2|$2]] ([[User talk:$2|Talk]]); someone else has edited or rolled back the article already.
+
+Last edit was by [[User:$3|$3]] ([[User talk:$3|Talk]]). ",
+# only shown if there is an edit comment
+"editcomment" => "The edit comment was: \"<i>$1</i>\".",
"revertpage" => "Reverted to last edit by $1",
# Undelete
Use single quotes ('like this') to delimit string literals.
This can often add considerable load to the server, so please use
this function sparingly.",
+"sqlislogged" => "Please note that all queries are logged.",
"sqlquery" => "Enter query",
"querybtn" => "Submit query",
"selectonly" => "Queries other than \"SELECT\" are restricted to
global $wgMathNamesEn;
return $wgMathNamesEn;
}
+
+ function getDateFormats() {
+ global $wgDateFormatsEn;
+ return $wgDateFormatsEn;
+ }
function getUserToggles() {
global $wgUserTogglesEn;
global $wgMonthNamesEn;
return $wgMonthNamesEn[$key-1];
}
-
+
/* by default we just return base form */
function getMonthNameGen( $key )
{
global $wgMonthNamesEn;
return $wgMonthNamesEn[$key-1];
}
+
+ function getMonthRegex()
+ {
+ global $wgMonthNamesEn;
+ return implode( "|", $wgMonthNamesEn );
+ }
function getMonthAbbreviation( $key )
{
function date( $ts, $adj = false )
{
- global $wgAmericanDates;
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
+ global $wgAmericanDates, $wgUser, $wgUseDynamicDates;
- if( $wgAmericanDates ) {
+ if ( $adj ) { $ts = $this->userAdjust( $ts ); }
+
+ if ( $wgUseDynamicDates ) {
+ $datePreference = $wgUser->getOption( 'date' );
+ if ( $datePreference == 0 ) {
+ $datePreference = $wgAmericanDates ? 1 : 2;
+ }
+ } else {
+ $datePreference = $wgAmericanDates ? 1 : 2;
+ }
+
+ if ( $datePreference == 1 ) {
+ # MDY
$d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
" " . (0 + substr( $ts, 6, 2 )) . ", " .
substr( $ts, 0, 4 );
- } else {
+ } else if ( $datePreference == 2 ) {
+ #DMY
$d = (0 + substr( $ts, 6, 2 )) . " " .
$this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " .
substr( $ts, 0, 4 );
+ } else {
+ #YMD
+ $d = substr( $ts, 0, 4 ) . " " . $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
+ " " . (0 + substr( $ts, 6, 2 ));
}
+
return $d;
}
function timeanddate( $ts, $adj = false )
{
- return $this->time( $ts, $adj ) . " " . $this->date( $ts, $adj );
+ return $this->time( $ts, $adj ) . ", " . $this->date( $ts, $adj );
}
function rfc1123( $ts )
}
}
+ function replaceDates( $text )
+ {
+ global $wgUser, $wgInputEncoding, $wgUseDynamicDates;
+
+ # Feature can be disabled
+ if ( !$wgUseDynamicDates ) {
+ return;
+ }
+
+ # Setup
+
+ $datePreference = $wgUser->getOption( 'date' );
+
+ static $monthNames = "", $rxDM, $rxMD, $rxY, $rxDMY, $rxYDM, $rxMDY, $rxYMD;
+ if ( $monthNames == "" ) {
+ $monthNames = $this->getMonthRegex();
+
+ # Attempt at UTF-8 support, untested at the moment
+ if ( $wgInputEncoding == 'UTF-8' ) {
+ $regexTrail = '(?![a-z])/iu';
+ } else {
+ $regexTrail = '(?![a-z])/i';
+ }
+
+ # Partial regular expressions
+ $prxDM = '\[\[(\d{1,2})[ _](' . $monthNames . ')]]';
+ $prxMD = '\[\[(' . $monthNames . ')[ _](\d{1,2})]]';
+ $prxY = '\[\[(\d{1,4}([ _]BC|))]]';
+
+ # Real regular expressions
+ $rxDMY = "/{$prxDM} *,? *{$prxY}{$regexTrail}";
+ $rxYDM = "/{$prxY} *,? *{$prxDM}{$regexTrail}";
+ $rxMDY = "/{$prxMD} *,? *{$prxY}{$regexTrail}";
+ $rxYMD = "/{$prxY} *,? *{$prxMD}{$regexTrail}";
+ $rxDM = "/{$prxDM}{$regexTrail}";
+ $rxMD = "/{$prxMD}{$regexTrail}";
+ $rxY = "/{$prxY}{$regexTrail}";
+ }
+
+ # Do replacements
+ # TODO: month capitalisation?
+ if ( $datePreference == 0 ) {
+ # no preference
+ $text = preg_replace( $rxDMY, '[[$2 $1|$1 $2]] [[$3]]', $text);
+ $text = preg_replace( $rxYDM, '[[$1]] [[$4 $3]]', $text);
+ $text = preg_replace( $rxMDY, '[[$1 $2]], [[$3]]', $text);
+ $text = preg_replace( $rxYMD, '[[$1]] [[$3 $4]]', $text);
+ $text = preg_replace ( $rxDM, '[[$2 $1|$1 $2]]', $text);
+ } else if ( $datePreference == 1 ) {
+ # MDY preferred
+ $text = preg_replace( $rxDMY, '[[$2 $1]], [[$3]]', $text);
+ $text = preg_replace( $rxYDM, '[[$4 $3]], [[$1]]', $text);
+ $text = preg_replace( $rxMDY, '[[$1 $2]], [[$3]]', $text);
+ $text = preg_replace( $rxYMD, '[[$3 $4]], [[$1]]', $text);
+ $text = preg_replace ( $rxDM, '[[$2 $1]]', $text);
+ } else if ( $datePreference == 2 ) {
+ # DMY preferred
+ $text = preg_replace( $rxDMY, '[[$2 $1|$1 $2]] [[$3]]', $text);
+ $text = preg_replace( $rxYDM, '[[$4 $3|$3 $4]] [[$1]]', $text);
+ $text = preg_replace( $rxMDY, '[[$1 $2|$2 $1]] [[$3]]', $text);
+ $text = preg_replace( $rxYMD, '[[$3 $4|$4 $3]] [[$1]]', $text);
+ $text = preg_replace ( $rxDM, '[[$2 $1|$1 $2]]', $text);
+ $text = preg_replace ( $rxMD, '[[$1 $2|$2 $1]]', $text);
+ } else if ( $datePreference == 3 ) {
+ # YMD preferred
+ $text = preg_replace( $rxDMY, '[[$3]] [[$2 $1]]', $text);
+ $text = preg_replace( $rxYDM, '[[$1]] [[$4 $3]]', $text);
+ $text = preg_replace( $rxMDY, '[[$3]] [[$1 $2]]', $text);
+ $text = preg_replace( $rxYMD, '[[$1]] [[$3 $4]]', $text);
+ $text = preg_replace ( $rxDM, '[[$2 $1]]', $text);
+ }
+ return $text;
+ }
+
+ # For right-to-left language support
+ function isRTL() { return false; }
}
global $IP;