+ nonunicodebrowser message
[lhc/web/wiklou.git] / languages / Language.php
index 6463a3c..8b6ff6f 100644 (file)
@@ -132,6 +132,7 @@ define( 'MW_DATE_USER_FORMAT', true );
        'watchdefault',
        'minordefault',
        'previewontop',
+       'previewonfirst',
        'nocache',
 );
 
@@ -221,16 +222,6 @@ $wgLanguageNamesEn =& $wgLanguageNames;
 # hyphen (-). If you need more characters, you may be able to change
 # the regex in MagicWord::initRegex
 
-# NOTE: To turn off "Current Events" in the sidebar,
-# set "currentevents" => ""
-
-# NOTE: To turn off "Disclaimers" in the title links,
-# set "disclaimers" => ""
-
-# NOTE: To turn off "Community portal" in the title links,
-# set "portal" => ""
-
-
 # required for copyrightwarning
 global $wgRightsText;
 
@@ -255,6 +246,7 @@ global $wgRightsText;
 'tog-watchdefault' => 'Add pages you edit to your watchlist',
 'tog-minordefault' => 'Mark all edits minor by default',
 'tog-previewontop' => 'Show preview before edit box and not after it',
+'tog-previewonfirst' => 'Show preview on first edit',
 'tog-nocache' => 'Disable page caching',
 
 # dates
@@ -302,6 +294,10 @@ global $wgRightsText;
 'mainpagetext' => 'Wiki software successfully installed.',
 "mainpagedocfooter" => "Please see [http://meta.wikipedia.org/wiki/MediaWiki_i18n documentation on customizing the interface]
 and the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] for usage and configuration help.",
+
+# NOTE: To turn off "Community portal" in the title links,
+# set "portal" => "-"
+
 'portal'               => 'Community portal',
 'portal-url'           => '{{ns:4}}:Community Portal',
 'about'                        => 'About',
@@ -313,7 +309,8 @@ and the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] f
 "wikititlesuffix" => "{{SITENAME}}",
 "bugreports"   => "Bug reports",
 "bugreportspage" => "{{ns:4}}:Bug_reports",
-'sitesupport'   => 'Donations', # Set a URL in $wgSiteSupportPage in LocalSettings.php
+'sitesupport'   => 'Donations', 
+'sitesupport-url' => '{{ns:4}}:Site support',
 'faq'                  => 'FAQ',
 "faqpage"              => "{{ns:4}}:FAQ",
 "edithelp"             => "Editing help",
@@ -332,9 +329,18 @@ and the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] f
 'mytalk'               => 'My talk',
 'anontalk'             => 'Talk for this IP',
 'navigation' => 'Navigation',
+
+# NOTE: To turn off "Current Events" in the sidebar,
+# set "currentevents" => "-"
+                                      
 'currentevents' => 'Current events',
+'currentevents-url' => 'Current events',
+
+# NOTE: To turn off "Disclaimers" in the title links,
+# set "disclaimers" => "-"
+
 'disclaimers' => 'Disclaimers',
-"disclaimerpage"               => "{{ns:4}}:General_disclaimer",
+"disclaimerpage" => "{{ns:4}}:General_disclaimer",
 "errorpagetitle" => "Error",
 "returnto"             => "Return to $1.",
 "tagline"              => "From {{SITENAME}}",
@@ -527,6 +533,7 @@ Your account has been created. Don't forget to change your {{SITENAME}} preferen
 'youremail'            => 'Your email*',
 'yourrealname'         => 'Your real name*',
 'yourlanguage' => 'Interface language',
+'yourvariant'  => 'Language variant',
 'yournick'             => 'Your nickname (for signatures)',
 'emailforlost' => "Fields marked with a star (*) are optional.  Storing an email address enables people to contact you through the website without you having to reveal your
 email address to them, and it can be used to send you a new password if you forget it.<br /><br />Your real name, if you choose to provide it, will be used for giving you attribution for your work.",
@@ -541,6 +548,7 @@ email address to them, and it can be used to send you a new password if you forg
 'loginsuccess' => "You are now logged in to {{SITENAME}} as \"$1\".",
 'nosuchuser'   => "There is no user by the name \"$1\".
 Check your spelling, or use the form below to create a new user account.",
+'nosuchusershort'      => "There is no user by the name \"$1\". Check your spelling.",
 'wrongpassword'        => 'The password you entered is incorrect. Please try again.',
 'mailmypassword' => 'Mail me a new password',
 'passwordremindertitle' => "Password reminder from {{SITENAME}}",
