1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Use new localize format (#18574)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Kendell R
2023-11-28 04:29:41 -08:00
committed by GitHub
parent 2087028c47
commit f4ee734ea3
105 changed files with 596 additions and 791 deletions

View File

@@ -194,7 +194,7 @@ export const localizeStateMessage = (
if (state === "home") {
return localize(`${LOGBOOK_LOCALIZE_PATH}.was_at_home`);
}
return localize(`${LOGBOOK_LOCALIZE_PATH}.was_at_state`, "state", state);
return localize(`${LOGBOOK_LOCALIZE_PATH}.was_at_state`, { state });
case "sun":
return state === "above_horizon"
@@ -382,11 +382,9 @@ export const localizeStateMessage = (
return localize(`${LOGBOOK_LOCALIZE_PATH}.became_unavailable`);
}
return hass.localize(
`${LOGBOOK_LOCALIZE_PATH}.changed_to_state`,
"state",
stateObj ? hass.formatEntityState(stateObj, state) : state
);
return hass.localize(`${LOGBOOK_LOCALIZE_PATH}.changed_to_state`, {
state: stateObj ? hass.formatEntityState(stateObj, state) : state,
});
};
export const filterLogbookCompatibleEntities: HaEntityPickerEntityFilterFunc = (