Sync with en: version 1.43
[lhc/web/wiklou.git] / languages / Language.php
index f93afd2..05e78ea 100644 (file)
@@ -1,5 +1,42 @@
 <?
 
+#--------------------------------------------------------------------------
+# Constants
+#--------------------------------------------------------------------------
+
+# Namespaces
+define("NS_SPECIAL", -1);
+define("NS_MAIN", 0);
+define("NS_TALK", 1);
+define("NS_USER", 2);
+define("NS_USER_TALK", 3);
+define("NS_WP", 4);
+define("NS_WP_TALK", 5);
+define("NS_IMAGE", 6);
+define("NS_IMAGE_TALK", 7);
+define("NS_MEDIAWIKI", 8);
+define("NS_MEDIAWIKI_TALK", 9);
+
+# Magic words
+define("MAG_REDIRECT", 0);
+define("MAG_NOTOC", 1);
+define("MAG_START", 2);
+define("MAG_CURRENTMONTH", 3);
+define("MAG_CURRENTMONTHNAME", 4);
+define("MAG_CURRENTDAY", 5);
+define("MAG_CURRENTDAYNAME", 6);
+define("MAG_CURRENTYEAR", 7);
+define("MAG_CURRENTTIME", 8);
+define("MAG_NUMBEROFARTICLES", 9);
+define("MAG_CURRENTMONTHNAMEGEN", 10);
+define("MAG_MSG", 11);
+define("MAG_SUBST", 12);
+define("MAG_MSGNW", 13);
+
+#--------------------------------------------------------------------------
+# Language-specific text
+#--------------------------------------------------------------------------
+
 # NOTE: To turn off "Current Events" in the sidebar,
 # set "currentevents" => "-"
 
@@ -16,7 +53,9 @@
        4       => "Wikipedia",
        5       => "Wikipedia_talk",
        6       => "Image",