@@ -640,9 +648,10 @@ You will have to merge your changes into the existing text.
 press \"Save page\".\n<p>",
 'yourtext'             => 'Your text',
 'storedversion' => 'Stored version',
-'editingold'   => '<strong>WARNING: You are editing an out-of-date
+'nonunicodebrowser' => "<strong>WARNING: Your browser is not unicode compliant, please change it before editing an article.</strong>",
+'editingold'   => "<strong>WARNING: You are editing an out-of-date
 revision of this page.
-If you save it, any changes made since this revision will be lost.</strong>\n',
+If you save it, any changes made since this revision will be lost.</strong>\n",
 'yourdiff'             => 'Differences',
 'copyrightwarning' => "Please note that all contributions to {{SITENAME}} are
 considered to be released under the $2 (see $1 for details).
@@ -679,7 +688,9 @@ Please check the URL you used to access this page.\n",
 'loadhist'             => 'Loading page history',
 'currentrev'   => 'Current revision',
 'revisionasof'          => 'Revision as of $1',
-'revisionasofwithlink'  => '(Revision as of $1; $2)',
+'revisionasofwithlink'  => 'Revision as of $1; $2<br />$3 | $4',
+'previousrevision'     => '&larr;Older revision',
+'nextrevision'         => 'Newer revision&rarr;',
 'currentrevisionlink'   => 'view current revision',
 'cur'                  => 'cur',
 'next'                 => 'next',
@@ -733,7 +744,8 @@ 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>",
+"searchdisabled" => '<p style="margin: 1.5em 2em 1em">{{SITENAME}} search is disabled for performance reasons. You can search via Google in the meantime.
+<span style="font-size: 89%; display: block; margin-left: .2em">Note that their indexes of {{SITENAME}} content may be out of date.</span></p>',
 'googlesearch' => "
 <!-- SiteSearch Google -->
 <FORM method=GET action=\"http://www.google.com/search\">
@@ -809,10 +821,38 @@ from server time (UTC).',
 'emailflag'            => 'Disable e-mail from other users',
 'defaultns'            => 'Search in these namespaces by default:',
 
+# User levels special page
+#
+
+# switching pan
+'userlevels-lookup-group' => 'Manage group rights',
+'userlevels-group-edit' => 'Existent groups: ',
+'editgroup' => 'Edit Group',
+'addgroup' => 'Add Group',
+
+'userlevels-lookup-user' => 'Manage user groups',
+'userlevels-user-editname' => 'Enter a username: ',
+'editusergroup' => 'Edit User Groups',
+
+# group editing
+'userlevels-editgroup' => 'Edit group',
+'userlevels-addgroup' => 'Add group',
+'userlevels-editgroup-name' => 'Group name: ',
+'userlevels-editgroup-description' => 'Group description (max 255 characters):<br />',
+'savegroup' => 'Save Group',
+
+# user groups editing
+'userlevels-editusergroup' => 'Edit user groups',
+'saveusergroups' => 'Save User Groups',
+'userlevels-groupsmember' => 'Member of:',
+'userlevels-groupsavailable' => 'Available groups:',
+'userlevels-groupshelp' => 'Select groups you want the user to be removed from or added to.
+Unselected groups will not be changed. You can unselect a group by using CTRL + Left Click',
 # Recent changes
 #
 'changes' => 'changes',
 'recentchanges' => 'Recent changes',
+'recentchanges-url' => 'Special:Recentchanges',
 'recentchangestext' => 'Track the most recent changes to the wiki on this page.',
 'rcloaderr'            => 'Loading recent changes',
 'rcnote'               => "Below are the last <strong>$1</strong> changes in last <strong>$2</strong> days.",
@@ -907,6 +947,7 @@ created and by whom, and anything else you may know about it. If this is an imag
 'savefile'             => 'Save file',
 'uploadedimage' => "uploaded \"$1\"",
 'uploaddisabled' => 'Sorry, uploading is disabled.',
+'uploadcorrupt' => 'The file is corrupt or has an incorrect extension. Please check the file and upload again.',
 
 # Image list
 #
@@ -987,6 +1028,7 @@ That comes to '''$5''' average edits per page, and '''$6''' views per edit.",
 'nlinks'               => '$1 links',
 'allpages'             => 'All pages',
 'randompage'   => 'Random page',
+'randompage-url'=> 'Special:Randompage',
 'shortpages'   => 'Short pages',
 'longpages'            => 'Long pages',
 'deadendpages'  => 'Dead-end pages',
