diff --git a/scripts/revcheck.php b/scripts/revcheck.php index c091775a2..2816ee7d0 100644 --- a/scripts/revcheck.php +++ b/scripts/revcheck.php @@ -91,8 +91,8 @@ function print_html_header( RevcheckData $data ) HTML; } @@ -133,9 +133,9 @@ function print_html_translators( RevcheckData $data ) Files maintained - upto-
date + ok old - wip + misc sum HTML; diff --git a/scripts/translation/lib/RevcheckIgnore.php b/scripts/translation/lib/RevcheckIgnore.php index bb37eabda..657d3707e 100644 --- a/scripts/translation/lib/RevcheckIgnore.php +++ b/scripts/translation/lib/RevcheckIgnore.php @@ -57,13 +57,6 @@ public static function ignore( $filename ) : bool if ( $filename == "reference/datetime/timezones.xml" ) return true; - if ( IGNORE_EXTENSIONS_XML ) - if ( str_ends_with( $filename , '/extensions.xml') ) // track/count backport - return true; - if ( IGNORE_CHMONLY_DIR ) - if ( str_starts_with( $filename , 'chmonly/') ) // track/count backport - return true; - // Only in translations if ( $filename == "translation.xml" ) diff --git a/scripts/translation/lib/RevcheckRun.php b/scripts/translation/lib/RevcheckRun.php index b9164b2ee..dc3c2ced6 100644 --- a/scripts/translation/lib/RevcheckRun.php +++ b/scripts/translation/lib/RevcheckRun.php @@ -182,29 +182,17 @@ private function addData( RevcheckFileInfo $info , RevtagInfo|null $revtag = nul $translator = $this->revData->getTranslator( $revtag->maintainer ); - switch( $info->status ) // counts + switch( $info->status ) { - case RevcheckStatus::TranslatedOk: // ready and synced + case RevcheckStatus::TranslatedOk: $translator->countOk++; break; - case RevcheckStatus::TranslatedOld: // ready and outdated + case RevcheckStatus::TranslatedOld: $translator->countOld++; break; - // STATUS_COUNT_MISMATCH count correct - // default: // all other cases - // $translator->countOther++; - - // STATUS_COUNT_MISMATCH backported behaviour - case RevcheckStatus::RevTagProblem: // STATUS_COUNT_MISMATCH backported behaviour - $translator->countOld++; // RevTagProblem into Old (generated diff link fails) - break; - case RevcheckStatus::NotInEnTree: // STATUS_COUNT_MISMATCH backported behaviour - break; // Not counted, but files are listed anyways... default: - if ( $revtag->status != "ready" ); // STATUS_COUNT_MISMATCH backported behaviour - $translator->countOther++; // The exception of all cases, and also not ready. + $translator->countOther++; break; - // STATUS_COUNT_MISMATCH backported behaviour } switch( $info->status ) // adds,dels diff --git a/scripts/translation/lib/backport.php b/scripts/translation/lib/backport.php index 455b6e16e..169c781f4 100644 --- a/scripts/translation/lib/backport.php +++ b/scripts/translation/lib/backport.php @@ -9,54 +9,11 @@ // Constants -const IGNORE_CHMONLY_DIR = true; -const IGNORE_EXTENSIONS_XML = true; -const STATUS_COUNT_MISMATCH = true; const LOOSE_SKIP_REVCHECK = true; const FIXED_SKIP_REVCHECK = true; // Documentation -/* # IGNORE_CHMONLY_DIR - -The chmonly/ dir contains files that appears to be -translatable. See recent efforts to re-enabling -CHM build: https://github.com/php/doc-base/pull/163 -*/ - -/* # IGNORE_EXTENSIONS_XML - -The actual revcheck ignores any files called extensions.xml, -but are at least two of files with this name. - -- appendices/migration56/extensions.xml (translatable) -- install/windows/legacy/extensions.xml (deleted on en/, exists untracked on translations) -*/ - -/* # STATUS_COUNT_MISMATCH - -The actual revcheck counts "outdated" files in two different ways; - -- Only TranslatedOld: - https://github.com/php/doc-base/blob/747c53bf8ec72f27ac1a83ba91bcc390eea2e46a/scripts/revcheck.php#L603 -- TranslatedOld + RevTagProblem: - https://github.com/php/doc-base/blob/747c53bf8ec72f27ac1a83ba91bcc390eea2e46a/scripts/revcheck.php#L134 - -This causes a mismatchs between translators totals and file summary. - -To make the mismatch smaller, the "wip" column in Translators was -changed to "misc", and so any status other than "ok" and "old" -was added here. - -Also, NotInEnTree is missing on first case, and files -in this situation goes uncounted. - -Also, RevTagProblem is counted towards as Old, but files -are show in revtag missing/problem list, and is -impossible to generate diffs with invalid hashes... */ - -assert( STATUS_COUNT_MISMATCH || ! STATUS_COUNT_MISMATCH ); - /* # LOOSE_SKIP_REVCHECK Consider the output of: git show f80105b4fc1196bd8d5fecb98d686b580b1ff65d