-       7       => "Image_talk"
+       7       => "Image_talk",
+       8       => "MediaWiki",
+       9       => "MediaWiki_talk"
 );
 
 /* private */ $wgDefaultUserOptionsEn = array(
@@ -34,7 +73,7 @@
 );
 
 /* private */ $wgSkinNamesEn = array(
-       "Standard", "Nostalgia", "Cologne Blue"
+       "Standard", "Nostalgia", "Cologne Blue", "Paddington", "Montparnasse"
 );
 
 /* private */ $wgMathNamesEn = array(
@@ -240,6 +279,24 @@ this</a> (alternative: like this<a href=\"\" class=\"internal\">?</a>).",
        "Sep", "Oct", "Nov", "Dec"
 );
 
+/* private */ $wgMagicWordsEn = array(
+#   ID                                 CASE  SYNONYMS
+    MAG_REDIRECT             => array( 0,    "#redirect"              ),
+    MAG_NOTOC                => array( 0,    "__NOTOC__"              ),
+    MAG_START                => array( 0,    "__START__"              ),
+    MAG_CURRENTMONTH         => array( 1,    "{{CURRENTMONTH}}"       ),
+    MAG_CURRENTMONTHNAME     => array( 1,    "{{CURRENTMONTHNAME}}"   ),
+    MAG_CURRENTDAY           => array( 1,    "{{CURRENTDAY}}"         ),   
+    MAG_CURRENTDAYNAME       => array( 1,    "{{CURRENTDAYNAME}}"     ),
+    MAG_CURRENTYEAR          => array( 1,    "{{CURRENTYEAR}}"        ),
+    MAG_CURRENTTIME          => array( 1,    "{{CURRENTTIME}}"        ),
+    MAG_NUMBEROFARTICLES     => array( 1,    "{{NUMBEROFARTICLES}}"   ),
+    MAG_CURRENTMONTHNAMEGEN  => array( 1,    "{{CURRENTMONTHNAMEGEN}}"),
+       MAG_MSG                  => array( 1,    "{{MSG:$1}}"             ),
+       MAG_SUBST                => array( 1,    "{{SUBST:$1}}"           ),
+    MAG_MSGNW                => array( 1,    "{{MSGNW:$1}}"           )
+);
+       
 # 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).
@@ -267,7 +324,7 @@ this</a> (alternative: like this<a href=\"\" class=\"internal\">?</a>).",
        "Intl"          => "Interlanguage links",
        "Allpages"              => "All pages by title",
 
-       "Ipblocklist"   => "Blocked IP addresses",
+       "Ipblocklist"   => "Blocked users/IP addresses",
        "Maintenance" => "Maintenance page",
        "Specialpages"  => "",
        "Contributions" => "",
@@ -276,11 +333,12 @@ this</a> (alternative: like this<a href=\"\" class=\"internal\">?</a>).",
        "Recentchangeslinked" => "",
        "Movepage"              => "",
        "Booksources"   => "External book sources",
-"Categories" => "Page categories"
+"Categories" => "Page categories",
+"Export"       => ""
 );
 
 /* private */ $wgSysopSpecialPagesEn = array(
-       "Blockip"               => "Block aIP address",
+       "Blockip"               => "Block a user/IP address",
        "Asksql"                => "Query the database",
        "Undelete"              => "Restore deleted pages"
 );
@@ -375,6 +433,8 @@ See $1.",
 "toc" => "Table of contents",
 "showtoc" => "show",
 "hidetoc" => "hide",
+"thisisdeleted" => "View or restore $1?",
+"restorelink" => "$1 deleted edits",
 
 # Main script and global functions
 #
@@ -625,6 +685,26 @@ containing all of the search terms will appear in the result).",
 Search in namespaces :<br>
 $1<br>
 $2 List redirects &nbsp; 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>
+
+<!-- SiteSearch Google -->
+<FORM method=GET action=\"http://www.google.com/search\">
+<TABLE bgcolor=\"#FFFFFF\"><tr><td>
+<A HREF=\"http://www.google.com/\">
+<IMG SRC=\"http://www.google.com/logos/Logo_40wht.gif\"
+border=\"0\" ALT=\"Google\"></A>
+</td>
+<td>
+<INPUT TYPE=text name=q size=31 maxlength=255 value=\"\">
+<INPUT type=submit name=btnG VALUE=\"Google Search\">
+<font size=-1>
+<input type=hidden name=domains value=\"{$wgServer}\"><br><input type=radio name=sitesearch value=\"\"> WWW <input type=radio name=sitesearch value=\"{$wgServer}\" checked> {$wgServer} <br>
+<input type='hidden' name='ie' value='$2'>
+<input type='hidden' name='oe' value='$2'>
+</font>
+</td></tr></TABLE>
+</FORM>
+<!-- SiteSearch Google -->",
 "blanknamespace" => "(Main)",
 
 # Preferences page
@@ -758,6 +838,8 @@ All times shown are server time (UTC).
 ",
 "filename"             => "Filename",
 "filedesc"             => "Summary",
+"filestatus" => "Copyright status",
+"filesource" => "Source",
 "affirmation"  => "I affirm that the copyright holder of this file
 agrees to license it under the terms of the $1.",
 "copyrightpage" => "Wikipedia:Copyrights",
@@ -946,6 +1028,9 @@ at the bottom of the screen.",
 "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 ",
+"wlhours"    => " hours",
+"wldays"     => " days",
                                                                                                                                        
 
 # Delete/protect/revert
@@ -1030,31 +1115,32 @@ to perform this function on.",
 
 # Block/unblock IP
 #
-"blockip"              => "Block IP address",
+"blockip"              => "Block user",
 "blockiptext"  => "Use the form below to block write access
-from a specific IP address.
+from a specific IP address or username.
 This should be done only only to prevent vandalism, and in
 accordance with [[Wikipedia:Policy|Wikipedia policy]].
 Fill in a specific reason below (for example, citing particular
 pages that were vandalized).",
-"ipaddress"            => "IP Address",
+"ipaddress"            => "IP Address/username",
 "ipbreason"            => "Reason",
-"ipbsubmit"            => "Block this address",
-"badipaddress" => "The IP address is badly formed.",
+"ipbsubmit"            => "Block this user",
+"badipaddress" => "No user exists by that name",
 "noblockreason" => "You must supply a reason for the block.",
 "blockipsuccesssub" => "Block succeeded",
-"blockipsuccesstext" => "The IP address \"$1\" has been blocked.
+"blockipsuccesstext" => "\"$1\" has been blocked.
 <br>See [[Special:Ipblocklist|IP block list]] to review blocks.",
-"unblockip"            => "Unblock IP address",
+"unblockip"            => "Unblock user",
 "unblockiptext"        => "Use the form below to restore write access
-to a previously blocked IP address.",
+to a previously blocked IP address or username.",
 "ipusubmit"            => "Unblock this address",
-"ipusuccess"   => "IP address \"$1\" unblocked",
-"ipblocklist"  => "List of blocked IP addresses",
+"ipusuccess"   => "\"$1\" unblocked",
+"ipblocklist"  => "List of blocked IP addresses and usernames",
 "blocklistline"        => "$1, $2 blocked $3",
 "blocklink"            => "block",
 "unblocklink"  => "unblock",
 "contribslink" => "contribs",
+"autoblocker"  => "Autoblocked because you share an IP address with \"$1\". Reason \"$2\".",
 
 # Developer tools
 #
@@ -1142,8 +1228,23 @@ title. Please merge them manually.",
 "talkpagemoved" => "The corresponding talk page was also moved.",
 "talkpagenotmoved" => "The corresponding talk page was <strong>not</strong> moved.",
 
+"export"               => "Export pages",
+"exporttext"   => "You can export the text and editing history of a particular
+page or set of pages wrapped in some XML; this can then be imported into another
+wiki running MediaWiki software, transformed, or just kept for your private
+amusement.",
+"exportcuronly"        => "Include only the current revision, not the full history",
+
+# Namespace 8 related
+
+"allmessages"  => "All_messages",
+"allmessagestext"      => "This is a list of all messages available in the MediaWiki: namespace"
 );
 
+#--------------------------------------------------------------------------
+# Internationalisation code
+#--------------------------------------------------------------------------
+
 class Language {
 
        function getDefaultUserOptions () {
@@ -1341,6 +1442,12 @@ class Language {
                return $wgAllMessagesEn[$key];
        }
        
+       function getAllMessages()
+       {
+               global $wgAllMessagesEn;
+               return $wgAllMessagesEn;
+       }
+
        function iconv( $in, $out, $string ) {
                # For most languages, this is a wrapper for iconv
                return iconv( $in, $out, $string );
@@ -1494,6 +1601,21 @@ class Language {
 
        # For right-to-left language support
        function isRTL() { return false; }
+
+       function getMagicWords() 
+       {
+               global $wgMagicWordsEn;
+               return $wgMagicWordsEn;
+       }
+
+       # Fill a MagicWord object with data from here
+       function getMagic( &$mw )
+       {
+               $raw = $this->getMagicWords(); # don't worry, it's reference counted not deep copy
+               $rawEntry = $raw[$mw->mId];
+               $mw->mCaseSensitive = $rawEntry[0];
+               $mw->mSynonyms = array_slice( $rawEntry, 1 );
+       }
 }
 
 global $IP;