docs(sdd): add anti-copy guard so WU18 cannot pass with untranslated values
This commit is contained in:
@@ -823,13 +823,29 @@ UI copy every other capability introduced
|
|||||||
**Modified tests**: ARB key-parity guard test (extend existing or add one if none exists)
|
**Modified tests**: ARB key-parity guard test (extend existing or add one if none exists)
|
||||||
|
|
||||||
- [ ] 18.1 RED — an ARB-parity test asserting all 13 `lib/l10n/app_*.arb` files contain an identical key set.
|
- [ ] 18.1 RED — an ARB-parity test asserting all 13 `lib/l10n/app_*.arb` files contain an identical key set.
|
||||||
|
- [ ] 18.1b RED — **anti-copy guard (a key-parity test is NOT enough).** `l10n.yaml` sets
|
||||||
|
`template-arb-file: app_es.arb`, so any key missing from a locale silently falls back to **Spanish** — that is
|
||||||
|
why untranslated strings currently render as Spanish inside `app_localizations_ja.dart`, `_fr.dart`, etc.
|
||||||
|
A key-parity test would pass just as happily if all 11 locales simply COPIED the Spanish value.
|
||||||
|
Write a test that, for every non-`es` locale, collects every key whose value is byte-identical to the `app_es.arb`
|
||||||
|
value and requires each one to appear in an explicit allowlist (a checked-in file, e.g.
|
||||||
|
`test/l10n/identical_value_allowlist.dart`). Legitimately-identical values exist — brand names, "OK", "Radio",
|
||||||
|
codec names, pure symbols — so the allowlist is the escape hatch, but **each entry must be added deliberately,
|
||||||
|
never in bulk**. Any unlisted identical value fails the test.
|
||||||
|
Seed the allowlist ONLY with entries that are genuinely untranslatable; do not pre-populate it to make the
|
||||||
|
suite green.
|
||||||
- [ ] 18.2 RED — `navHome` exists as a key in all 13 locales, and `git diff` for this commit touches exactly 11
|
- [ ] 18.2 RED — `navHome` exists as a key in all 13 locales, and `git diff` for this commit touches exactly 11
|
||||||
`navHome` **value** lines (en/es were WU1's job, task 1.9).
|
`navHome` **value** lines (en/es were WU1's job, task 1.9).
|
||||||
- [ ] 18.3 GREEN — add the ~35-45 new keys (accumulated from WU4-WU17's English/Spanish-only strings) to all 13
|
- [ ] 18.3 GREEN — add the ~35-45 new keys (accumulated from WU4-WU17's English/Spanish-only strings) to all 13
|
||||||
ARB files, sourcing translations for the 11 non-en/es locales.
|
ARB files, sourcing translations for the 11 non-en/es locales.
|
||||||
- [ ] 18.4 GREEN — set the `navHome` value in the remaining 11 locales to a real translation of "Listen" (not a
|
- [ ] 18.4 GREEN — set the `navHome` value in the remaining 11 locales to a real translation of "Listen" (not a
|
||||||
mechanical copy of the English/Spanish pair).
|
mechanical copy of the English/Spanish pair).
|
||||||
- [ ] 18.5 REFACTOR — run the ARB-parity check across all 13 files; confirm zero missing/extra keys.
|
- [ ] 18.5 REFACTOR — run the ARB-parity check across all 13 files; confirm zero missing/extra keys, AND that the
|
||||||
|
18.1b anti-copy guard passes with an allowlist containing only genuinely-untranslatable entries.
|
||||||
|
Sanity figures at the time this was written: `app_es.arb` (template) 540 keys, `app_en.arb` 561, and all 11
|
||||||
|
other locales 518 — i.e. the non-template locales were **22 keys behind**, and those 22 were rendering in
|
||||||
|
Spanish. WU18 is what closes that gap; the count will have grown as WU8-WU17 land, so re-measure rather than
|
||||||
|
trusting these numbers.
|
||||||
- [ ] 18.6 Verify — full `flutter test` suite green; `flutter analyze` clean; scoped `dart format` over the files
|
- [ ] 18.6 Verify — full `flutter test` suite green; `flutter analyze` clean; scoped `dart format` over the files
|
||||||
this change touched produces no diff (NEVER bare `dart format .` — see the warning at the top);
|
this change touched produces no diff (NEVER bare `dart format .` — see the warning at the top);
|
||||||
grep confirms no "PRO"/price/trial-duration string exists in any ARB file (final whole-app Success Criteria
|
grep confirms no "PRO"/price/trial-duration string exists in any ARB file (final whole-app Success Criteria
|
||||||
|
|||||||
Reference in New Issue
Block a user