mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 00:36:34 +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`
|
||||
<hui-warning>
|
||||
${this.hass.localize(
|
||||
"ui.components.logbook.component_not_loaded"
|
||||
"ui.components.logbook.not_loaded",
|
||||
"platform",
|
||||
"logbook"
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
|
@ -97,9 +97,7 @@ export const addEntitiesToLovelaceView = async (
|
||||
try {
|
||||
await saveConfig(hass!, null, newConfig);
|
||||
} catch (err: any) {
|
||||
alert(
|
||||
hass.localize("ui.panel.config.devices.add_entities.saving_failed")
|
||||
);
|
||||
alert(hass.localize("ui.panel.lovelace.add_entities.saving_failed"));
|
||||
}
|
||||
},
|
||||
path: [0],
|
||||
@ -123,9 +121,7 @@ export const addEntitiesToLovelaceView = async (
|
||||
await saveConfig(hass!, newUrlPath, newConfig);
|
||||
} catch {
|
||||
alert(
|
||||
hass.localize(
|
||||
"ui.panel.config.devices.add_entities.saving_failed"
|
||||
)
|
||||
hass.localize("ui.panel.lovelace.add_entities.saving_failed")
|
||||
);
|
||||
}
|
||||
},
|
||||
|
@ -31,6 +31,7 @@ import {
|
||||
} from "lit";
|
||||
import { property, query, state } from "lit/decorators";
|
||||
import { classMap } from "lit/directives/class-map";
|
||||
import { ifDefined } from "lit/directives/if-defined";
|
||||
import memoizeOne from "memoize-one";
|
||||
import { isComponentLoaded } from "../../common/config/is_component_loaded";
|
||||
import { fireEvent } from "../../common/dom/fire_event";
|
||||
@ -82,7 +83,10 @@ class HUIRoot extends LitElement {
|
||||
|
||||
@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";
|
||||
|
||||
@ -240,7 +244,7 @@ class HUIRoot extends LitElement {
|
||||
${this.lovelace!.config.views.map(
|
||||
(view) => html`
|
||||
<paper-tab
|
||||
aria-label=${view.title}
|
||||
aria-label=${ifDefined(view.title)}
|
||||
class=${classMap({
|
||||
"hide-tab": Boolean(
|
||||
view.visible !== undefined &&
|
||||
@ -255,7 +259,7 @@ class HUIRoot extends LitElement {
|
||||
${view.icon
|
||||
? html`
|
||||
<ha-icon
|
||||
title=${view.title}
|
||||
title=${ifDefined(view.title)}
|
||||
.icon=${view.icon}
|
||||
></ha-icon>
|
||||
`
|
||||
@ -472,7 +476,7 @@ class HUIRoot extends LitElement {
|
||||
${this.lovelace!.config.views.map(
|
||||
(view) => html`
|
||||
<paper-tab
|
||||
aria-label=${view.title}
|
||||
aria-label=${ifDefined(view.title)}
|
||||
class=${classMap({
|
||||
"hide-tab": Boolean(
|
||||
!this._editMode &&
|
||||
@ -501,7 +505,7 @@ class HUIRoot extends LitElement {
|
||||
${view.icon
|
||||
? html`
|
||||
<ha-icon
|
||||
title=${view.title}
|
||||
title=${ifDefined(view.title)}
|
||||
.icon=${view.icon}
|
||||
></ha-icon>
|
||||
`
|
||||
@ -712,7 +716,7 @@ class HUIRoot extends LitElement {
|
||||
private _showQuickBar(): void {
|
||||
showQuickBar(this, {
|
||||
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",
|
||||
"show_trace": "[%key:ui::panel::config::automation::editor::show_trace%]",
|
||||
"retrieval_error": "Could not load logbook",
|
||||
"not_loaded": "[%key:ui::dialogs::helper_settings::platform_not_loaded%]",
|
||||
"messages": {
|
||||
"was_away": "was detected away",
|
||||
"was_at_state": "was detected at {state}",
|
||||
@ -925,7 +926,8 @@
|
||||
},
|
||||
"input_select": {
|
||||
"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.",
|
||||
"add": "Add"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user