-<?
+<?php
#--------------------------------------------------------------------------
# Constants
#--------------------------------------------------------------------------
define("MAG_MSGNW", 13);
define("MAG_NOEDITSECTION", 14);
define("MAG_END", 15);
+define("MAG_IMG_THUMBNAIL", 16);
+define("MAG_IMG_RIGHT", 17);
+define("MAG_IMG_LEFT", 18);
+define("MAG_IMG_NONE", 19);
+define("MAG_IMG_WIDTH", 20);
+define("MAG_IMG_CENTER", 21);
+
#--------------------------------------------------------------------------
# Language-specific text
# NOTE: To turn off "Current Events" in the sidebar,
# set "currentevents" => "-"
+# NOTE: To turn off "Disclaimers" in the title links,
+# set "disclaimers" => "-"
+
# The names of the namespaces can be set here, but the numbers
# are magical, so don't change or move them! The Namespace class
# encapsulates some of the magic-ness.
"skin" => 0, "math" => 1, "rcdays" => 7, "rclimit" => 50,
"highlightbroken" => 1, "stubthreshold" => 0,
"previewontop" => 1, "editsection"=>1,"editsectiononrightclick"=>0, "showtoc"=>1,
+ "showtoolbar" =>1,
"date" => 0
);
"hideminor" => "Hide minor edits in recent changes",
"usenewrc" => "Enhanced recent changes (not for all browsers)",
"numberheadings" => "Auto-number headings",
+ "showtoolbar"=>"Show edit box toolbar",
"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)",
"az" => "Азәрбајҹан (Azerbajan)",
"ba" => "Башкорт (Bashkort)",
"be" => "Беларуски",
+ "bg" => "Bulgarian",
"bh" => "Bihara",
"bi" => "Bislama",
"bn" => "Bengali",
"es" => "Español",
"et" => "Eesti",
"eu" => "Euskara",
- "fa" => "‮فرسى‬ (Farsi)",
+ "fa" => "‮فارسی‬ (Farsi)",
"fi" => "Suomi",
"fj" => "Fijian",
"fo" => "Faeroese",
"kn" => "ಕನ್ನಡ (Kannada)",
"ko" => "한국어 (Hangukeo)",
"ks" => "Kashmiri",
+ "ku" => "Kurdî",
"kw" => "Kernewek",
"ky" => "Kirghiz",
"la" => "Latina",
MAG_START => array( 0, "__START__" ),
MAG_CURRENTMONTH => array( 1, "{{CURRENTMONTH}}" ),
MAG_CURRENTMONTHNAME => array( 1, "{{CURRENTMONTHNAME}}" ),
- MAG_CURRENTDAY => array( 1, "{{CURRENTDAY}}" ),
+ MAG_CURRENTDAY => array( 1, "{{CURRENTDAY}}" ),
MAG_CURRENTDAYNAME => array( 1, "{{CURRENTDAYNAME}}" ),
MAG_CURRENTYEAR => array( 1, "{{CURRENTYEAR}}" ),
MAG_CURRENTTIME => array( 1, "{{CURRENTTIME}}" ),
MAG_MSG => array( 0, "{{MSG:$1}}" ),
MAG_SUBST => array( 0, "{{SUBST:$1}}" ),
MAG_MSGNW => array( 0, "{{MSGNW:$1}}" ),
- MAG_END => array( 0, "__END__" )
+ MAG_END => array( 0, "__END__" ),
+ MAG_IMG_THUMBNAIL => array( 1, "thumbnail", "thumb" ),
+ MAG_IMG_RIGHT => array( 1, "right" ),
+ MAG_IMG_LEFT => array( 1, "left" ),
+ MAG_IMG_NONE => array( 1, "none" ),
+ MAG_IMG_WIDTH => array( 1, "$1px" ),
+ MAG_IMG_CENTER => array( 1, "center", "centre" )
+
);
-
+
# All special pages have to be listed here: a description of ""
# will make them not show up on the "Special Pages" page, which
# is the right thing for some of them (such as the "targeted" ones).
"Booksources" => "External book sources",
# "Categories" => "Page categories",
"Export" => "XML page export",
+ "Version" => "Show MediaWiki version",
);
/* private */ $wgSysopSpecialPagesEn = array(
"Blockip" => "Block a user/IP address",
"Asksql" => "Query the database",
- "Undelete" => "Restore deleted pages"
+ "Undelete" => "Restore deleted pages",
+ "Makesysop" => "Turn a user into a sysop"
);
/* private */ $wgDeveloperSpecialPagesEn = array(
"Lockdb" => "Make database read-only",
- "Unlockdb" => "Restore DB write access",
- "Debug" => "Debugging information"
+ "Unlockdb" => "Restore DB write access"
);
#-------------------------------------------------------------------
# Default messages
#-------------------------------------------------------------------
-# Allowed characters in keys are: A-Z, a-z, 0-9, underscore (_) and
+# Allowed characters in keys are: A-Z, a-z, 0-9, underscore (_) and
# hyphen (-). If you need more characters, you may be able to change
# the regex in MagicWord::initRegex
"mypage" => "My page",
"mytalk" => "My talk",
"currentevents" => "Current events",
+"disclaimers" => "Disclaimers",
+"disclaimerpage" => "$wgMetaNamespace:General_disclaimer",
"errorpagetitle" => "Error",
"returnto" => "Return to $1.",
"fromwikipedia" => "From $wgSitename, the free encyclopedia.",
"developertext" => "The action you have requested can only be
performed by users with \"developer\" status.
See $1.",
+"bureaucrattitle" => "Bureaucrat access required",
+"bureaucrattext" => "The action you have requested can only be
+performed by sysops with \"bureaucrat\" status.",
"nbytes" => "$1 bytes",
"go" => "Go",
"ok" => "OK",
"passwordsent" => "A new password has been sent to the e-mail address
registered for \"$1\".
Please log in again after you receive it.",
+"loginend" => "",
+
+# Edit page toolbar
+"bold_sample"=>"Bold text",
+"bold_tip"=>"Bold text",
+"italic_sample"=>"Italic text",
+"italic_tip"=>"Italic text",
+"link_sample"=>"Link title",
+"link_tip"=>"Internal link",
+"extlink_sample"=>"http://www.example.com link title",
+"extlink_tip"=>"External link (remember http:// prefix)",
+"headline_sample"=>"Headline text",
+"headline_tip"=>"Level 2 headline",
+"math_sample"=>"Insert formula here",
+"math_tip"=>"Mathematical formula (LaTeX)",
+"nowiki_sample"=>"Insert non-formatted text here",
+"nowiki_tip"=>"Ignore wiki formatting",
+"image_sample"=>"Example.jpg",
+"image_tip"=>"Embedded image",
+"media_sample"=>"Example.mp3",
+"media_tip"=>"Media file link",
+"sig_tip"=>"Your signature with timestamp",
+"hr_tip"=>"Horizontal line (use sparingly)",
+"infobox"=>"Click a button to get an example text",
# Edit pages
#
"blockedtitle" => "User is blocked",
"blockedtext" => "Your user name or IP address has been blocked by $1.
The reason given is this:<br>''$2''<p>You may contact $1 or one of the other
-[[$wgMetaNamespace:Administrators|administrators]] to discuss the block.
+[[$wgMetaNamespace:Administrators|administrators]] to discuss the block.
-Note that you may not use the \"email this user\" feature unless you have a valid email address registered in your [[Special:Preferences|user preferences]].
+Note that you may not use the \"email this user\" feature unless you have a valid email address registered in your [[Special:Preferences|user preferences]].
Your IP address is $3. Please include this address in any queries you make.
-
-==Note to AOL users==
-Due to continuing acts of vandalism by one particular AOL user, Wikipedia often blocks AOL proxies. Unfortunately, a single proxy server may be used by a large number of AOL users, and hence innocent AOL users are often inadvertently blocked. We apologise for any inconvenience caused.
-
-If this happens to you, please email an administrator, using an AOL email address. Be sure to include the IP address given above.
",
"whitelistedittitle" => "Login required to edit",
"whitelistedittext" => "You have to [[Special:Userlogin|login]] to edit articles.",
Search in namespaces :<br>
$1<br>
$2 List redirects Search for $3 $9",
-"searchdisabled" => "<p>Sorry! Full text search has been disabled temporarily, for performance reasons. In the meantime, you can use the Google search below, which may be out of date.</p>
-
+"searchdisabled" => "<p>Sorry! Full text search has been disabled temporarily, for performance reasons. In the meantime, you can use the Google search below, which may be out of date.</p>",
+"googlesearch" => "
<!-- SiteSearch Google -->
<FORM method=GET action=\"http://www.google.com/search\">
<TABLE bgcolor=\"#FFFFFF\"><tr><td>
"math_unknown_function" => "unknown function ",
"math_lexing_error" => "lexing error",
"math_syntax_error" => "syntax error",
+"math_image_error" => "PNG conversion failed",
"saveprefs" => "Save preferences",
"resetprefs" => "Reset preferences",
"oldpassword" => "Old password",
"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.",
-"showhideminor" => "$1 minor edits",
-"rclinks" => "Show last $1 changes in last $2 days; $3",
+"showhideminor" => "$1 minor edits | $2 bots | $3 logged in users ",
+"rclinks" => "Show last $1 changes in last $2 days<br>$3",
"rchide" => "in $4 form; $1 minor edits; $2 secondary namespaces; $3 multiple edits.",
"rcliu" => "; $1 edits from logged in users",
"diff" => "diff",
$wgSitename is not affiliated with any of these businesses, and
this list should not be construed as an endorsement.",
"alphaindexline" => "$1 to $2",
+"version" => "Version",
# Email this user
#
The e-mail address you entered in your user preferences will appear
as the \"From\" address of the mail, so the recipient will be able
to reply.",
+"defemailsubject" => "$wgSitename e-mail",
"noemailtitle" => "No e-mail address",
"noemailtext" => "This user has not specified a valid e-mail address,
or has chosen not to receive e-mail from other users.",
# Watchlist
#
-"watchlist" => "My watchlist",
-"watchlistsub" => "(for user \"$1\")",
-"nowatchlist" => "You have no items on your watchlist.",
-"watchnologin" => "Not logged in",
+"watchlist" => "My watchlist",
+"watchlistsub" => "(for user \"$1\")",
+"nowatchlist" => "You have no items on your watchlist.",
+"watchnologin" => "Not logged in",
"watchnologintext" => "You must be <a href=\"" .
wfLocalUrl( "Special:Userlogin" ) . "\">logged in</a>
to modify your watchlist.",
-"addedwatch" => "Added to watchlist",
-"addedwatchtext" => "The page \"$1\" has been added to your <a href=\"" .
+"addedwatch" => "Added to watchlist",
+"addedwatchtext" => "The page \"$1\" has been added to your <a href=\"" .
wfLocalUrl( "Special:Watchlist" ) . "\">watchlist</a>.
Future changes to this page and its associated Talk page will be listed there,
and the page will appear <b>bolded</b> in the <a href=\"" .
make it easier to pick out.</p>
<p>If you want to remove the page from your watchlist later, click \"Stop watching\" in the sidebar.",
-"removedwatch" => "Removed from watchlist",
-"removedwatchtext" => "The page \"$1\" has been removed from your watchlist.",
-"watchthispage" => "Watch this page",
-"unwatchthispage" => "Stop watching",
-"notanarticle" => "Not an article",
-"watchnochange" => "None of your watched items were edited in the time period displayed.",
-"watchdetails" => "($1 pages watched not counting talk pages;
+"removedwatch" => "Removed from watchlist",
+"removedwatchtext" => "The page \"$1\" has been removed from your watchlist.",
+"watchthispage" => "Watch this page",
+"unwatchthispage" => "Stop watching",
+"notanarticle" => "Not an article",
+"watchnochange" => "None of your watched items were edited in the time period displayed.",
+"watchdetails" => "($1 pages watched not counting talk pages;
$2 total pages edited since cutoff;
$3...
<a href='$4'>show and edit complete list</a>.)",
-"watchmethod-recent" => "checking recent edits for watched pages",
-"watchmethod-list" => "checking watched pages for recent edits",
-"removechecked" => "Remove checked items from watchlist",
+"watchmethod-recent"=> "checking recent edits for watched pages",
+"watchmethod-list" => "checking watched pages for recent edits",
+"removechecked" => "Remove checked items from watchlist",
"watchlistcontains" => "Your watchlist contains $1 pages.",
-"watcheditlist" => "Here's an alphabetical list of your
+"watcheditlist" => "Here's an alphabetical list of your
watched pages. Check the boxes of pages you want to remove
from your watchlist and click the 'remove checked' button
at the bottom of the screen.",
-"removingchecked" => "Removing requested items from watchlist...",
-"couldntremove" => "Couldn't remove item '$1'...",
-"iteminvalidname" => "Problem with item '$1', invalid name...",
-"wlnote" => "Below are the last $1 changes in the last <b>$2</b> hours.",
-"wlshowlast" => "Show last $1 hours $2 days $3",
+"removingchecked" => "Removing requested items from watchlist...",
+"couldntremove" => "Couldn't remove item '$1'...",
+"iteminvalidname" => "Problem with item '$1', invalid name...",
+"wlnote" => "Below are the last $1 changes in the last <b>$2</b> hours.",
+"wlshowlast" => "Show last $1 hours $2 days $3",
+"wlsaved" => "This is a saved version of your watchlist.",
+
# Delete/protect/revert
#
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",
+"revertpage" => "Reverted edit of $2, changed back to last version by $1",
"protectlogpage" => "Protection_log",
"protectlogtext" => "Below is a list of page locks/unlocks.
See [[$wgMetaNamespace:Protected page]] for more information.",
Fill in a specific reason below (for example, citing particular
pages that were vandalized).",
"ipaddress" => "IP Address/username",
+"ipbexpiry" => "Expiry",
"ipbreason" => "Reason",
"ipbsubmit" => "Block this user",
-"badipaddress" => "No user exists by that name",
+"badipaddress" => "Invalid IP address",
"noblockreason" => "You must supply a reason for the block.",
"blockipsuccesssub" => "Block succeeded",
"blockipsuccesstext" => "\"$1\" has been blocked.
"ipusubmit" => "Unblock this address",
"ipusuccess" => "\"$1\" unblocked",
"ipblocklist" => "List of blocked IP addresses and usernames",
-"blocklistline" => "$1, $2 blocked $3",
+"blocklistline" => "$1, $2 blocked $3 (expires $4)",
"blocklink" => "block",
"unblocklink" => "unblock",
"contribslink" => "contribs",
"autoblocker" => "Autoblocked because you share an IP address with \"$1\". Reason \"$2\".",
"blocklogpage" => "Block_log",
-"blocklogentry" => 'blocked "$1"',
+"blocklogentry" => 'blocked "$1" with an expiry time of $2',
"blocklogtext" => "This is a log of user blocking and unblocking actions. Automatically
blocked IP addresses are not be listed. See the [[Special:Ipblocklist|IP block list]] for
the list of currently operational bans and blocks.",
"unblocklogentry" => 'unblocked "$1"',
+"range_block_disabled" => "The sysop ability to create range blocks is disabled.",
+"ipb_expiry_invalid" => "Expiry time invalid.",
+"ip_range_invalid" => "Invalid IP range.\n",
# Developer tools
#
"selectonly" => "Only read-only queries are allowed.",
"querysuccessful" => "Query successful",
+# Make sysop
+"makesysoptitle" => "Make a user into a sysop",
+"makesysoptext" => "This form is used by bureaucrats to turn ordinary users into administrators.
+Type the name of the user in the box and press the button to make the user an administrator",
+"makesysopname" => "Name of the user:",
+"makesysopsubmit" => "Make this user into a sysop",
+"makesysopok" => "<b>User '$1' is now a sysop</b>",
+"makesysopfail" => "<b>User '$1' could not be made into a sysop. (Did you enter the name correctly?)</b>",
+"setbureaucratflag" => "Set bureaucrat flag",
+"bureaucratlog" => "Bureaucrat_log",
+"bureaucratlogentry" => " set $1: $2",
+
# Move page
#
"movepage" => "Move page",
"movetalk" => "Move \"talk\" page as well, if applicable.",
"talkpagemoved" => "The corresponding talk page was also moved.",
"talkpagenotmoved" => "The corresponding talk page was <strong>not</strong> moved.",
+"1movedto2" => "$1 moved to $2",
+
+# Export
"export" => "Export pages",
"exporttext" => "You can export the text and editing history of a particular
# Namespace 8 related
"allmessages" => "All_messages",
-"allmessagestext" => "This is a list of all messages available in the MediaWiki: namespace"
+"allmessagestext" => "This is a list of all messages available in the MediaWiki: namespace",
+
+# Thumbnails
+
+"thumbnail-more" => "Enlarge"
+
);
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
class Language {
+ function Language(){
+ # Copies any missing values in the specified arrays from En to the current language
+ $fillin = array( "wgSysopSpecialPages", "wgValidSpecialPages", "wgDeveloperSpecialPages" );
+ $name = get_class( $this );
+ if( strpos( $name, "language" ) == 0){
+ $lang = ucfirst( substr( $name, 8 ) );
+ foreach( $fillin as $arrname ){
+ $langver = "{$arrname}{$lang}";
+ $enver = "{$arrname}En";
+ if( ! isset( $GLOBALS[$langver] ) || ! isset( $GLOBALS[$enver] ))
+ continue;
+ foreach($GLOBALS[$enver] as $spage => $text){
+ if( ! isset( $GLOBALS[$langver][$spage] ) )
+ $GLOBALS[$langver][$spage] = $text;
+ }
+ }
+ }
+ }
function getDefaultUserOptions () {
global $wgDefaultUserOptionsEn ;
/* by default we just return base form */
function getMonthNameGen( $key )
{
- global $wgMonthNamesEn;
- return $wgMonthNamesEn[$key-1];
+ return $this->getMonthName( $key );
}
function getMonthAbbreviation( $key )
{
global $wgUser, $wgLocalTZoffset;
- $diff = $wgUser->getOption( "timecorrection" );
- if ( ! is_numeric( $diff ) ) {
- $diff = isset( $wgLocalTZoffset ) ? $wgLocalTZoffset : 0;
+ $tz = $wgUser->getOption( "timecorrection" );
+ if ( $tz === "" ) {
+ $hrDiff = isset( $wgLocalTZoffset ) ? $wgLocalTZoffset : 0;
+ $minDiff = 0;
+ } elseif ( strpos( $tz, ":" ) !== false ) {
+ $tzArray = explode( ":", $tz );
+ $hrDiff = intval($tzArray[0]);
+ $minDiff = intval($hrDiff < 0 ? -$tzArray[1] : $tzArray[1]);
+ } else {
+ $hrDiff = intval( $tz );
}
- if ( 0 == $diff ) { return $ts; }
-
- $t = mktime( ( (int)substr( $ts, 8, 2) ) + $diff,
- (int)substr( $ts, 10, 2 ), (int)substr( $ts, 12, 2 ),
- (int)substr( $ts, 4, 2 ), (int)substr( $ts, 6, 2 ),
- (int)substr( $ts, 0, 4 ) );
+ if ( 0 == $hrDiff && 0 == $minDiff ) { return $ts; }
+
+ $t = mktime( (
+ (int)substr( $ts, 8, 2) ) + $hrDiff, # Hours
+ (int)substr( $ts, 10, 2 ) + $minDiff, # Minutes
+ (int)substr( $ts, 12, 2 ), # Seconds
+ (int)substr( $ts, 4, 2 ), # Month
+ (int)substr( $ts, 6, 2 ), # Day
+ (int)substr( $ts, 0, 4 ) ); #Year
return date( "YmdHis", $t );
}
return ucfirst( $string );
}
+ function lcfirst( $s ) {
+ return strtolower( $s{0} ). substr( $s, 1 );
+ }
+
function checkTitleEncoding( $s ) {
global $wgInputEncoding;
# For right-to-left language support
function isRTL() { return false; }
+ # To allow "foo[[bar]]" to extend the link over the whole word "foobar"
+ function linkPrefixExtension() { return false; }
+
+
function getMagicWords()
{
global $wgMagicWordsEn;
$mw->mCaseSensitive = $rawEntry[0];
$mw->mSynonyms = array_slice( $rawEntry, 1 );
}
+
+ # Italic is unsuitable for some languages
+ function emphasize( $text )
+ {
+ return "<em>$text</em>";
+ }
}
@include_once( "Language" . ucfirst( $wgLanguageCode ) . ".php" );