diff --git a/custom_components/tibber_prices/config_flow_handlers/subentry_flow.py b/custom_components/tibber_prices/config_flow_handlers/subentry_flow.py index e5861f1..7560fb1 100644 --- a/custom_components/tibber_prices/config_flow_handlers/subentry_flow.py +++ b/custom_components/tibber_prices/config_flow_handlers/subentry_flow.py @@ -177,7 +177,7 @@ class TibberPricesSubentryFlowHandler(ConfigSubentryFlow): # Get translations loaded by Home Assistant standard_translations_key = f"{DOMAIN}_standard_translations_{self.hass.config.language}" translations = self.hass.data.get(standard_translations_key, {}) - time_units = translations.get("config_subentries", {}).get("home", {}).get("time_units", {}) + time_units = translations.get("common", {}).get("time_units", {}) # Fallback to English if translations not available if not time_units: diff --git a/custom_components/tibber_prices/translations/de.json b/custom_components/tibber_prices/translations/de.json index 4113384..a014819 100644 --- a/custom_components/tibber_prices/translations/de.json +++ b/custom_components/tibber_prices/translations/de.json @@ -77,10 +77,21 @@ } }, "common": { - "step_progress": "{step_num} / {total_steps}" + "step_progress": "{step_num} / {total_steps}", + "time_units": { + "day": "{count} Tag", + "days": "{count} Tagen", + "hour": "{count} Stunde", + "hours": "{count} Stunden", + "minute": "{count} Minute", + "minutes": "{count} Minuten", + "ago": "vor {parts}", + "now": "jetzt" + } }, "config_subentries": { "home": { + "entry_type": "Zeitreise-Ansicht", "initiate_flow": { "user": "Zeitreise-Ansicht erstellen" }, @@ -125,16 +136,6 @@ "already_configured": "**Eine Zeitreise-Ansicht mit diesem exakten Zeitversatz existiert bereits.**\n\nBitte wähle einen anderen Versatz.", "no_main_entries": "Keine Hauptkonfigurationseinträge gefunden. Füge zuerst ein Tibber-Zuhause hinzu.", "parent_entry_not_found": "Ausgewählter Konfigurationseintrag nicht gefunden." - }, - "time_units": { - "day": "{count} Tag", - "days": "{count} Tagen", - "hour": "{count} Stunde", - "hours": "{count} Stunden", - "minute": "{count} Minute", - "minutes": "{count} Minuten", - "ago": "vor {parts}", - "now": "jetzt" } } }, diff --git a/custom_components/tibber_prices/translations/en.json b/custom_components/tibber_prices/translations/en.json index 70d11da..6d34517 100644 --- a/custom_components/tibber_prices/translations/en.json +++ b/custom_components/tibber_prices/translations/en.json @@ -77,10 +77,21 @@ } }, "common": { - "step_progress": "{step_num} / {total_steps}" + "step_progress": "{step_num} / {total_steps}", + "time_units": { + "day": "{count} day", + "days": "{count} days", + "hour": "{count} hour", + "hours": "{count} hours", + "minute": "{count} minute", + "minutes": "{count} minutes", + "ago": "{parts} ago", + "now": "now" + } }, "config_subentries": { "home": { + "entry_type": "Time-Travel View", "initiate_flow": { "user": "Create Time-Travel View" }, @@ -125,16 +136,6 @@ "already_configured": "**A time-travel view with this exact time offset already exists.**\n\nPlease choose a different offset.", "no_main_entries": "No main configuration entries found. Please add a Tibber home first.", "parent_entry_not_found": "Selected configuration entry not found." - }, - "time_units": { - "day": "{count} day", - "days": "{count} days", - "hour": "{count} hour", - "hours": "{count} hours", - "minute": "{count} minute", - "minutes": "{count} minutes", - "ago": "{parts} ago", - "now": "now" } } }, diff --git a/custom_components/tibber_prices/translations/nb.json b/custom_components/tibber_prices/translations/nb.json index 71037bd..61a8ba7 100644 --- a/custom_components/tibber_prices/translations/nb.json +++ b/custom_components/tibber_prices/translations/nb.json @@ -77,10 +77,21 @@ } }, "common": { - "step_progress": "{step_num} / {total_steps}" + "step_progress": "{step_num} / {total_steps}", + "time_units": { + "day": "{count} dag", + "days": "{count} dager", + "hour": "{count} time", + "hours": "{count} timer", + "minute": "{count} minutt", + "minutes": "{count} minutter", + "ago": "{parts} siden", + "now": "nå" + } }, "config_subentries": { "home": { + "entry_type": "Tidsreisevisning", "initiate_flow": { "user": "Opprett tidsreisevisning" }, @@ -125,16 +136,6 @@ "already_configured": "**En tidsreisevisning med denne eksakte tidsforskyvningen eksisterer allerede.**\n\nVelg en annen forskyvning.", "no_main_entries": "Ingen hovedkonfigurasjonsoppføringer funnet. Legg til et Tibber-hjem først.", "parent_entry_not_found": "Valgt konfigurasjonsoppføring ikke funnet." - }, - "time_units": { - "day": "{count} dag", - "days": "{count} dager", - "hour": "{count} time", - "hours": "{count} timer", - "minute": "{count} minutt", - "minutes": "{count} minutter", - "ago": "{parts} siden", - "now": "nå" } } }, diff --git a/custom_components/tibber_prices/translations/nl.json b/custom_components/tibber_prices/translations/nl.json index bd3b836..88eea2e 100644 --- a/custom_components/tibber_prices/translations/nl.json +++ b/custom_components/tibber_prices/translations/nl.json @@ -77,10 +77,21 @@ } }, "common": { - "step_progress": "{step_num} / {total_steps}" + "step_progress": "{step_num} / {total_steps}", + "time_units": { + "day": "{count} dag", + "days": "{count} dagen", + "hour": "{count} uur", + "hours": "{count} uur", + "minute": "{count} minuut", + "minutes": "{count} minuten", + "ago": "{parts} geleden", + "now": "nu" + } }, "config_subentries": { "home": { + "entry_type": "Tijdreisweergave", "initiate_flow": { "user": "Tijdreisweergave maken" }, @@ -125,16 +136,6 @@ "already_configured": "**Een tijdreis-weergave met deze exacte tijdverschuiving bestaat al.**\n\nKies een andere verschuiving.", "no_main_entries": "Geen hoofdconfiguratie-items gevonden. Voeg eerst een Tibber-huis toe.", "parent_entry_not_found": "Geselecteerd configuratie-item niet gevonden." - }, - "time_units": { - "day": "{count} dag", - "days": "{count} dagen", - "hour": "{count} uur", - "hours": "{count} uur", - "minute": "{count} minuut", - "minutes": "{count} minuten", - "ago": "{parts} geleden", - "now": "nu" } } }, diff --git a/custom_components/tibber_prices/translations/sv.json b/custom_components/tibber_prices/translations/sv.json index a9027ac..80b7d25 100644 --- a/custom_components/tibber_prices/translations/sv.json +++ b/custom_components/tibber_prices/translations/sv.json @@ -77,10 +77,21 @@ } }, "common": { - "step_progress": "{step_num} / {total_steps}" + "step_progress": "{step_num} / {total_steps}", + "time_units": { + "day": "{count} dag", + "days": "{count} dagar", + "hour": "{count} timme", + "hours": "{count} timmar", + "minute": "{count} minut", + "minutes": "{count} minuter", + "ago": "{parts} sedan", + "now": "nu" + } }, "config_subentries": { "home": { + "entry_type": "Tidsresevy", "initiate_flow": { "user": "Skapa tidsresevy" }, @@ -125,16 +136,6 @@ "already_configured": "**En tidsresevy med denna exakta tidsförskjutning existerar redan.**\n\nVälj en annan förskjutning.", "no_main_entries": "Inga huvudkonfigurationsposter hittades. Lägg först till ett Tibber-hem.", "parent_entry_not_found": "Vald konfigurationspost hittades inte." - }, - "time_units": { - "day": "{count} dag", - "days": "{count} dagar", - "hour": "{count} timme", - "hours": "{count} timmar", - "minute": "{count} minut", - "minutes": "{count} minuter", - "ago": "{parts} sedan", - "now": "nu" } } },