diff --git a/entities/normal.ent-dist b/entities/normal.ent-dist deleted file mode 100644 index ca5b02df42..0000000000 --- a/entities/normal.ent-dist +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - diff --git a/entities/remove.ent-dist b/entities/remove.ent-dist deleted file mode 100644 index 01c45b673e..0000000000 --- a/entities/remove.ent-dist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - diff --git a/entities/unique.ent-dist b/entities/unique.ent-dist deleted file mode 100644 index 145e36a724..0000000000 --- a/entities/unique.ent-dist +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - diff --git a/scripts/revcheck.php b/scripts/revcheck.php index 6638b4d718..f2e1055eb3 100644 --- a/scripts/revcheck.php +++ b/scripts/revcheck.php @@ -42,10 +42,15 @@ exit; } -$lang = $argv[1]; -$revc = new RevcheckRun( 'en' , $argv[1] ); -$data = $revc->revData; +$lang = rtrim( $argv[1] , "/" ); +if ( $lang == 'en' ) +{ + print "{$argv[0]} cannot run on doc-en.\n"; + exit( 1 ); +} +$revc = new RevcheckRun( 'en' , $lang ); +$data = $revc->revData; print_html_all( $data ); // Output diff --git a/scripts/text-entities.php b/scripts/text-entities.php index 19bfea8d03..187b8655d2 100644 --- a/scripts/text-entities.php +++ b/scripts/text-entities.php @@ -225,48 +225,48 @@ static function checkReplaces( bool $debug ) foreach( Entities::$merged as $name => $null ) { - $replaced = Entities::$nameCount[$name] - 1; - $languages = Entities::$countLanguages; + $replaces = Entities::$nameCount[$name] - 1; + $translation = Entities::$countLanguages > 1; $entityUnique = in_array( $name , Entities::$unique ); $entityRemove = in_array( $name , Entities::$remove ); $entityNormal = ! ( $entityUnique || $entityRemove ); - if ( $entityUnique && $replaced != 0 ) + if ( $entityUnique && $replaces != 0 ) { Entities::$countOtherFailures++; if ( $debug ) - print " Unique entity, redefined $replaced times: $name\n"; + print " Unique entity, redefined $replaces times: $name\n"; } - if ( $entityRemove && $replaced != 0 ) + if ( $entityRemove && $replaces != 0 ) { Entities::$countOtherFailures++; if ( $debug ) - print " Remove entity, redefined $replaced times: $name\n"; + print " Remove entity, redefined $replaces times: $name\n"; } - if ( $entityNormal && $languages == 1 && $replaced != 0 ) + if ( $entityNormal && $translation ) { - Entities::$countOtherFailures++; - if ( $debug ) - print " Normal entity, redefined $replaced times: $name\n"; - } - - if ( $entityNormal && $languages != 1 ) - { - if ( $replaced == 0 ) + if ( $replaces == 0 ) { Entities::$countTransFailures++; if ( $debug ) print " Not translated: $name\n"; } - else + if ( $replaces > 1 ) { Entities::$countOtherFailures++; if ( $debug ) print " Multiple redefined/translated: $name\n"; } } + + if ( $entityNormal && ! $translation && $replaces != 0 ) + { + Entities::$countOtherFailures++; + if ( $debug ) + print " Multiple redefined/translated: $name\n"; + } } } }