Skip to content

v2.4.1: Preset label formatting

Choose a tag to compare

@eyalgal eyalgal released this 21 May 22:29
67435a3

Patch release. Thanks to @OP-75 for the report (#99) and the proposed regex (#100).

Fixes

  • Preset labels for h / d / m presets: timer_presets: [1, 2s, 2m, 3h, 6d] rendered as 1m / 2s / 2mm / 3hm / 6dm. Labels are now built by a single _formatPresetLabel(preset) helper that mirrors _parseDurationInputToMs, so any s / m / h / d suffix is recognized and the unit is rendered via _localize(...). Click behavior was already correct; this only affected display.
  • Same fix applied to the +/- adjustment buttons: passing 5h to those configs no longer suffixes m.

Localization

Unit suffixes are now localized for every preset, not just minutes. 3h renders as 3h in English and 3ש' in Hebrew; 6d renders as 6d in English, 6T in German, 6g in Italian, and 6י' in Hebrew.