From 8f416baead93a48e5799e44b8bd2e2c4859f4e04 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 14 Sep 2007 13:18:58 +0200 Subject: auf Version 1.11 aktualisiert; Login-Bug behoben --- maintenance/language/alltrans.php | 2 +- maintenance/language/checkExtensions.php | 269 ++++++++++++++++++++++++++++ maintenance/language/checkLanguage.inc | 99 +++++----- maintenance/language/checkLanguage.php | 42 ++--- maintenance/language/date-formats.php | 2 +- maintenance/language/diffLanguage.php | 2 +- maintenance/language/digit2html.php | 24 +++ maintenance/language/dumpMessages.php | 2 +- maintenance/language/function-list.php | 2 +- maintenance/language/lang2po.php | 2 +- maintenance/language/langmemusage.php | 2 +- maintenance/language/messageTypes.inc | 70 +++++--- maintenance/language/messages.inc | 250 ++++++++++++++++++-------- maintenance/language/rebuildLanguage.php | 2 +- maintenance/language/splitLanguageFiles.php | 2 +- maintenance/language/transstat.php | 2 +- maintenance/language/validate.php | 2 +- maintenance/language/writeMessagesArray.inc | 25 ++- 18 files changed, 613 insertions(+), 188 deletions(-) create mode 100644 maintenance/language/checkExtensions.php create mode 100644 maintenance/language/digit2html.php (limited to 'maintenance/language') diff --git a/maintenance/language/alltrans.php b/maintenance/language/alltrans.php index 69b9a4ea..4adc2a66 100644 --- a/maintenance/language/alltrans.php +++ b/maintenance/language/alltrans.php @@ -12,4 +12,4 @@ foreach( $wgEnglishMessages as $key ) { echo "$key\n"; } -?> + diff --git a/maintenance/language/checkExtensions.php b/maintenance/language/checkExtensions.php new file mode 100644 index 00000000..1cfb0de8 --- /dev/null +++ b/maintenance/language/checkExtensions.php @@ -0,0 +1,269 @@ + + * + * Based on dumpBackup: + * Copyright (C) 2005 Brion Vibber + * + * http://www.mediawiki.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @addtogroup Maintenance + */ + +# +# Lacking documentation. Examples: +# php checkExtensions.php /opt/mw/extensions/CentralAuth/CentralAuth.i18n.php wgCentralAuthMessages +# php checkExtensions.php --extdir /opt/mw/extensions/ +# +# BUGS: cant guess registered extensions :) +# TODO: let users set parameters to configure checklanguage.inc + +// Filename for the extension i18n files database: +define( 'EXT_I18N_DB', 'i18n.db' ); + +$optionsWithArgs = array( 'extdir', 'lang' ); + +require_once( dirname(__FILE__).'/../commandLine.inc' ); +require_once( 'languages.inc' ); +require_once( 'checkLanguage.inc' ); + + +class extensionLanguages extends languages { + private $mExt18nFilename, $mExtArrayName ; + private $mExtArray; + + function __construct( $ext18nFilename, $extArrayName ) { + $this->mExt18nFilename = $ext18nFilename; + $this->mExtArrayName = $extArrayName; + + $this->mIgnoredMessages = array(); + $this->mOptionalMessages = array(); + + if ( file_exists( $this->mExt18nFilename ) ) { + require_once( $this->mExt18nFilename ); + + $foundarray = false; + if( isset( ${$this->mExtArrayName} ) ) { + // File provided in the db file + $foundarray = ${$this->mExtArrayName}; + } else { + + /* For extensions included elsewhere. For some reason other extensions + * break with the global statement, so recheck here. + */ + global ${$this->mExtArrayName}; + if( is_array( ${$this->mExtArrayName} ) ) { + $foundarray = ${$this->mExtArrayName}; + } + + /* we might have been given a function name, test it too */ + if( function_exists( $this->mExtArrayName ) ) { + // Load data + $funcName = $this->mExtArrayName ; + $foundarray = $funcName(); + } + + if(!$foundarray) { + // Provided array could not be found we try to guess it. + + # Using the extension path ($m[1]) and filename ($m[2]): + $m = array(); + preg_match( '%.*/(.*)/(.*).i18n\.php%', $this->mExt18nFilename, $m); + $arPathCandidate = 'wg' . $m[1].'Messages'; + $arFileCandidate = 'wg' . $m[2].'Messages'; + $funcCandidate = "ef{$m[2]}Messages"; + + // Try them: + if( isset($$arPathCandidate) && is_array( $$arPathCandidate ) ) { + print "warning> messages from guessed path array \$$arPathCandidate.\n"; + $foundarray = $$arPathCandidate; + } elseif( isset($$arFileCandidate) && is_array( $$arFileCandidate ) ) { + print "warning> messages from guessed file array \$$arFileCandidate.\n"; + $foundarray = $$arFileCandidate; + } elseif( function_exists( $funcCandidate ) ) { + print "warning> messages build from guessed function {$funcCandidate}().\n"; + $foundarray = $funcCandidate(); + } + } + + # We are unlucky, return empty stuff + if(!$foundarray) { + print "ERROR> failed to guess an array to use.\n"; + $this->mExtArray = null; + $this->mLanguages = null; + return; + } + } + + $this->mExtArray = $foundarray ; + $this->mLanguages = array_keys( $this->mExtArray ); + } else { + wfDie( "File $this->mExt18nFilename not found\n" ); + } + } + + protected function loadRawMessages( $code ) { + if ( isset( $this->mRawMessages[$code] ) ) { + return; + } + if( isset( $this->mExtArray[$code] ) ) { + $this->mRawMessages[$code] = $this->mExtArray[$code] ; + } else { + $this->mRawMessages[$code] = array(); + } + } + + public function getLanguages() { + return $this->mLanguages; + } +} + +/** + * @param $filename Filename containing the extension i18n + * @param $arrayname The name of the array in the filename + * @param $filter Optional, restrict check to a given language code (default; null) + */ +function checkExtensionLanguage( $filename, $arrayname, $filter = null ) { + $extLanguages = new extensionLanguages($filename, $arrayname); + + $langs = $extLanguages->getLanguages(); + if( !$langs ) { + print "ERROR> \$$arrayname array does not exist.\n"; + return false; + } + + $nErrors = 0; + if( $filter ) { + $nErrors += checkLanguage( $extLanguages, $filter ); + } else { + print "Will check ". count($langs) . " languages : " . implode(' ', $langs) .".\n"; + foreach( $langs as $lang ) { + if( $lang == 'en' ) { + #print "Skipped english language\n"; + continue; + } + + $nErrors += checkLanguage( $extLanguages, $lang ); + } + } + + return $nErrors; +} + +/** + * Read the db file, parse it, start the check. + */ +function checkExtensionRepository( $extdir, $db ) { + $fh = fopen( $extdir. '/' . $db, 'r' ); + + $line_number = 0; + while( $line = fgets( $fh ) ) { + $line_number++; + + // Ignore comments + if( preg_match( '/^#/', $line ) ) { + continue; + } + + // Load data from i18n database + $data = split( ' ', chop($line) ); + $i18n_file = @$data[0]; + $arrayname = @$data[1]; + + print "------------------------------------------------------\n"; + print "Checking $i18n_file (\$$arrayname).\n"; + + // Check data + if( !file_exists( $extdir . '/' . $i18n_file ) ) { + print "ERROR> $i18n_file not found ($db:$line_number).\n"; + continue; + } +# if( $arrayname == '' ) { +# print "warning> no array name for $i18n_file ($db:$line_number).\n"; +# } + + $i18n_file = $extdir . '/' . $i18n_file ; + + global $myLang; + $nErrors = checkExtensionLanguage( $i18n_file, $arrayname, $myLang ); + if($nErrors == 1 ) { + print "\nFound $nErrors error for this extension.\n"; + } elseif($nErrors) { + print "\nFound $nErrors errors for this extension.\n"; + } else { + print "Looks OK.\n"; + } + + print "\n"; + } +} + + +function usage() { +// Usage +print << + php checkExtensions.php --extdir + +Common option: + --lang : only check the given language. + + +END; +die; +} + +// Play with options and arguments +$myLang = isset($options['lang']) ? $options['lang'] : null; + +if( isset( $options['extdir'] ) ) { + $extdb = $options['extdir'] . '/' . EXT_I18N_DB ; + + if( file_exists( $extdb ) ) { + checkExtensionRepository( $options['extdir'], EXT_I18N_DB ); + } else { + print "$extdb does not exist\n"; + } + +} else { + // Check arguments + if ( isset( $argv[0] ) ) { + + if (file_exists( $argv[0] ) ) { + $filename = $argv[0]; + } else { + print "Unable to open file '{$argv[0]}'\n"; + usage(); + } + + if ( isset( $argv[1] ) ) { + $arrayname = $argv[1]; + } else { + print "You must give an array name to be checked\n"; + usage(); + } + + global $myLang; + checkExtensionLanguage( $filename, $arrayname, $myLang ); + } else { + usage(); + } +} + + diff --git a/maintenance/language/checkLanguage.inc b/maintenance/language/checkLanguage.inc index e859e39c..468db550 100644 --- a/maintenance/language/checkLanguage.inc +++ b/maintenance/language/checkLanguage.inc @@ -2,91 +2,108 @@ /** * Check a language. * - * @todo Stop with globals. - * @param $code The language code. + * @param $languages The languages object. + * @param $code The language code (default content language of the wiki running the script on). + * @param: $links Show wiki links to messages (default false)? + * @param: $wikiLanguage Language of the wiki to show the output in, if showing links (default en). + * @param: $checks Checks to do (default all except for duplicates and plural). * @return Number of errors found. */ -function checkLanguage( $wgLanguages, $code ) { - global $wgRequiredMessagesNumber, $wgDisplayLevel, $wgLinks, $wgWikiLanguage, $wgChecks; - +function checkLanguage( $languages, $code = null, $displayLevel = 2, $links = false, $wikiLanguage = 'en', $checks = null ) { # Get messages - $messages = $wgLanguages->getMessages( $code ); + $messages = $languages->getMessages( $code ); $messagesNumber = count( $messages['translated'] ); - # Skip the checks if specified - if ( $wgDisplayLevel == 0 ) { + # Skip the checks if told so + if ( $displayLevel == 0 ) { return; } - // Initialize counts - $untranslatedMessagesNumber = $duplicateMessagesNumber = $obsoleteMessagesNumber - = $messagesWithoutVariablesNumber = $messagesWithoutPluralNumber = $emptyMessagesNumber - = $messagesWithWhitespaceNumber = $nonXHTMLMessagesNumber = $messagesWithWrongCharsNumber - = 0; + # Initialize counts + $problems = 0; + + # Set default language code and checks + if ( !$code ) { + global $wgContLang; + $code = $wgContLang->getCode(); + } + if ( !$checks ) { + $checks = array( 'untranslated', 'obsolete', 'variables', 'empty', 'whitespace', 'xhtml', 'chars' ); + } # Untranslated messages - if ( in_array( 'untranslated', $wgChecks ) ) { - $untranslatedMessages = $wgLanguages->getUntranslatedMessages( $code ); + if ( in_array( 'untranslated', $checks ) ) { + $generalMessages = $languages->getGeneralMessages(); + $requiredMessagesNumber = count( $generalMessages['required'] ); + $untranslatedMessages = $languages->getUntranslatedMessages( $code ); $untranslatedMessagesNumber = count( $untranslatedMessages ); - $wgLanguages->outputMessagesList( $untranslatedMessages, $code, "\n$untranslatedMessagesNumber messages of $wgRequiredMessagesNumber are not translated to $code, but exist in en:", $wgDisplayLevel, $wgLinks, $wgWikiLanguage ); + $languages->outputMessagesList( $untranslatedMessages, $code, "\n$untranslatedMessagesNumber messages of $requiredMessagesNumber are not translated to $code, but exist in en:", $displayLevel, $links, $wikiLanguage ); + $problems += $untranslatedMessagesNumber; } # Duplicate messages - if ( in_array( 'duplicate', $wgChecks ) ) { - $duplicateMessages = $wgLanguages->getDuplicateMessages( $code ); + if ( in_array( 'duplicate', $checks ) ) { + $duplicateMessages = $languages->getDuplicateMessages( $code ); $duplicateMessagesNumber = count( $duplicateMessages ); - $wgLanguages->outputMessagesList( $duplicateMessages, $code, "\n$duplicateMessagesNumber messages of $messagesNumber are translated the same in en and $code:", $wgDisplayLevel, $wgLinks, $wgWikiLanguage ); + $languages->outputMessagesList( $duplicateMessages, $code, "\n$duplicateMessagesNumber messages of $messagesNumber are translated the same in en and $code:", $displayLevel, $links, $wikiLanguage ); + $problems += $duplicateMessagesNumber; } # Obsolete messages - if ( in_array( 'obsolete', $wgChecks ) ) { + if ( in_array( 'obsolete', $checks ) ) { $obsoleteMessages = $messages['obsolete']; $obsoleteMessagesNumber = count( $obsoleteMessages ); - $wgLanguages->outputMessagesList( $obsoleteMessages, $code, "\n$obsoleteMessagesNumber messages of $messagesNumber are not exist in en (or are in the ignored list), but still exist in $code:", $wgDisplayLevel, $wgLinks, $wgWikiLanguage ); + $languages->outputMessagesList( $obsoleteMessages, $code, "\n$obsoleteMessagesNumber messages of $messagesNumber do not exist in en (or are in the ignored list), but still exist in $code:", $displayLevel, $links, $wikiLanguage ); + $problems += $obsoleteMessagesNumber; } # Messages without variables - if ( in_array( 'variables', $wgChecks ) ) { - $messagesWithoutVariables = $wgLanguages->getMessagesWithoutVariables( $code ); + if ( in_array( 'variables', $checks ) ) { + $messagesWithoutVariables = $languages->getMessagesWithoutVariables( $code ); $messagesWithoutVariablesNumber = count( $messagesWithoutVariables ); - $wgLanguages->outputMessagesList( $messagesWithoutVariables, $code, "\n$messagesWithoutVariablesNumber messages of $messagesNumber in $code don't use some variables while en uses them:", $wgDisplayLevel, $wgLinks, $wgWikiLanguage ); + $languages->outputMessagesList( $messagesWithoutVariables, $code, "\n$messagesWithoutVariablesNumber messages of $messagesNumber in $code don't use some variables while en uses them:", $displayLevel, $links, $wikiLanguage ); + $problems += $messagesWithoutVariablesNumber; } # Messages without plural - if ( in_array( 'plural', $wgChecks ) ) { - $messagesWithoutPlural = $wgLanguages->getMessagesWithoutPlural( $code ); + if ( in_array( 'plural', $checks ) ) { + $messagesWithoutPlural = $languages->getMessagesWithoutPlural( $code ); $messagesWithoutPluralNumber = count( $messagesWithoutPlural ); - $wgLanguages->outputMessagesList( $messagesWithoutPlural, $code, "\n$messagesWithoutPluralNumber messages of $messagesNumber in $code don't use {{plural}} while en uses it:", $wgDisplayLevel, $wgLinks, $wgWikiLanguage ); + $languages->outputMessagesList( $messagesWithoutPlural, $code, "\n$messagesWithoutPluralNumber messages of $messagesNumber in $code don't use {{plural}} while en uses it:", $displayLevel, $links, $wikiLanguage ); + $problems += $messagesWithoutPluralNumber; } # Empty messages - if ( in_array( 'empty', $wgChecks ) ) { - $emptyMessages = $wgLanguages->getEmptyMessages( $code ); + if ( in_array( 'empty', $checks ) ) { + $emptyMessages = $languages->getEmptyMessages( $code ); $emptyMessagesNumber = count( $emptyMessages ); - $wgLanguages->outputMessagesList( $emptyMessages, $code, "\n$emptyMessagesNumber messages of $messagesNumber in $code are empty or -:", $wgDisplayLevel, $wgLinks, $wgWikiLanguage ); + $languages->outputMessagesList( $emptyMessages, $code, "\n$emptyMessagesNumber messages of $messagesNumber in $code are empty or -:", $displayLevel, $links, $wikiLanguage ); + $problems += $emptyMessagesNumber; } # Messages with whitespace - if ( in_array( 'whitespace', $wgChecks ) ) { - $messagesWithWhitespace = $wgLanguages->getMessagesWithWhitespace( $code ); + if ( in_array( 'whitespace', $checks ) ) { + $messagesWithWhitespace = $languages->getMessagesWithWhitespace( $code ); $messagesWithWhitespaceNumber = count( $messagesWithWhitespace ); - $wgLanguages->outputMessagesList( $messagesWithWhitespace, $code, "\n$messagesWithWhitespaceNumber messages of $messagesNumber in $code have a trailing whitespace:", $wgDisplayLevel, $wgLinks, $wgWikiLanguage ); + $languages->outputMessagesList( $messagesWithWhitespace, $code, "\n$messagesWithWhitespaceNumber messages of $messagesNumber in $code have a trailing whitespace:", $displayLevel, $links, $wikiLanguage ); + $problems += $messagesWithWhitespaceNumber; } # Non-XHTML messages - if ( in_array( 'xhtml', $wgChecks ) ) { - $nonXHTMLMessages = $wgLanguages->getNonXHTMLMessages( $code ); + if ( in_array( 'xhtml', $checks ) ) { + $nonXHTMLMessages = $languages->getNonXHTMLMessages( $code ); $nonXHTMLMessagesNumber = count( $nonXHTMLMessages ); - $wgLanguages->outputMessagesList( $nonXHTMLMessages, $code, "\n$nonXHTMLMessagesNumber messages of $messagesNumber in $code are not well-formed XHTML:", $wgDisplayLevel, $wgLinks, $wgWikiLanguage ); + $languages->outputMessagesList( $nonXHTMLMessages, $code, "\n$nonXHTMLMessagesNumber messages of $messagesNumber in $code are not well-formed XHTML:", $displayLevel, $links, $wikiLanguage ); + $problems += $nonXHTMLMessagesNumber; } # Messages with wrong characters - if ( in_array( 'chars', $wgChecks ) ) { - $messagesWithWrongChars = $wgLanguages->getMessagesWithWrongChars( $code ); + if ( in_array( 'chars', $checks ) ) { + $messagesWithWrongChars = $languages->getMessagesWithWrongChars( $code ); $messagesWithWrongCharsNumber = count( $messagesWithWrongChars ); - $wgLanguages->outputMessagesList( $messagesWithWrongChars, $code, "\n$messagesWithWrongCharsNumber messages of $messagesNumber in $code include hidden chars which should not be used in the messages:", $wgDisplayLevel, $wgLinks, $wgWikiLanguage ); + $languages->outputMessagesList( $messagesWithWrongChars, $code, "\n$messagesWithWrongCharsNumber messages of $messagesNumber in $code include hidden chars which should not be used in the messages:", $displayLevel, $links, $wikiLanguage ); + $problems += $messagesWithWrongCharsNumber; } - return ($untranslatedMessagesNumber + $duplicateMessagesNumber + $obsoleteMessagesNumber + $messagesWithoutVariablesNumber + $messagesWithoutPluralNumber + $emptyMessagesNumber + $messagesWithWhitespaceNumber + $nonXHTMLMessagesNumber + $messagesWithWrongCharsNumber); + return $problems; } -?> diff --git a/maintenance/language/checkLanguage.php b/maintenance/language/checkLanguage.php index 4ce811c5..42a43c02 100644 --- a/maintenance/language/checkLanguage.php +++ b/maintenance/language/checkLanguage.php @@ -11,7 +11,7 @@ require_once( 'checkLanguage.inc' ); # Show help if ( isset( $options['help'] ) ) { - echo <<getCode(); -} - -# Get the display level -if ( isset( $options['level'] ) ) { - $wgDisplayLevel = $options['level']; -} else { - $wgDisplayLevel = 2; -} - -# Get the links options +# Get the parameters +$wgCode = isset( $options['lang'] ) ? $options['lang'] : null; +$wgDisplayLevel = isset( $options['level'] ) ? $options['level'] : 2; $wgLinks = isset( $options['links'] ); $wgWikiLanguage = isset( $options['wikilang'] ) ? $options['wikilang'] : 'en'; +$wgCheckEXIF = !isset( $options['noexif'] ); -# Get the checks to do +# Get the checks $wgChecks = array( 'untranslated', 'obsolete', 'variables', 'empty', 'whitespace', 'xhtml', 'chars' ); if ( isset( $options['whitelist'] ) ) { $wgChecks = explode( ',', $options['whitelist'] ); } elseif ( isset( $options['blacklist'] ) ) { $wgChecks = array_diff( $wgChecks, explode( ',', $options['blacklist'] ) ); } - -# Add duplicate and plural options if specified if ( isset( $options['duplicate'] ) ) { $wgChecks[] = 'duplicate'; } @@ -76,16 +63,9 @@ if ( isset( $options['plural'] ) ) { $wgChecks[] = 'plural'; } -# Should check for EXIF? -$wgCheckEXIF = !isset( $options['noexif'] ); - -# Get language objects +# Get language object $wgLanguages = new languages( $wgCheckEXIF ); -# Get the general messages -$wgGeneralMessages = $wgLanguages->getGeneralMessages(); -$wgRequiredMessagesNumber = count( $wgGeneralMessages['required'] ); - # Check the language if ( $wgCode == 'all' ) { foreach ( $wgLanguages->getLanguages() as $language ) { @@ -94,14 +74,12 @@ if ( $wgCode == 'all' ) { } } } else { - # Can't check English + # Can't check English or English RTL if ( $wgCode == 'en' ) { echo "Current selected language is English, which cannot be checked.\n"; } else if ( $wgCode == 'enRTL' ) { echo "Current selected language is RTL English, which cannot be checked.\n"; } else { - checkLanguage( $wgLanguages, $wgCode ); + checkLanguage( $wgLanguages, $wgCode, $wgDisplayLevel, $wgLinks, $wgWikiLanguage, $wgChecks ); } } - -?> diff --git a/maintenance/language/date-formats.php b/maintenance/language/date-formats.php index a0d46f02..1efa84b5 100644 --- a/maintenance/language/date-formats.php +++ b/maintenance/language/date-formats.php @@ -43,4 +43,4 @@ foreach ( glob( "$IP/languages/messages/Messages*.php" ) as $filename ) { print "\n\n"; } -?> + diff --git a/maintenance/language/diffLanguage.php b/maintenance/language/diffLanguage.php index ada4db07..05a6e4b1 100644 --- a/maintenance/language/diffLanguage.php +++ b/maintenance/language/diffLanguage.php @@ -156,4 +156,4 @@ foreach($referenceMessages as $index => $ref) echo "\n----\n".$msg; echo "$referenceLanguage language is complete at ".number_format((100 - $i/count($wgAllMessagesEn) * 100),2)."%\n"; echo "$i unlocalised messages of the ".count($wgAllMessagesEn)." messages available.\n"; -?> + diff --git a/maintenance/language/digit2html.php b/maintenance/language/digit2html.php new file mode 100644 index 00000000..3b690461 --- /dev/null +++ b/maintenance/language/digit2html.php @@ -0,0 +1,24 @@ + $translation ) { + $htmlent = utf8ToHexSequence( $translation ); + print "'$latin' => '$translation', # &#x$htmlent;\n"; + } + print ");\n"; +} diff --git a/maintenance/language/dumpMessages.php b/maintenance/language/dumpMessages.php index 6b7fea68..e57bfeec 100644 --- a/maintenance/language/dumpMessages.php +++ b/maintenance/language/dumpMessages.php @@ -16,4 +16,4 @@ foreach ( $wgEnglishMessages as $key ) print "MediaWiki $wgVersion language file\n"; print serialize( $messages ); -?> + diff --git a/maintenance/language/function-list.php b/maintenance/language/function-list.php index 84efb29d..67bcab03 100644 --- a/maintenance/language/function-list.php +++ b/maintenance/language/function-list.php @@ -41,4 +41,4 @@ foreach ( $classes as $class ) { print "$numRemoved will be removed out of $total\n"; -?> + diff --git a/maintenance/language/lang2po.php b/maintenance/language/lang2po.php index 9a542e94..0ea3faaa 100644 --- a/maintenance/language/lang2po.php +++ b/maintenance/language/lang2po.php @@ -144,4 +144,4 @@ foreach ( $langTool->getLanguages() as $langcode) { applyPot($langcode); } } -?> + diff --git a/maintenance/language/langmemusage.php b/maintenance/language/langmemusage.php index 54b6a58c..929976d3 100644 --- a/maintenance/language/langmemusage.php +++ b/maintenance/language/langmemusage.php @@ -27,4 +27,4 @@ foreach ( $langtool->getLanguages() as $langcode ) { $memend = memory_get_usage(); echo ' Total Usage: '.($memend - $memstart)."\n"; -?> + diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 59ddcd95..21734eb3 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -44,6 +44,8 @@ $wgIgnoredMessages = array( 'accesskey-feed-atom', 'accesskey-t-contributions', 'accesskey-t-emailuser', + 'accesskey-t-permalink', + 'accesskey-t-print', 'accesskey-t-upload', 'accesskey-t-specialpages', 'accesskey-ca-nstab-main', @@ -62,6 +64,7 @@ $wgIgnoredMessages = array( 'accesskey-diff', 'accesskey-compareselectedversions', 'accesskey-watch', + 'accesskey-upload', 'addsection', 'anonnotice', 'autoblock_whitelist', @@ -76,6 +79,7 @@ $wgIgnoredMessages = array( 'loginlanguagelinks', 'markaspatrolledlink', 'newarticletextanon', + 'newsectionheaderdefaultlevel', 'newtalkseperator', 'noarticletextanon', 'number_of_watching_users_RCview', @@ -83,8 +87,8 @@ $wgIgnoredMessages = array( 'patrol-log-header', 'pubmedurl', 'randompage-url', - 'rc-change-size', 'recentchanges-url', + 'revision-info-current', 'revision-nav', 'rfcurl', 'shareddescriptionfollows', @@ -98,13 +102,13 @@ $wgIgnoredMessages = array( 'talkpagetext', 'trackback', 'trackbackexcerpt', - 'widthheight', ); /** Optional messages, which may be translated only if changed in the other language. */ $wgOptionalMessages = array( 'imgmultigotopost', 'linkprefix', + 'editsection-brackets', 'feed-atom', 'feed-rss', 'sectionlink', @@ -123,11 +127,13 @@ $wgOptionalMessages = array( 'uncategorizedpages-summary', 'uncategorizedcategories-summary', 'uncategorizedimages-summary', + 'uncategorizedtemplates-summary', 'popularpages-summary', 'wantedcategories-summary', 'wantedpages-summary', 'mostlinked-summary', 'mostlinkedcategories-summary', + 'mostlinkedtemplates-summary', 'mostcategories-summary', 'mostimages-summary', 'mostrevisions-summary', @@ -145,7 +151,6 @@ $wgOptionalMessages = array( 'doubleredirects-summary', 'lonelypages-summary', 'unusedtemplates-summary', - 'recentchangeslinked-summary', 'fewestrevisions-summary', 'withoutinterwiki-summary', 'variantname-zh-cn', @@ -162,6 +167,43 @@ $wgOptionalMessages = array( 'variantname-kk-kz', 'variantname-kk-cn', 'variantname-kk', + 'variantname-ku-latn', + 'variantname-ku-arab', + 'variantname-ku', + 'rc-change-size', + 'resetpass_text', + 'widthheight', + 'exif-fnumber-format', + 'exif-focallength-format', + 'exif-compression-6', + 'exif-photometricinterpretation-2', + 'exif-photometricinterpretation-6', + 'exif-xyresolution-i', + 'exif-xyresolution-c', + 'exif-colorspace-1', + 'exif-colorspace-ffff.h', + 'exif-componentsconfiguration-1', + 'exif-componentsconfiguration-2', + 'exif-componentsconfiguration-3', + 'exif-componentsconfiguration-4', + 'exif-componentsconfiguration-5', + 'exif-componentsconfiguration-6', + 'exif-lightsource-20', + 'exif-lightsource-21', + 'exif-lightsource-22', + 'exif-lightsource-23', + 'exif-filesource-3', + 'booksources-isbn', + 'isbn', + 'sp-contributions-explain', + 'sorbs', + 'video-dims', + 'seconds-abbrev', + 'minutes-abbrev', + 'hours-abbrev', + 'filerevert-backlink', + 'filedelete-backlink', + 'pagetitle', ); /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */ @@ -214,7 +256,6 @@ $wgEXIFMessages = array( 'exif-exposuretime', 'exif-exposuretime-format', 'exif-fnumber', - 'exif-fnumber-format', 'exif-exposureprogram', 'exif-spectralsensitivity', 'exif-isospeedratings', @@ -229,7 +270,6 @@ $wgEXIFMessages = array( 'exif-lightsource', 'exif-flash', 'exif-focallength', - 'exif-focallength-format', 'exif-subjectarea', 'exif-flashenergy', 'exif-spatialfrequencyresponse', @@ -287,10 +327,7 @@ $wgEXIFMessages = array( 'exif-gpsdatestamp', 'exif-gpsdifferential', 'exif-compression-1', - 'exif-compression-6', 'exif-unknowndate', - 'exif-photometricinterpretation-2', - 'exif-photometricinterpretation-6', 'exif-orientation-1', 'exif-orientation-2', 'exif-orientation-3', @@ -301,17 +338,7 @@ $wgEXIFMessages = array( 'exif-orientation-8', 'exif-planarconfiguration-1', 'exif-planarconfiguration-2', - 'exif-xyresolution-i', - 'exif-xyresolution-c', - 'exif-colorspace-1', - 'exif-colorspace-ffff.h', 'exif-componentsconfiguration-0', - 'exif-componentsconfiguration-1', - 'exif-componentsconfiguration-2', - 'exif-componentsconfiguration-3', - 'exif-componentsconfiguration-4', - 'exif-componentsconfiguration-5', - 'exif-componentsconfiguration-6', 'exif-exposureprogram-0', 'exif-exposureprogram-1', 'exif-exposureprogram-2', @@ -345,10 +372,6 @@ $wgEXIFMessages = array( 'exif-lightsource-17', 'exif-lightsource-18', 'exif-lightsource-19', - 'exif-lightsource-20', - 'exif-lightsource-21', - 'exif-lightsource-22', - 'exif-lightsource-23', 'exif-lightsource-24', 'exif-lightsource-255', 'exif-focalplaneresolutionunit-2', @@ -359,7 +382,6 @@ $wgEXIFMessages = array( 'exif-sensingmethod-5', 'exif-sensingmethod-7', 'exif-sensingmethod-8', - 'exif-filesource-3', 'exif-scenetype-1', 'exif-customrendered-0', 'exif-customrendered-1', @@ -404,5 +426,3 @@ $wgEXIFMessages = array( 'exif-gpsdirection-t', 'exif-gpsdirection-m', ); - -?> diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index c4e8ee89..00763033 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -118,6 +118,7 @@ $wgMessageStructure = array( 'category_header', 'subcategories', 'category-media-header', + 'category-empty', ), 'mainpage' => array( 'linkprefix', @@ -247,7 +248,10 @@ $wgMessageStructure = array( 'youhavenewmessages', 'newmessageslink', 'newmessagesdifflink', + 'youhavenewmessagesmulti', + 'newtalkseperator', 'editsection', + 'editsection-brackets', 'editold', 'editsectionhint', 'toc', @@ -262,6 +266,7 @@ $wgMessageStructure = array( 'feed-rss', 'sitenotice', 'anonnotice', + 'newsectionheaderdefaultlevel', ), 'nstab' => array( 'nstab-main', @@ -296,10 +301,13 @@ $wgMessageStructure = array( 'missingarticle', 'readonly_lag', 'internalerror', + 'internalerror_info', 'filecopyerror', 'filerenameerror', 'filedeleteerror', + 'directorycreateerror', 'filenotfound', + 'fileexistserror', 'unexpected', 'formerror', 'badarticleerror', @@ -307,7 +315,6 @@ $wgMessageStructure = array( 'badtitle', 'badtitletext', 'perfdisabled', - 'perfdisabledsub', 'perfcached', 'perfcachedts', 'querypage-no-updates', @@ -320,6 +327,9 @@ $wgMessageStructure = array( 'editinginterface', 'sqlhidden', 'cascadeprotected', + 'namespaceprotected', + 'customcssjsprotected', + 'ns-specialprotected', ), 'login' => array( 'logouttitle', @@ -333,7 +343,6 @@ $wgMessageStructure = array( 'yourdomainname', 'externaldberror', 'loginproblem', - 'alreadyloggedin', 'login', 'loginprompt', 'userlogin', @@ -356,8 +365,8 @@ $wgMessageStructure = array( 'yourvariant', 'yournick', 'badsig', + 'badsiglength', 'email', - 'prefs-help-email-enotif', 'prefs-help-realname', 'loginerror', 'prefs-help-email', @@ -371,6 +380,7 @@ $wgMessageStructure = array( 'nouserspecified', 'wrongpassword', 'wrongpasswordempty', + 'passwordtooshort', 'mailmypassword', 'passwordremindertitle', 'passwordremindertext', @@ -390,6 +400,8 @@ $wgMessageStructure = array( 'invalidemailaddress', 'accountcreated', 'accountcreatedtext', + 'loginlanguagelabel', + 'loginlanguagelinks', ), 'resetpass' => array( 'resetpass', @@ -442,6 +454,7 @@ $wgMessageStructure = array( 'subject-preview', 'blockedtitle', 'blockedtext', + 'autoblockedtext', 'blockedoriginalsource', 'blockededitsource', 'whitelistedittitle', @@ -477,7 +490,7 @@ $wgMessageStructure = array( 'previewconflict', 'session_fail_preview', 'session_fail_preview_html', - 'importing', + 'token_suffix_mismatch', 'editing', 'editinguser', 'editingsection', @@ -505,6 +518,10 @@ $wgMessageStructure = array( 'edittools', 'nocreatetitle', 'nocreatetext', + 'nocreate-loggedin', + 'permissionserrors', + 'permissionserrorstext', + 'recreate-deleted-warn', ), 'undo' => array( 'undo-success', @@ -525,6 +542,7 @@ $wgMessageStructure = array( 'currentrev', 'revisionasof', 'revision-info', + 'revision-info-current', 'revision-nav', 'previousrevision', 'nextrevision', @@ -600,9 +618,6 @@ $wgMessageStructure = array( 'searchresulttext', 'searchsubtitle', 'searchsubtitleinvalid', - 'badquery', - 'badquerytext', - 'matchtotals', 'noexactmatch', 'titlematches', 'notitlematches', @@ -618,12 +633,12 @@ $wgMessageStructure = array( 'powersearchtext', 'searchdisabled', 'googlesearch', - 'blanknamespace', ), 'preferences' => array( 'preferences', 'preferences-summary', 'mypreferences', + 'prefs-edits', 'prefsnologin', 'prefsnologintext', 'prefsreset', @@ -666,7 +681,7 @@ $wgMessageStructure = array( 'resultsperpage', 'contextlines', 'contextchars', - 'stubthreshold', + 'stub-threshold', 'recentchangesdays', 'recentchangescount', 'savedprefs', @@ -691,20 +706,26 @@ $wgMessageStructure = array( 'userrights-groupsavailable', 'userrights-groupshelp', 'userrights-reason', + 'userrights-available-none', + 'userrights-available-add', + 'userrights-available-remove', ), 'group' => array( 'group', + 'group-autoconfirmed', 'group-bot', 'group-sysop', 'group-bureaucrat', 'group-all', ), 'group-member' => array( + 'group-autoconfirmed-member', 'group-bot-member', 'group-sysop-member', 'group-bureaucrat-member', ), 'grouppage' => array( + 'grouppage-autoconfirmed', 'grouppage-bot', 'grouppage-sysop', 'grouppage-bureaucrat', @@ -744,9 +765,11 @@ $wgMessageStructure = array( 'rc_categories', 'rc_categories_any', 'rc-change-size', + 'newsectionsummary', ), 'recentchangeslinked' => array( 'recentchangeslinked', + 'recentchangeslinked-title', 'recentchangeslinked-noresult', 'recentchangeslinked-summary', ), @@ -771,7 +794,7 @@ $wgMessageStructure = array( 'uploadedfiles', 'ignorewarning', 'ignorewarnings', - 'minlength', + 'minlength1', 'illegalfilename', 'badfilename', 'filetype-badmime', @@ -788,10 +811,10 @@ $wgMessageStructure = array( 'fileexists-forbidden', 'fileexists-shared-forbidden', 'successfulupload', - 'fileuploaded', 'uploadwarning', 'savefile', 'uploadedimage', + 'overwroteimage', 'uploaddisabled', 'uploaddisabledtext', 'uploadscripted', @@ -820,6 +843,7 @@ $wgMessageStructure = array( 'license', 'nolicense', 'licenses', + 'license-nopreview', 'upload_source_url', 'upload_source_file', ), @@ -827,7 +851,6 @@ $wgMessageStructure = array( 'imagelist', 'imagelist-summary', 'imagelisttext', - 'imagelistforuser', 'getimagelist', 'ilsubmit', 'showlast', @@ -837,12 +860,17 @@ $wgMessageStructure = array( 'imgdelete', 'imgdesc', 'imgfile', - 'imglegend', - 'imghistory', - 'revertimg', - 'deleteimg', - 'deleteimgcompletely', - 'imghistlegend', + 'filehist', + 'filehist-help', + 'filehist-deleteall', + 'filehist-deleteone', + 'filehist-revert', + 'filehist-current', + 'filehist-datetime', + 'filehist-user', + 'filehist-dimensions', + 'filehist-filesize', + 'filehist-comment', 'imagelinks', 'linkstoimage', 'nolinkstoimage', @@ -860,6 +888,31 @@ $wgMessageStructure = array( 'imagelist_description', 'imagelist_search_for', ), + 'filerevert' => array( + 'filerevert', + 'filerevert-backlink', + 'filerevert-legend', + 'filerevert-intro', + 'filerevert-comment', + 'filerevert-defaultcomment', + 'filerevert-submit', + 'filerevert-success', + 'filerevert-badversion', + ), + 'filedelete' => array( + 'filedelete', + 'filedelete-backlink', + 'filedelete-legend', + 'filedelete-intro', + 'filedelete-intro-old', + 'filedelete-comment', + 'filedelete-submit', + 'filedelete-success', + 'filedelete-success-old', + 'filedelete-nofile', + 'filedelete-nofile-old', + 'filedelete-iscurrent', + ), 'mimesearch' => array( 'mimesearch', 'mimesearch-summary', @@ -938,6 +991,8 @@ $wgMessageStructure = array( 'uncategorizedcategories-summary', 'uncategorizedimages', 'uncategorizedimages-summary', + 'uncategorizedtemplates', + 'uncategorizedtemplates-summary', 'unusedcategories', 'unusedimages', 'popularpages', @@ -950,6 +1005,8 @@ $wgMessageStructure = array( 'mostlinked-summary', 'mostlinkedcategories', 'mostlinkedcategories-summary', + 'mostlinkedtemplates', + 'mostlinkedtemplates-summary', 'mostcategories', 'mostcategories-summary', 'mostimages', @@ -1016,6 +1073,7 @@ $wgMessageStructure = array( 'specialloguserlabel', 'speciallogtitlelabel', 'log', + 'all-logs-page', 'log-search-legend', 'log-search-submit', 'alllogstext', @@ -1034,6 +1092,7 @@ $wgMessageStructure = array( 'allpagessubmit', 'allpagesprefix', 'allpagesbadtitle', + 'allpages-bad-ns', ), 'listusers' => array( 'listusersfrom', @@ -1066,11 +1125,6 @@ $wgMessageStructure = array( 'watchlistfor', 'nowatchlist', 'watchlistanontext', - 'watchlistcount', - 'clearwatchlist', - 'watchlistcleartext', - 'watchlistclearbutton', - 'watchlistcleardone', 'watchnologin', 'watchnologintext', 'addedwatch', @@ -1083,27 +1137,21 @@ $wgMessageStructure = array( 'unwatchthispage', 'notanarticle', 'watchnochange', - 'watchdetails', + 'watchlist-details', 'wlheader-enotif', 'wlheader-showupdated', 'watchmethod-recent', 'watchmethod-list', - 'removechecked', 'watchlistcontains', - 'watcheditlist', - 'removingchecked', - 'couldntremove', 'iteminvalidname', 'wlnote', 'wlshowlast', - 'wlsaved', 'watchlist-show-bots', 'watchlist-hide-bots', 'watchlist-show-own', 'watchlist-hide-own', 'watchlist-show-minor', 'watchlist-hide-minor', - 'wldone', ), 'watching' => array( 'watching', @@ -1113,10 +1161,13 @@ $wgMessageStructure = array( 'enotif_mailer', 'enotif_reset', 'enotif_newpagetext', + 'enotif_impersonal_salutation', 'changed', 'created', 'enotif_subject', 'enotif_lastvisited', + 'enotif_lastdiff', + 'enotif_anon_editor', 'enotif_body', ), 'deleteprotectrev' => array( @@ -1138,7 +1189,6 @@ $wgMessageStructure = array( 'deletionlog', 'reverted', 'deletecomment', - 'imagereverted', 'rollback', 'rollback_short', 'rollbacklink', @@ -1147,23 +1197,20 @@ $wgMessageStructure = array( 'alreadyrolled', 'editcomment', 'revertpage', + 'rollback-success', 'sessionfailure', 'protectlogpage', 'protectlogtext', 'protectedarticle', + 'modifiedarticleprotection', 'unprotectedarticle', 'protectsub', - 'confirmprotecttext', 'confirmprotect', - 'protectmoveonly', 'protectcomment', 'protectexpiry', 'protect_expiry_invalid', 'protect_expiry_old', 'unprotectsub', - 'confirmunprotecttext', - 'confirmunprotect', - 'unprotectcomment', 'protect-unchain', 'protect-text', 'protect-locked-blocked', @@ -1171,6 +1218,7 @@ $wgMessageStructure = array( 'protect-locked-access', 'protect-cascadeon', 'protect-default', + 'protect-fallback', 'protect-level-autoconfirmed', 'protect-level-sysop', 'protect-summary-cascade', @@ -1179,6 +1227,8 @@ $wgMessageStructure = array( 'restriction-type', 'restriction-level', 'minimum-size', + 'maximum-size', + 'pagesize', ), 'restrictions' => array( 'restriction-edit', @@ -1215,10 +1265,17 @@ $wgMessageStructure = array( 'undelete-search-prefix', 'undelete-search-submit', 'undelete-no-results', + 'undelete-filename-mismatch', + 'undelete-bad-store-key', + 'undelete-cleanup-error', + 'undelete-missing-filearchive', + 'undelete-error-short', + 'undelete-error-long', ), 'nsform' => array( 'namespace', 'invert', + 'blanknamespace', ), 'contributions' => array( 'contributions', @@ -1228,6 +1285,8 @@ $wgMessageStructure = array( 'ucnote', 'uclinks', 'uctop', + 'month', + 'year', ), 'sp-contributions' => array( 'sp-contributions-newest', @@ -1240,6 +1299,7 @@ $wgMessageStructure = array( 'sp-contributions-search', 'sp-contributions-username', 'sp-contributions-submit', + 'sp-contributions-explain', 'sp-contributions-footer', 'sp-contributions-footer-anon', ), @@ -1248,6 +1308,7 @@ $wgMessageStructure = array( ), 'whatlinkshere' => array( 'whatlinkshere', + 'whatlinkshere-title', 'whatlinkshere-summary', 'whatlinkshere-barrow', 'notargettitle', @@ -1260,6 +1321,7 @@ $wgMessageStructure = array( 'istemplate', 'whatlinkshere-prev', 'whatlinkshere-next', + 'whatlinkshere-links', ), 'block' => array( 'blockip', @@ -1272,6 +1334,7 @@ $wgMessageStructure = array( 'ipbreason-dropdown', 'ipbanononly', 'ipbcreateaccount', + 'ipbemailban', 'ipbenableautoblock', 'ipbsubmit', 'ipbother', @@ -1291,7 +1354,10 @@ $wgMessageStructure = array( 'unblockiptext', 'ipusubmit', 'unblocked', + 'unblocked-id', 'ipblocklist', + 'ipblocklist-legend', + 'ipblocklist-username', 'ipblocklist-summary', 'ipblocklist-submit', 'blocklistline', @@ -1300,7 +1366,9 @@ $wgMessageStructure = array( 'anononlyblock', 'noautoblockblock', 'createaccountblock', - 'ipblocklistempty', + 'emailblock', + 'ipblocklist-empty', + 'ipblocklist-no-results', 'blocklink', 'unblocklink', 'contribslink', @@ -1312,6 +1380,7 @@ $wgMessageStructure = array( 'block-log-flags-anononly', 'block-log-flags-nocreate', 'block-log-flags-noautoblock', + 'block-log-flags-noemail', 'range_block_disabled', 'ipb_expiry_invalid', 'ipb_already_blocked', @@ -1348,11 +1417,12 @@ $wgMessageStructure = array( 'movearticle', 'movenologin', 'movenologintext', + 'movenotallowed', 'newtitle', 'move-watch', 'movepagebtn', 'pagemovedsub', - 'pagemovedtext', + 'movepage-moved', 'articleexists', 'talkexists', 'movedto', @@ -1380,6 +1450,7 @@ $wgMessageStructure = array( 'export-submit', 'export-addcattext', 'export-addcat', + 'export-download', ), 'allmessages' => array( 'allmessages', @@ -1387,7 +1458,6 @@ $wgMessageStructure = array( 'allmessagesdefault', 'allmessagescurrent', 'allmessagestext', - 'allmessagesnotsupportedUI', 'allmessagesnotsupportedDB', 'allmessagesfilter', 'allmessagesmodified', @@ -1469,6 +1539,8 @@ $wgMessageStructure = array( 'accesskey-feed-atom', 'accesskey-t-contributions', 'accesskey-t-emailuser', + 'accesskey-t-permalink', + 'accesskey-t-print', 'accesskey-t-upload', 'accesskey-t-specialpages', 'accesskey-ca-nstab-main', @@ -1487,6 +1559,7 @@ $wgMessageStructure = array( 'accesskey-diff', 'accesskey-compareselectedversions', 'accesskey-watch', + 'accesskey-upload', ), 'tooltips' => array( 'tooltip-pt-userpage', @@ -1527,6 +1600,8 @@ $wgMessageStructure = array( 'tooltip-t-emailuser', 'tooltip-t-upload', 'tooltip-t-specialpages', + 'tooltip-t-print', + 'tooltip-t-permalink', 'tooltip-ca-nstab-main', 'tooltip-ca-nstab-user', 'tooltip-ca-nstab-media', @@ -1544,6 +1619,7 @@ $wgMessageStructure = array( 'tooltip-compareselectedversions', 'tooltip-watch', 'tooltip-recreate', + 'tooltip-upload', ), 'stylesheets' => array( 'common.css', @@ -1618,6 +1694,12 @@ $wgMessageStructure = array( ), 'imagedeletion' => array( 'deletedrevision', + 'filedeleteerror-short', + 'filedeleteerror-long', + 'filedelete-missing', + 'filedelete-old-unregistered', + 'filedelete-current-unregistered', + 'filedelete-archive-read-only', ), 'browsediffs' => array( 'previousdiff', @@ -1628,10 +1710,11 @@ $wgMessageStructure = array( 'imagemaxsize', 'thumbsize', 'widthheight', + 'widthheightpage', 'file-info', 'file-info-size', 'file-nohires', - 'file-svg', + 'svg-long-desc', 'show-big-image', 'show-big-image-thumb', ), @@ -1641,6 +1724,15 @@ $wgMessageStructure = array( 'showhidebots', 'noimages', ), + 'video-info' => array( + 'video-dims', + 'seconds-abbrev', + 'minutes-abbrev', + 'hours-abbrev', + ), + 'badimagelist' => array( + 'bad_image_list', + ), 'variantname-zh' => array( 'variantname-zh-cn', 'variantname-zh-tw', @@ -1661,8 +1753,10 @@ $wgMessageStructure = array( 'variantname-kk-cn', 'variantname-kk', ), - 'passwordtooshort' => array( - 'passwordtooshort', + 'variantname-ku' => array( + 'variantname-ku-arab', + 'variantname-ku-latn', + 'variantname-ku', ), 'metadata' => array( 'metadata', @@ -1984,9 +2078,9 @@ $wgMessageStructure = array( 'all' => array( 'recentchangesall', 'imagelistall', - 'watchlistall1', 'watchlistall2', 'namespacesall', + 'monthsall', ), 'confirmemail' => array( 'confirmemail', @@ -2005,11 +2099,6 @@ $wgMessageStructure = array( 'confirmemail_subject', 'confirmemail_body', ), - 'inputbox' => array( - 'tryexact', - 'searchfulltext', - 'createarticle', - ), 'scarytransclusion' => array( 'scarytranscludedisabled', 'scarytranscludefailed', @@ -2038,26 +2127,15 @@ $wgMessageStructure = array( 'confirm_purge', 'confirm_purge_button', ), - 'newmessagesmulti' => array( - 'youhavenewmessagesmulti', - 'newtalkseperator', - ), 'search2' => array( 'searchcontaining', 'searchnamed', 'articletitles', 'hideresults', ), - 'displaytitle' => array( - 'displaytitle', - ), 'catseparator' => array( 'catseparator', ), - 'loginlanguage' => array( - 'loginlanguagelabel', - 'loginlanguagelinks', - ), 'imgmulti' => array( 'imgmultipageprev', 'imgmultipagenext', @@ -2098,6 +2176,38 @@ $wgMessageStructure = array( 'livepreview-failed', 'livepreview-error', ), + 'lagwarning' => array( + 'lag-warn-normal', + 'lag-warn-high', + ), + 'watchlisteditor' => array( + 'watchlistedit-numitems', + 'watchlistedit-noitems', + 'watchlistedit-clear-title', + 'watchlistedit-clear-legend', + 'watchlistedit-clear-confirm', + 'watchlistedit-clear-submit', + 'watchlistedit-clear-done', + 'watchlistedit-normal-title', + 'watchlistedit-normal-legend', + 'watchlistedit-normal-explain', + 'watchlistedit-normal-submit', + 'watchlistedit-normal-done', + 'watchlistedit-raw-title', + 'watchlistedit-raw-legend', + 'watchlistedit-raw-explain', + 'watchlistedit-raw-titles', + 'watchlistedit-raw-submit', + 'watchlistedit-raw-done', + 'watchlistedit-raw-added', + 'watchlistedit-raw-removed', + ), + 'watchlisttools' => array( + 'watchlisttools-view', + 'watchlisttools-edit', + 'watchlisttools-raw', + 'watchlisttools-clear', + ), ); /** Comments for each block */ $wgBlockComments = array( @@ -2148,6 +2258,8 @@ XHTML id names.", 'upload-curl-errors' => 'Some likely curl errors. More could be added from ', 'licenses' => '', 'imagelist' => 'Image list', + 'filerevert' => 'File reversion', + 'filedelete' => 'File deletion', 'mimesearch' => 'MIME search', 'unwatchedpages' => 'Unwatched pages', 'listredirects' => 'List redirects', @@ -2199,14 +2311,16 @@ XHTML id names.", 'patrol-log' => 'Patrol log', 'imagedeletion' => 'Image deletion', 'browsediffs' => 'Browsing diffs', - 'newimages' => '', + 'newimages' => 'Special:Newimages', + 'video-info' => 'Video information, used by Language::formatTimePeriod() to format lengths in the above messages', + 'badimagelist' => 'Bad image list', 'variantname-zh' => "Short names for language variants used for language conversion links. To disable showing a particular link, set it to 'disable', e.g. 'variantname-zh-sg' => 'disable', Variants for Chinese language", 'variantname-sr' => 'Variants for Serbian language', 'variantname-kk' => 'Variants for Kazakh language', - 'passwordtooshort' => '', + 'variantname-ku' => 'Variants for Kurdish language', 'media-info' => 'Media information', 'metadata' => 'Metadata', 'exif' => 'EXIF tags', @@ -2245,31 +2359,29 @@ Variants for Chinese language", 'edit-externally' => 'External editor support', 'all' => "'all' in various places, this might be different for inflected languages", 'confirmemail' => 'E-mail address confirmation', - 'inputbox' => 'Inputbox extension, may be useful in other contexts as well', 'scarytransclusion' => 'Scary transclusion', 'trackbacks' => 'Trackbacks', 'deleteconflict' => 'Delete conflict', 'unit-pixel' => '', 'htmldump' => 'HTML dump', 'purge' => 'action=purge', - 'newmessagesmulti' => '', - 'search2' => '', - 'displaytitle' => 'DISPLAYTITLE', + 'search2' => 'AJAX search', 'catseparator' => 'Separator for categories in page lists', - 'loginlanguage' => '', 'imgmulti' => 'Multipage image navigation', 'tablepager' => 'Table pager', 'autosumm' => 'Auto-summaries', 'autoblock_whitelist' => 'Autoblock whitelist', 'sizeunits' => 'Size units', 'livepreview' => 'Live preview', + 'lagwarning' => 'Friendlier slave lag warnings', + 'watchlisteditor' => 'Watchlist editor', + 'watchlisttools' => 'Watchlist editing tools', ); /** Short comments for standalone messages */ $wgMessageComments = array( 'lastmodifiedat' => '$1 date, $2 time', 'sitenotice' => 'the equivalent to wgSiteNotice', - 'perfdisabledsub' => 'obsolete?', 'history-feed-item-nocomment' => 'user at time', 'editcomment' => 'only shown if there is an edit comment', 'lastmodifiedatby' => '$1 date, $2 time, $3 user', @@ -2281,7 +2393,7 @@ $wgMessageComments = array( 'exif-orientation-6' => '0th row: right; 0th column: top', 'exif-orientation-7' => '0th row: right; 0th column: bottom', 'exif-orientation-8' => '0th row: left; 0th column: bottom', - 'autoredircomment' => 'This should be changed to the new naming convention, but existed beforehand', + 'movepage-moved' => 'The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.' ); /** Messages which contain dollar signs (which are not followed by numbers), and therefore should use a single apostrophe */ @@ -2291,5 +2403,3 @@ $wgMessagseWithDollarSigns = array( 'enotif_body', 'allmessagesnotsupportedDB', ); - -?> diff --git a/maintenance/language/rebuildLanguage.php b/maintenance/language/rebuildLanguage.php index d4753c4a..304f8b5c 100644 --- a/maintenance/language/rebuildLanguage.php +++ b/maintenance/language/rebuildLanguage.php @@ -61,4 +61,4 @@ if ( $wgCode == 'all' ) { rebuildLanguage( $wgCode, $wgWriteToFile, $wgListUnknownMessages ); } -?> + diff --git a/maintenance/language/splitLanguageFiles.php b/maintenance/language/splitLanguageFiles.php index 2263e611..d1ce6e7e 100644 --- a/maintenance/language/splitLanguageFiles.php +++ b/maintenance/language/splitLanguageFiles.php @@ -10,4 +10,4 @@ include(dirname(__FILE__).'/../commandLine.inc'); -?> + diff --git a/maintenance/language/transstat.php b/maintenance/language/transstat.php index 36a78000..6a1423a8 100644 --- a/maintenance/language/transstat.php +++ b/maintenance/language/transstat.php @@ -209,4 +209,4 @@ foreach ( $wgLanguages->getLanguages() as $code ) { # Footer $wgOut->footer(); -?> + diff --git a/maintenance/language/validate.php b/maintenance/language/validate.php index 10d98d37..5e96c2d2 100644 --- a/maintenance/language/validate.php +++ b/maintenance/language/validate.php @@ -37,4 +37,4 @@ function getVars( $filename ) { unset( $vars['filename'] ); return $vars; } -?> + diff --git a/maintenance/language/writeMessagesArray.inc b/maintenance/language/writeMessagesArray.inc index 01fc7762..bcbf05ee 100644 --- a/maintenance/language/writeMessagesArray.inc +++ b/maintenance/language/writeMessagesArray.inc @@ -27,13 +27,12 @@ function writeMessagesToFile( $messages, $code, $write, $listUnknown ) { $contents = file_get_contents( $filename ); if ( strpos( $contents, '$messages' ) !== false ) { $contents = explode( '$messages', $contents ); - if ( $messagesText . "\n?>\n" == '$messages' . $contents[1] ) { - echo "Generated messages for language $code. Same to the current file.\n"; + if ( $messagesText == '$messages' . $contents[1] ) { + echo "Generated messages for language $code. Same as the current file.\n"; } else { if ( $write ) { $new = $contents[0]; $new .= $messagesText; - $new .= "\n?>\n"; file_put_contents( $filename, $new ); echo "Generated and wrote messages for language $code.\n"; } else { @@ -74,7 +73,8 @@ function writeMessagesArray( $messages, $ignoredComments = false ) { } # Write all the messages - $messagesText = "\$messages = array(\n"; + $messagesText = "\$messages = array( +"; foreach( $sortedMessages as $block => $messages ) { # Skip if it's the block of unknown messages - handle that in the end of file if ( $block == 'unknown' ) { @@ -86,7 +86,8 @@ function writeMessagesArray( $messages, $ignoredComments = false ) { } ksort( $sortedMessages['unknown'] ); $messagesText .= writeMessagesBlock( 'unknown', 'Unknown messages', $sortedMessages['unknown'], $ignoredComments ); # Write the unknown messages, alphabetically sorted - $messagesText .= ");\n"; + $messagesText .= "); +"; return array( $messagesText, $sortedMessages ); } @@ -114,9 +115,13 @@ function writeMessagesBlock( $name, $comment, $messages, $ignoredComments ) { # Format the block comment (if exists); check for multiple lines comments if ( !empty( $comment ) ) { if ( strpos( $comment, "\n" ) === false ) { - $blockText .= "# $comment\n"; + $blockText .= "# $comment +"; } else { - $blockText .= "/*\n$comment\n*/\n"; + $blockText .= "/* +$comment +*/ +"; } } @@ -172,11 +177,13 @@ function writeMessagesBlock( $name, $comment, $messages, $ignoredComments ) { } # Newline - $blockText .= "\n"; + $blockText .= " +"; } # Newline to end the block - $blockText .= "\n"; + $blockText .= " +"; return $blockText; } -- cgit v1.2.3-54-g00ecf