@@ -1009,6 +1051,10 @@ That comes to '''$5''' average edits per page, and '''$6''' views per edit.",
 a direct URL, and so may still be listed here despite being
 in active use.',
 'booksources'  => 'Book sources',
+'categoriespagetext' => 'The following categories exists in the wiki.',
+'data' => 'Data',
+'userlevels' => 'User levels management',
+
 # FIXME: Other sites, of course, may have affiliate relations with the booksellers list
 'booksourcetext' => "Below is a list of links to other sites that
 sell new and used books, and may also have further information
@@ -1026,7 +1072,8 @@ You can narrow down the view by selecting a log type, the user name, or the affe
 # Special:Allpages
 'nextpage'          => 'Next page ($1)',
 'articlenamespace'  => '(articles)',
-'allpagesformtext'  => 'Display pages starting at: $1 Choose namespace: $2 $3',
+'allpagesformtext1' => 'Display pages starting at: $1',
+'allpagesformtext2' => 'Choose namespace: $1 $2',
 'allarticles'       => 'All articles',
 'allpagesprev'      => 'Previous',
 'allpagesnext'      => 'Next',
@@ -1169,6 +1216,7 @@ will not be automatically replaced.',
 'undeleterevision' => "Deleted revision as of $1",
 'undeletebtn' => 'Restore!',
 'undeletedarticle' => "restored \"$1\"",
+'undeletedrevisions' => "$1 revisions restored",
 'undeletedtext'   => "[[$1]] has been successfully restored.
 See [[{{ns:4}}:Deletion_log]] for a record of recent deletions and restorations.",
 
@@ -1389,6 +1437,8 @@ article [[Train]].
 
 'allmessages'  => 'All system messages',
 'allmessagestext'      => 'This is a list of all system messages available in the MediaWiki: namespace.',
+'allmessagesnotsupportedUI' => 'Your current interface language is not supported by Special:AllMessages at this site.',
+'allmessagesnotsupportedDB' => 'Special:AllMessages not supported because wgUseDatabaseMessages is off.',
 
 # Thumbnails
 
@@ -1539,6 +1589,42 @@ ta[\'ca-nstab-category\'] = new Array(\'c\',\'View the category page\');
 'imagemaxsize' => 'Limit images on image description pages to: ',
 'showbigimage' => 'Download high resolution version ($1x$2, $3 KB)',
 
+'newimages' => 'New images gallery',
+
+'sitesettings'                  => 'Site Settings',
+'sitesettings-features'         => 'Features',
+'sitesettings-permissions'      => 'Permissions',
+'sitesettings-memcached'        => 'Memcache Daemon',
+'sitesettings-debugging'        => 'Debugging',
+'sitesettings-caching'          => 'Page caching',
+'sitesettings-wgShowIPinHeader' => 'Show IP in header (for non-logged in users)',
+'sitesettings-wgUseDatabaseMessages' => 'Use database messages for user interface labels',
+'sitesettings-wgUseCategoryMagic' => 'Enable categories',
+'sitesettings-wgUseCategoryBrowser' => 'Enable experimental dmoz-like category browsing. Outputs things like:  Encyclopedia > Music > Style of Music > Jazz',
+'sitesettings-wgHitcounterUpdateFreq' => 'Hit counter update frequency',
+'sitesettings-wgAllowExternalImages' => 'Allow to include external images into articles',
+'sitesettings-permissions-readonly' => 'Maintenance mode: Disable write access',
+'sitesettings-permissions-whitelist' => 'Whitelist mode',
+'sitesettings-permissions-banning' => 'User banning',
+'sitesettings-permissions-miser' => 'Performance settings',
+'sitesettings-wgReadOnly' => 'Readonly mode',
+'sitesettings-wgReadOnlyFile' => 'Readonly message file',
+'sitesettings-wgWhitelistEdit' => 'Users must be logged in to edit',
+'sitesettings-wgWhitelistRead' => 'Anonymous users may only read these pages:',
+'sitesettings-wgWhitelistAccount-user' => 'Users may create accounts themself',
+'sitesettings-wgWhitelistAccount-sysop' => 'Sysops may create accounts for users',
+'sitesettings-wgWhitelistAccount-developer' => 'Developers may create accounts for users',
+'sitesettings-wgSysopUserBans' => 'Sysops may block logged-in users',
+'sitesettings-wgSysopRangeBans' => 'Sysops may block IP-ranges',
+'sitesettings-wgDefaultBlockExpiry' => 'By default, blocks expire after:',
+'sitesettings-wgMiserMode' => 'Enable miser mode, which disables most "expensive" features',
+'sitesettings-wgDisableQueryPages' => 'When in miser mode, disable all query pages, not only "expensive" ones',
+'sitesettings-wgUseWatchlistCache' => 'Generate a watchlist once every hour or so',
+'sitesettings-wgWLCacheTimeout' => 'The hour or so mentioned above (in seconds):',
+'sitesettings-cookies' => 'Cookies',
+'sitesettings-performance' => 'Performance',
+'sitesettings-images' => 'Images',
+
 
 );
 
