r60598 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60597‎ | r60598 | r60599 >
Date:07:58, 4 January 2010
Author:maxsem
Status:resolved (Comments)
Tags:
Comment:
Removed dummy/obsolete language codes from installer
Modified paths:
  • /trunk/phase3/config/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/config/Installer.php
@@ -2125,6 +2125,9 @@
21262126
21272127 $codes = array();
21282128
 2129+ // qqq is a dummy "language" for documenting messages, other language codes are legacy/fallback.
 2130+ $blacklist = array( 'qqq', 'als', 'be-x-old', 'dk', 'fiu-vro', 'iu', 'nb', 'simple', 'tp' );
 2131+
21292132 $d = opendir( "../languages/messages" );
21302133 /* In case we are called from the root directory */
21312134 if (!$d)
@@ -2133,7 +2136,7 @@
21342137 $m = array();
21352138 if( preg_match( '/Messages([A-Z][a-z_]+)\.php$/', $f, $m ) ) {
21362139 $code = str_replace( '_', '-', strtolower( $m[1] ) );
2137 - if( $code == 'qqq' ) continue;
 2140+ if( in_array( $code, $blacklist ) ) continue;
21382141 if( isset( $wgLanguageNames[$code] ) ) {
21392142 $name = wfBCP47( $code ) . ' - ' . $wgLanguageNames[$code];
21402143 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r60736Clean-up for r60598: introduced a global setting for non-existant languages....maxsem16:55, 6 January 2010

Comments

#Comment by Nikerabbit (talk | contribs)   10:34, 4 January 2010

Can/should this be encapsulated? If someone else needs this list too in the future, we will end up with multiple places to update the list.

Status & tagging log