Repository navigation
Commit d2c7431
docs(i18n): drop the stale per-update count log from the gate comment (#180)
`src/i18n_pack.rs`'s positive-control comment block described "本次更新" with
the numbers of the release that wrote it (the sharing 本月新增 card: 783 -> 786
keys, 531 -> 535 call sites, 426 -> 429 distinct) while the six constants directly
beneath it read 785 / 785 / 330 / 305 / 537 / 430. C2015 wrote that narrative and
C2019 moved the constants to 785/537/430 without touching it, so the comment has
contradicted its own code for two commits.
Why it survived: only the comment was wrong. The constants are internally
consistent, so `cargo test` stayed green throughout — there is no assertion on
prose.
Fix: delete the per-update narrative and keep only the orientation-independent
rule (calibrate against the extractor's real output, never hand-compute), which
cannot rot. Each cycle's delta belongs to the commit history
(`git log -p src/i18n_pack.rs`), not to a copy maintained in the file.
The replacement block deliberately contains no "old -> new" notation: in this
position that notation reads as an assertion about the current value, and the
constants below are the only authority for that. (Writing the clean-up this way
first re-created the confusion it removes — the checker flagged the fix itself.)
Also records which set T_LITERAL_COUNT counts: it is the T() call-site total,
neither the key count nor the distinct count (three different sets).
Comment-only change: src/i18n_pack.rs is a #[cfg(test)]-only module, so no
production behaviour changes and no constants move. 165 tests pass.
Co-authored-by: argszero <argszero@argszerodeMac-mini.local>1 parent a366162 commit d2c7431
1 file changed
Lines changed: 14 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
39 | 38 | | |
40 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| |||
0 commit comments