1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 20:55:49 +00:00

Adjust backend translations for entity components (#15820)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Franck Nijhof
2023-03-16 13:51:38 +01:00
committed by GitHub
parent 77dcace95e
commit 0158d7e3e5
10 changed files with 37 additions and 16 deletions

View File

@@ -32,7 +32,7 @@ describe("computeStateDisplay", () => {
};
assert.strictEqual(
computeStateDisplay(localize, stateObj, localeData, {}),
"component.binary_sensor.state._.off"
"component.binary_sensor.entity_component._.state.off"
);
});
@@ -154,7 +154,9 @@ describe("computeStateDisplay", () => {
it("Localizes sensor value with component translation", () => {
const altLocalize = (message, ...args) => {
if (message !== "component.sensor.state._.custom_state") {
if (
message !== "component.sensor.entity_component._.state.custom_state"
) {
return "";
}
return localize(message, ...args);
@@ -166,7 +168,7 @@ describe("computeStateDisplay", () => {
};
assert.strictEqual(
computeStateDisplay(altLocalize, stateObj, localeData, {}),
"component.sensor.state._.custom_state"
"component.sensor.entity_component._.state.custom_state"
);
});