Repository navigation
ci(i18n): judge lost translations against the base, with no counts to edit per PR (#19673) - #20662
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
|
Code review on PR #20662 (head c923a73): changes needed. Read against the diff and
Also no longer caught: English copied into a new or reworded key, and backlog growth. Growth fits the English-only ruling, and Not checked: the 1,165 of 1,614 conflict figure, and the per-namespace shards the issue mentions, which aren't considered here. |
|
Code review on PR #20662 (head 062006d): changes needed. Covers the delta since c923a73, read only; nothing was run. The base floor works, with a test, and
The repin fix (1e359f9) is acceptable. A branch that only hand-lowers a |
Auto-sync: merging
|
| side | commit | subject | issue refs |
|---|---|---|---|
| main | ba1111df9 |
Merge #20496 @ fe1d9af into the merge train | #20496 |
| main | 62b874223 |
fix(company-os): a company can require board approval to raise a budget limit (#8214) | #8214 |
| this branch | 750d1c48f |
test(i18n): only an unambiguous rename owes its translation (#19673) | #19673 |
| this branch | 062006d0d |
test(i18n): the ratchet refuses an empty base and follows a moved key (#19673) | #19673 |
| this branch | c923a738e |
ci(i18n): judge lost translations against the base, with no counts to edit per PR (#19673) | #19673 |
|
Code review on PR #20662 (head 750d1c4): approve. Covers the delta since 062006d, read only; nothing was run.
|
…tion import order, SLM baseline and a test path in the merged tree (#20662)
… reach, and the date pin lowers (mrveiss#20662)
Thinking Path
#19673's re-measure: this one file is in 1,165 of 1,614 conflicting PR pairs, and 15 of the 20 PRs conflicting with
main. It pinned an untranslated-string count per locale, and since English is the only required language, nearly every PR adding one UI string edited all ten numbers. The issue's rule is to gate against the merge base rather than keep a committed copy, andrepo_tests/_ratchet_base.pyalready provides that.What Changed
The counts are gone. The guard now states the rule directly, per locale: a key may be untranslated only if it already was at the base, or if
en.jsonadded or reworded it. A translation being removed, or English copied over it, fails and names the keys. A new English-only key needs no edit anywhere.The floor loop, in the same PR: the next three files on the list are one-line
floor=pins._not_this_branchtreated a guard as the branch's if its file was in the branch diff, so one repin put it there, and the gate then demanded another repin at the next growth on the base._changed_filesnow leaves out a guard whose diff touches onlyfloor=lines. Trains still repin on their merged tree. 15 of 94 open PRs touch those three files, by commits saying they repinned.What this no longer catches, on purpose: the count isn't pinned, so translating a batch needs no number lowered. The backlog total is what
scripts/list_untranslated.pyreports. If the base can't be read the test errors (BaseUnavailable) rather than passing.Effect on open PRs: any PR with a baseline bump in this file gets one conflict when this lands; the resolution is to take main's version, with no number to carry. That's the last one. Since this is what most of the queue conflicts on, it's worth landing early.
Verification
pytest repo_tests/i18n_untranslated_ratchet_test.pypasses locally against the real tree and the real merge base, with dictionary positives for each case. I also removed one real French translation in memory (common.noResults) and the guard named that key. A key under the 12-character filter, such as a product name, is not counted, by the existing definition. CI runs withfetch-depth: 2, which_ratchet_basedocuments as what it needs; not run in CI yet.pytest repo_tests/repin_reach_floors_19282_test.pycovers the floor-only rule on sample diffs; the rule is not yet shown on a real branch push.Model Used
Claude Opus 5.5
Refs #19673