Files
pluriwave/openspec/specs/sleep-timer-duration-i18n/spec.md
T
Javier Bautista Fernández fb7fe8774b
Build & Deploy PluriWave / Análisis de código (push) Successful in 25s
Build & Deploy PluriWave / Build APK + AAB release (push) Successful in 2m24s
fix(l10n): repair corrupted duration abbreviations in ar/bn/hi/ja/ru/zh ARB files
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.
2026-07-21 09:56:18 +02:00

4.2 KiB

Sleep Timer Duration I18n Specification

Purpose

Defines the correct native-language content for the 4 ICU-templated sleep-timer duration strings (durationHoursMinutesSeconds, durationMinutesSeconds, durationMinutesOnly, durationSecondsOnly) across the 6 currently corrupted ARB locales: ar, bn, hi, ja, ru, zh. This is a new spec domain — no prior spec covered these strings.

Requirements

Requirement: Native short-form duration abbreviations

The system MUST render, for each of the 6 locales, the exact pinned native hour/minute/second abbreviation text below in place of every literal ?/??/??? corruption, with no other content in the 24 target strings altered.

Locale durationHoursMinutesSeconds durationMinutesSeconds durationMinutesOnly durationSecondsOnly
ja {hours}時間{minutes}分{seconds}秒 {minutes}分{seconds}秒 {minutes}分 {seconds}秒
zh {hours}小时{minutes}分钟{seconds}秒 {minutes}分钟{seconds}秒 {minutes}分钟 {seconds}秒
ru {hours} ч {minutes} мин {seconds} сек {minutes} мин {seconds} сек {minutes} мин {seconds} сек
ar {hours} س {minutes} د {seconds} ث {minutes} د {seconds} ث {minutes} د {seconds} ث
hi {hours} घंटे {minutes} मिनट {seconds} सेकंड {minutes} मिनट {seconds} सेकंड {minutes} मिनट {seconds} सेकंड
bn {hours} ঘণ্টা {minutes} মিনিট {seconds} সেকেন্ড {minutes} মিনিট {seconds} সেকেন্ড {minutes} মিনিট {seconds} সেকেন্ড

Rationale: ja/zh use conventional no-space compact duration notation (e.g. 1時間30分15秒, 2小时30分钟15秒); ru/ar use the OS-standard single/short abbreviation with a leading space per unit (ч/мин/сек, س/د/ث); hi/bn lack a reliable standard short form, so the full native label words (already verified at hoursLabel/minutesLabel/secondsLabel) are reused verbatim, space-separated.

Scenario: Full duration display renders native units

  • GIVEN a user on locale ja opens the sleep-timer bottom sheet with a duration of 1 hour, 30 minutes, 15 seconds
  • WHEN durationHoursMinutesSeconds is resolved
  • THEN the rendered text is 1時間30分15秒 with no literal ? present

Scenario: Each of the 6 locales matches its pinned string exactly

  • GIVEN any of ar, bn, hi, ja, ru, zh
  • WHEN any of the 4 duration keys is read from its ARB file after the fix
  • THEN its value is byte-identical to the corresponding cell in the pinned table above

Requirement: ICU placeholder integrity

The system MUST preserve the ICU placeholder names {hours}, {minutes}, {seconds} unchanged in name, casing, and count across all 24 target strings, and MUST NOT alter the associated @durationXxx.placeholders metadata blocks.

Scenario: Placeholder names unchanged after fix

  • GIVEN the pre-fix and post-fix versions of durationMinutesSeconds in app_ru.arb
  • WHEN the placeholder tokens are extracted from each
  • THEN both extractions yield exactly {minutes} and {seconds}, in that order

Requirement: File integrity preserved

The system MUST keep each of the 6 ARB files valid UTF-8 encoded JSON after the fix, and MUST leave every key other than the 4 duration keys per file byte-for-byte unchanged (all other ~386 keys, including hoursLabel/minutesLabel/secondsLabel).

Scenario: File remains valid JSON and UTF-8

  • GIVEN app_ar.arb after the fix is applied
  • WHEN the file is parsed as JSON and decoded as UTF-8
  • THEN parsing succeeds with no encoding errors

Scenario: Unrelated keys are untouched

  • GIVEN app_zh.arb before and after the fix
  • WHEN every key except the 4 duration keys is diffed
  • THEN the diff is empty

Requirement: No residual corruption markers

The system MUST NOT contain any literal ? character within the value of the 24 target strings after the fix.

Scenario: No stray ? remains

  • GIVEN all 6 fixed ARB files
  • WHEN the 24 target string values are scanned for the character ?
  • THEN zero occurrences are found