From: Rotem Liss Date: Sun, 20 Aug 2006 11:23:45 +0000 (+0000) Subject: Check for duplicates only if specified, because it's not really an error, in the... X-Git-Tag: 1.31.0-rc.0~55942 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=97dfaf929f6fcc08a15991ef908fc1f15c3b1b33;p=lhc%2Fweb%2Fwiklou.git Check for duplicates only if specified, because it's not really an error, in the check language script. --- diff --git a/maintenance/checkLanguage.php b/maintenance/checkLanguage.php index ec1ab38d00..243adc11a0 100644 --- a/maintenance/checkLanguage.php +++ b/maintenance/checkLanguage.php @@ -93,9 +93,9 @@ if ( isset( $options['help'] ) ) { echo "\t* links: Link the message values (default off).\n"; echo "\t* whitelist: Make only the following checks (form: code,code).\n"; echo "\t* blacklist: Don't make the following checks (form: code,code).\n"; + echo "\t* duplicate: Check for messages which are translated the same to English (default off).\n"; echo "Check codes (ideally, should be zero; all the checks are executed by default):\n"; echo "\t* untranslated: Messages which are translatable, but not translated."; - echo "\t* duplicate: Messages which are translated the same to English."; echo "\t* obsolete: Messages which are untranslatable, but translated."; echo "\t* variables: Messages without variables which should be used."; echo "\t* empty: Empty messages."; @@ -128,13 +128,18 @@ if ( isset( $options['level'] ) ) { $wgLinks = isset( $options['links'] ); # Get the checks to do -$wgChecks = array( 'untranslated', 'duplicate', 'obsolete', 'variables', 'empty', 'whitespace', 'xhtml', 'chars' ); +$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 option if specified +if ( isset( $options['duplicate'] ) ) { + $wgChecks[] = 'duplicate'; +} + # Get language objects $wgLanguages = new languages();