@@ -1596,7 +1682,7 @@ class Language {
        }
 
        function specialPage( $name ) {
-               return $this->getNsText( Namespace::getSpecial() ) . ':' . $name;
+               return $this->getNsText(NS_SPECIAL) . ':' . $name;
        }
 
        function getQuickbarSettings() {
@@ -1954,6 +2040,115 @@ class Language {
        function convertGrammar( $word, $case ) {
                return $word;
        }
+
+       
+       # convert text to different variants of a language. the automatic
+       # conversion is done in autoConvert(). here we parse the text 
+       # marked with -{}-, which specifies special conversions of the 
+       # text that can not be accomplished in autoConvert()
+       #
+       # syntax of the markup:
+       # -{code1:text1;code2:text2;...}-  or
+       # -{text}- in which case no conversion should take place for text
+       function convert( $text ) {
+
+               if(sizeof($this->getVariants())<2) 
+                       return $text;
+
+               // no conversion if redirecting
+               if(substr($text,0,9) == "#REDIRECT") {
+                       return $text;
+               }
+
+
+               $plang = $this->getPreferredVariant();
+               $fallback = $this->getVariantFallback($plang);
+
+               $tarray = explode("-{", $text);
+               $tfirst = array_shift($tarray);
+               $text = $this->autoConvert($tfirst);
+               
+               foreach($tarray as $txt) {
+                       $marked = explode("}-", $txt);
+                       
+                       $choice = explode(";", $marked{0});
+                       if(!array_key_exists(1, $choice)) {
+                               /* a single choice */
+                               $text .= $choice{0};
+                       }
+                       else {
+                               $choice1=false;
+                               $choice2=false;
+                               foreach($choice as $c) {
+                                       $v = explode(":", $c);
+                                       if(!array_key_exists(1, $v)) {
+                                               //syntax error in the markup, give up
+                                               break;                  
+                                       }
+                                       $code = trim($v{0});
+                                       $content = trim($v{1});
+                                       if($code == $plang) {
+                                               $choice1 = $content;
+                                               break;
+                                       }
+                                       if($code == $fallback)
+                                               $choice2 = $content;
+                               }
+                               if ( $choice1 )
+                                       $text .= $choice1;
+                               elseif ( $choice2 )
+                                       $text .= $choice2;
+                               else
+                                       $text .= $marked{0};
+                       }
+                       if(array_key_exists(1, $marked))
+                               $text .= $this->autoConvert($marked{1});
+               }
+               
+               return $text;
+       }
+
+       /* this does the real conversion to the preferred variant.
+          see LanguageZh.php for example
+       */
+       function autoConvert($text, $toVariant=false) {
+               return $text;
+       }
+       
+       # returns a list of language variants for conversion.
+       # right now mainly used in the Chinese conversion
+       function getVariants() {
+               $lang = strtolower(substr(get_class($this), 8));
+               return array($lang);
+       }
+       
+       # in case some variant is not defined in the markup, we need
+       # to have some fallback. for example, in zh, normally people
+       # will define zh-cn and zh-tw, but less so for zh-sg or zh-hk.
+       # when zh-sg is preferred but not defined, we will pick zh-cn
+       # in this case. right now this is only used by zh.
+       function getVariantFallback($v) {
+               return false;
+       }
+
+       function getPreferredVariant() {
+               global $wgUser;
+               
+               // if user logged in, get in from user's preference
+               if($wgUser->getID()!=0)
+                       return $wgUser->getOption('variant');
+               
+               // if we have multiple variants for this langauge, 
+               // pick the first one as default
+               $v=$this->getVariants() ;
+               if(!empty($v))
+                       return $v{0};
+               
+               // otherwise there should really be just one variant, 
+               // get it from the class name
+               $lang = strtolower(substr(get_class($this), 8));
+               return $lang;
+       }
 }
 
 # This should fail gracefully if there's not a localization available