From 97dfaf929f6fcc08a15991ef908fc1f15c3b1b33 Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Sun, 20 Aug 2006 11:23:45 +0000 Subject: [PATCH] Check for duplicates only if specified, because it's not really an error, in the check language script. --- maintenance/checkLanguage.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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(); -- 2.20.1