mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Merge pull request #13372 from steverep/fix-more-keys
Fix more bad or missing localize keys
This commit is contained in:
commit
9046c0d0bf
@ -105,7 +105,9 @@ export class HuiLogbookCard extends LitElement implements LovelaceCard {
|
|||||||
return html`
|
return html`
|
||||||
<hui-warning>
|
<hui-warning>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.components.logbook.component_not_loaded"
|
"ui.components.logbook.not_loaded",
|
||||||
|
"platform",
|
||||||
|
"logbook"
|
||||||
)}</hui-warning
|
)}</hui-warning
|
||||||
>
|
>
|
||||||
`;
|
`;
|
||||||
|
@ -97,9 +97,7 @@ export const addEntitiesToLovelaceView = async (
|
|||||||
try {
|
try {
|
||||||
await saveConfig(hass!, null, newConfig);
|
await saveConfig(hass!, null, newConfig);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
alert(
|
alert(hass.localize("ui.panel.lovelace.add_entities.saving_failed"));
|
||||||
hass.localize("ui.panel.config.devices.add_entities.saving_failed")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
path: [0],
|
path: [0],
|
||||||
@ -123,9 +121,7 @@ export const addEntitiesToLovelaceView = async (
|
|||||||
await saveConfig(hass!, newUrlPath, newConfig);
|
await saveConfig(hass!, newUrlPath, newConfig);
|
||||||
} catch {
|
} catch {
|
||||||
alert(
|
alert(
|
||||||
hass.localize(
|
hass.localize("ui.panel.lovelace.add_entities.saving_failed")
|
||||||
"ui.panel.config.devices.add_entities.saving_failed"
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -31,6 +31,7 @@ import {
|
|||||||
} from "lit";
|
} from "lit";
|
||||||
import { property, query, state } from "lit/decorators";
|
import { property, query, state } from "lit/decorators";
|
||||||
import { classMap } from "lit/directives/class-map";
|
import { classMap } from "lit/directives/class-map";
|
||||||
|
import { ifDefined } from "lit/directives/if-defined";
|
||||||
import memoizeOne from "memoize-one";
|
import memoizeOne from "memoize-one";
|
||||||
import { isComponentLoaded } from "../../common/config/is_component_loaded";
|
import { isComponentLoaded } from "../../common/config/is_component_loaded";
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
@ -82,7 +83,10 @@ class HUIRoot extends LitElement {
|
|||||||
|
|
||||||
@property({ type: Boolean }) public narrow = false;
|
@property({ type: Boolean }) public narrow = false;
|
||||||
|
|
||||||
@property() public route?: { path: string; prefix: string };
|
@property({ attribute: false }) public route?: {
|
||||||
|
path: string;
|
||||||
|
prefix: string;
|
||||||
|
};
|
||||||
|
|
||||||
@state() private _curView?: number | "hass-unused-entities";
|
@state() private _curView?: number | "hass-unused-entities";
|
||||||
|
|
||||||
@ -240,7 +244,7 @@ class HUIRoot extends LitElement {
|
|||||||
${this.lovelace!.config.views.map(
|
${this.lovelace!.config.views.map(
|
||||||
(view) => html`
|
(view) => html`
|
||||||
<paper-tab
|
<paper-tab
|
||||||
aria-label=${view.title}
|
aria-label=${ifDefined(view.title)}
|
||||||
class=${classMap({
|
class=${classMap({
|
||||||
"hide-tab": Boolean(
|
"hide-tab": Boolean(
|
||||||
view.visible !== undefined &&
|
view.visible !== undefined &&
|
||||||
@ -255,7 +259,7 @@ class HUIRoot extends LitElement {
|
|||||||
${view.icon
|
${view.icon
|
||||||
? html`
|
? html`
|
||||||
<ha-icon
|
<ha-icon
|
||||||
title=${view.title}
|
title=${ifDefined(view.title)}
|
||||||
.icon=${view.icon}
|
.icon=${view.icon}
|
||||||
></ha-icon>
|
></ha-icon>
|
||||||
`
|
`
|
||||||
@ -472,7 +476,7 @@ class HUIRoot extends LitElement {
|
|||||||
${this.lovelace!.config.views.map(
|
${this.lovelace!.config.views.map(
|
||||||
(view) => html`
|
(view) => html`
|
||||||
<paper-tab
|
<paper-tab
|
||||||
aria-label=${view.title}
|
aria-label=${ifDefined(view.title)}
|
||||||
class=${classMap({
|
class=${classMap({
|
||||||
"hide-tab": Boolean(
|
"hide-tab": Boolean(
|
||||||
!this._editMode &&
|
!this._editMode &&
|
||||||
@ -501,7 +505,7 @@ class HUIRoot extends LitElement {
|
|||||||
${view.icon
|
${view.icon
|
||||||
? html`
|
? html`
|
||||||
<ha-icon
|
<ha-icon
|
||||||
title=${view.title}
|
title=${ifDefined(view.title)}
|
||||||
.icon=${view.icon}
|
.icon=${view.icon}
|
||||||
></ha-icon>
|
></ha-icon>
|
||||||
`
|
`
|
||||||
@ -712,7 +716,7 @@ class HUIRoot extends LitElement {
|
|||||||
private _showQuickBar(): void {
|
private _showQuickBar(): void {
|
||||||
showQuickBar(this, {
|
showQuickBar(this, {
|
||||||
commandMode: false,
|
commandMode: false,
|
||||||
hint: this.hass.localize("ui.dialogs.quick-bar.key_e_hint"),
|
hint: this.hass.localize("ui.tips.key_e_hint"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,6 +357,7 @@
|
|||||||
"triggered_by_homeassistant_starting": "triggered by Home Assistant starting",
|
"triggered_by_homeassistant_starting": "triggered by Home Assistant starting",
|
||||||
"show_trace": "[%key:ui::panel::config::automation::editor::show_trace%]",
|
"show_trace": "[%key:ui::panel::config::automation::editor::show_trace%]",
|
||||||
"retrieval_error": "Could not load logbook",
|
"retrieval_error": "Could not load logbook",
|
||||||
|
"not_loaded": "[%key:ui::dialogs::helper_settings::platform_not_loaded%]",
|
||||||
"messages": {
|
"messages": {
|
||||||
"was_away": "was detected away",
|
"was_away": "was detected away",
|
||||||
"was_at_state": "was detected at {state}",
|
"was_at_state": "was detected at {state}",
|
||||||
@ -925,7 +926,8 @@
|
|||||||
},
|
},
|
||||||
"input_select": {
|
"input_select": {
|
||||||
"options": "Options",
|
"options": "Options",
|
||||||
"add_option": "Add option",
|
"add_option": "[%key:ui::panel::config::automation::editor::actions::type::choose::add_option%]",
|
||||||
|
"remove_option": "[%key:ui::panel::config::automation::editor::actions::type::choose::remove_option%]",
|
||||||
"no_options": "There are no options yet.",
|
"no_options": "There are no options yet.",
|
||||||
"add": "Add"
|
"add": "Add"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user