php / doc-base

Tools for the PHP documentation
Other
343 stars 85 forks source link

this is a doc-base issue. #52

Closed nilgun closed 2 years ago

nilgun commented 2 years ago

The commit: https://github.com/php/doc-base/commit/f315a3bc953519b836a2a6364b5d2ec6b45f4aab

This change ignores a [skip-revcheck]'ed commit and makes the previous commit the current commit. Therefore, the label cannot do its job. You can see the result of this in the last 'revcheck.php ru' output. Although the last commit of reference/intl/collator/compare.xml is labeled [skip-revcheck], the file is not ignored and it's listed.

The commit should be revert.

cmb69 commented 2 years ago

@alfsb, can you please have a look?

alfsb commented 2 years ago

Yes, this is working as intended.

https://github.com/php/doc-base/commit/f315a3bc953519b836a2a6364b5d2ec6b45f4aab now ignores any commit on doc-en marked with [skip-revcheck]. So translators need not to bump revision hashes for doc-en typos.

In effect, these "skipped hashes" exist only in doc-en, and so they never show on revcheck.php or in translated files.

As for the example, doc-ru/reference/intl/collator/compare.xml was pointing to ab45e8c9d43453d3cf3f3917b6db03e4f99c4a76 . But ab45e8c9d43453d3cf3f3917b6db03e4f99c4a76 is a typo fix that should NOT impact any translation. See: https://github.com/php/doc-en/commit/ab45e8c9d43453d3cf3f3917b6db03e4f99c4a76#diff-e2aad9cadfb6454391c8fd8a52493e2ca0c2cd0156f4334b6f04f863ea4feca3

The previous revcheck.php always mark this file as OK (see below). The new revcheck.php ignores that commit-hash, tracking only "normal", not skipped hashes.

The issuer is arguing in the lines that revcheck.php and translated files may show the last hash, even if it is skipped in doc-en. I argue this is wrong, as it would force all translations to keep bumping on an inconsistent basis.

Also, there may be a bug in the previous implementation. Say, a file is in rev2 on doc-en and in rev1 on translation. This file is outdated, and correctly flagged as so. Then a new rev3 arrives on doc-en, marked as [skip-revcheck]. The previous code would mark this file as Ok, only on condition that the last doc-en commit is a [skip-revcheck]. See lines 384-385.

nilgun commented 2 years ago

an extract from ru.html:

reference/intl/collator . . . . . . . . . . . . . . . . . . . compare.xml [colored] | Copy 7f6b41f74ca63f670ec25b3eba2efc00dd9f8a63 | 388226f9e106d2ab1fdc2ce193a3b311b2f4b6b9 | 4 | 5 | 1 | 95 | 19 | -76 | sergey | ready

My understanding is that alfsb wants its outdated old files not to be masked with [skip-revcheck]. But he has to find a way to weed out innocent samples like the one above. Otherwise this tag will be useless to others for the sake of alfsb's old files.

nilgun commented 2 years ago

https://github.com/php/doc-base/commit/090ff07aa03c3e4ad7320a4ace9ffb6d5ede722f