Sleep-timer duration strings (durationHoursMinutesSeconds, durationMinutesSeconds, durationMinutesOnly, durationSecondsOnly) contained literal "?" characters instead of the native hour/minute/second abbreviation in 6 locales. Replaced with correct native short-form units per locale, verified byte-exact against a pinned spec table and against the already-correct neighboring hoursLabel/minutesLabel/secondsLabel values in each file.
3.3 KiB
3.3 KiB
Tasks: Repair corrupted sleep-timer duration abbreviations in 6 ARB locales
Review Workload Forecast
| Field | Value |
|---|---|
| Estimated changed lines | 24-48 (24 lines modified, 24 add + 24 del per git diff --stat) |
| 400-line budget risk | Low |
| Chained PRs recommended | No |
| Suggested split | Single PR |
| Delivery strategy | single-pr |
| Chain strategy | pending |
Decision needed before apply: No Chained PRs recommended: No Chain strategy: pending 400-line budget risk: Low
Suggested Work Units
| Unit | Goal | Likely PR | Focused test command | Runtime harness | Rollback boundary |
|---|---|---|---|---|---|
| 1 | Fix all 24 pinned strings across 6 ARB files + static validation | PR 1 (single) | python scripts/validate_arb_fix.py (JSON/UTF-8/diff-scope/placeholder/?-scan checks) |
N/A — static content-only change, no runtime code path affected | git revert on the single commit restores all 6 files atomically |
Phase 1: Content Repair (per-locale edits)
- 1.1 Edit
lib/l10n/app_ar.arblines 19/27/34/40: replacedurationHoursMinutesSeconds/durationMinutesSeconds/durationMinutesOnly/durationSecondsOnlyvalues with pinnedarcells (spec Requirement: Native short-form duration abbreviations) - 1.2 Edit
lib/l10n/app_bn.arblines 19/27/34/40: replace same 4 keys with pinnedbncells - 1.3 Edit
lib/l10n/app_hi.arblines 19/27/34/40: replace same 4 keys with pinnedhicells - 1.4 Edit
lib/l10n/app_ja.arblines 19/27/34/40: replace same 4 keys with pinnedjacells (no-space compact notation) - 1.5 Edit
lib/l10n/app_ru.arblines 19/27/34/40: replace same 4 keys with pinnedrucells (leading-space short abbreviations) - 1.6 Edit
lib/l10n/app_zh.arblines 19/27/34/40: replace same 4 keys with pinnedzhcells (no-space compact notation)
Tasks 1.1-1.6 are file-independent and may run in parallel; each is a self-contained exact-string replacement per the design's pinned table, touching no other key.
Phase 2: Static Validation (sequential, depends on Phase 1)
- 2.1 Parse all 6
app_{ar,bn,hi,ja,ru,zh}.arbfiles as JSON (json.load); assert success (spec: File integrity preserved) - 2.2 Decode each file's bytes as strict UTF-8; assert no
�replacement characters present - 2.3 Run
git diff --statand per-line diff; assert exactly 24 changed lines total across the 6 files, additions == deletions, and no key outside the 4 duration keys per file differs (spec: Unrelated keys are untouched) - 2.4 Scan the 24 target string values for literal
?; assert zero occurrences (spec: No residual corruption markers) - 2.5 Regex-extract
{...}placeholder tokens from each of the 24 fixed values; assert each matches expected{hours}/{minutes}/{seconds}set/order and that@durationXxx.placeholdersmetadata blocks are byte-unchanged (spec: ICU placeholder integrity) - 2.6 Assert each of the 24 fixed values is byte-identical to its pinned spec-table cell (spec: Each of the 6 locales matches its pinned string exactly)
- 2.7 Run
git diff --checkto confirm no whitespace/EOL damage
Do NOT run flutter build, flutter gen-l10n, dart analyze, or flutter analyze — these hang in this environment.