hass.tibber_prices/custom_components/tibber_prices/translations
Julian Pawlowski 2449c28a88 feat(i18n): localize time offset descriptions and config flow strings
Added complete localization support for time offset descriptions:
- Convert hardcoded English strings "(X days ago)" to translatable keys
- Add time_units translations (day/days, hour/hours, minute/minutes, ago, now)
- Support singular/plural forms in all 5 languages (de, en, nb, nl, sv)
- German: Proper Dativ case "Tagen" with preposition "vor"
- Compact format for mixed offsets: "7 Tagen - 02:30"

Config flow improvements:
- Replace hardcoded "Enter new API token" with translated "Add new Tibber account API token"
- Use get_translation() for account_choice dropdown labels
- Fix SelectOptionDict usage (no mixing with translation_key parameter)
- Convert days slider from float to int (prevents "2.0 Tage" display)
- DurationSelector: default {"hours": 0, "minutes": 0} to fix validation errors

Translation keys added:
- selector.account_choice.options.new_token
- time_units (day, days, hour, hours, minute, minutes, ago, now)
- config.step.time_offset_description guidance text

Impact: Config flow works fully translated in all 5 languages with proper grammar.
2025-11-25 20:44:39 +00:00
..
de.json feat(i18n): localize time offset descriptions and config flow strings 2025-11-25 20:44:39 +00:00
en.json feat(i18n): localize time offset descriptions and config flow strings 2025-11-25 20:44:39 +00:00
nb.json feat(i18n): localize time offset descriptions and config flow strings 2025-11-25 20:44:39 +00:00
nl.json feat(i18n): localize time offset descriptions and config flow strings 2025-11-25 20:44:39 +00:00
sv.json feat(i18n): localize time offset descriptions and config flow strings 2025-11-25 20:44:39 +00:00