r45033 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45032‎ | r45033 | r45034 >
Date:18:14, 25 December 2008
Author:rotem
Status:ok (Comments)
Tags:
Comment:
Localization script: Adding the possibility of checking all FlaggedRevs messages.
Modified paths:
  • /trunk/phase3/maintenance/language/checkLanguage.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/checkLanguage.inc
@@ -516,6 +516,12 @@
517517 $group = MessageGroups::getGroup( $extension );
518518 $this->extensions[] = new extensionLanguages( $group );
519519 }
 520+ } elseif ( $extension == 'flaggedrevs' ) {
 521+ foreach ( MessageGroups::singleton()->getGroups() as $group ) {
 522+ if ( strpos( $group->getId(), 'ext-flaggedrevs-' ) === 0 && !$group->isMeta() ) {
 523+ $this->extensions[] = new extensionLanguages( $group );
 524+ }
 525+ }
520526 } else {
521527 $extensions = explode( ',', $extension );
522528 foreach ( $extensions as $extension ) {
@@ -568,7 +574,7 @@
569575 Run this script to check the status of a specific language in extensions, or all of them.
570576 Command line settings are in form --parameter[=value], except for the first one.
571577 Parameters:
572 - * First parameter (mandatory): Extension name, multiple extension names (separated by commas), "all" for all the extensions or "wikimedia" for extensions used by Wikimedia.
 578+ * First parameter (mandatory): Extension name, multiple extension names (separated by commas), "all" for all the extensions, "wikimedia" for extensions used by Wikimedia or "flaggedrevs" for all FLaggedRevs extension messages.
573579 * lang: Language code (default: the installation default language).
574580 * help: Show this help.
575581 * level: Show the following display level (default: 2).

Comments

#Comment by 😂 (talk | contribs)   03:55, 26 December 2008

Ew. Wouldn't it make more sense to write a generic method by which extensions can add to this maintenance script, rather than hard-coding this?

Status & tagging log