mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-26 06:17:20 +00:00
Fix wrong tag component (#8451)
Will rename the keys in Lokalise after merge
This commit is contained in:
parent
c94bcb6896
commit
64d390ad0f
@ -29,11 +29,7 @@ class HaConfigNavigation extends LitElement {
|
||||
${this.pages.map((page) =>
|
||||
canShowPage(this.hass, page)
|
||||
? html`
|
||||
<a
|
||||
href=${`/config/${page.component}`}
|
||||
aria-role="option"
|
||||
tabindex="-1"
|
||||
>
|
||||
<a href=${page.path} aria-role="option" tabindex="-1">
|
||||
<paper-icon-item>
|
||||
<ha-svg-icon
|
||||
.path=${page.iconPath}
|
||||
|
@ -111,11 +111,10 @@ export const configSections: { [name: string]: PageNavigation[] } = {
|
||||
],
|
||||
experimental: [
|
||||
{
|
||||
component: "tags",
|
||||
component: "tag",
|
||||
path: "/config/tags",
|
||||
translationKey: "ui.panel.config.tags.caption",
|
||||
translationKey: "ui.panel.config.tag.caption",
|
||||
iconPath: mdiNfcVariant,
|
||||
core: true,
|
||||
},
|
||||
],
|
||||
lovelace: [
|
||||
|
@ -72,7 +72,7 @@ class DialogTagDetail extends LitElement
|
||||
this.hass,
|
||||
this._params.entry
|
||||
? this._params.entry.name || this._params.entry.id
|
||||
: this.hass!.localize("ui.panel.config.tags.detail.new_tag")
|
||||
: this.hass!.localize("ui.panel.config.tag.detail.new_tag")
|
||||
)}
|
||||
>
|
||||
<div>
|
||||
@ -80,7 +80,7 @@ class DialogTagDetail extends LitElement
|
||||
<div class="form">
|
||||
${this._params.entry
|
||||
? html`${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.tag_id"
|
||||
"ui.panel.config.tag.detail.tag_id"
|
||||
)}:
|
||||
${this._params.entry.id}`
|
||||
: ""}
|
||||
@ -89,11 +89,9 @@ class DialogTagDetail extends LitElement
|
||||
.value=${this._name}
|
||||
.configValue=${"name"}
|
||||
@value-changed=${this._valueChanged}
|
||||
.label="${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.name"
|
||||
)}"
|
||||
.label="${this.hass!.localize("ui.panel.config.tag.detail.name")}"
|
||||
.errorMessage="${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.required_error_msg"
|
||||
"ui.panel.config.tag.detail.required_error_msg"
|
||||
)}"
|
||||
required
|
||||
auto-validate
|
||||
@ -104,10 +102,10 @@ class DialogTagDetail extends LitElement
|
||||
.configValue=${"id"}
|
||||
@value-changed=${this._valueChanged}
|
||||
.label=${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.tag_id"
|
||||
"ui.panel.config.tag.detail.tag_id"
|
||||
)}
|
||||
.placeholder=${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.tag_id_placeholder"
|
||||
"ui.panel.config.tag.detail.tag_id_placeholder"
|
||||
)}
|
||||
></paper-input>`
|
||||
: ""}
|
||||
@ -117,14 +115,14 @@ class DialogTagDetail extends LitElement
|
||||
<div>
|
||||
<p>
|
||||
${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.usage",
|
||||
"ui.panel.config.tag.detail.usage",
|
||||
"companion_link",
|
||||
html`<a
|
||||
href="https://companion.home-assistant.io/"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.companion_apps"
|
||||
"ui.panel.config.tag.detail.companion_apps"
|
||||
)}</a
|
||||
>`
|
||||
)}
|
||||
@ -151,7 +149,7 @@ class DialogTagDetail extends LitElement
|
||||
@click="${this._deleteEntry}"
|
||||
.disabled=${this._submitting}
|
||||
>
|
||||
${this.hass!.localize("ui.panel.config.tags.detail.delete")}
|
||||
${this.hass!.localize("ui.panel.config.tag.detail.delete")}
|
||||
</mwc-button>
|
||||
`
|
||||
: html``}
|
||||
@ -161,8 +159,8 @@ class DialogTagDetail extends LitElement
|
||||
.disabled=${this._submitting}
|
||||
>
|
||||
${this._params.entry
|
||||
? this.hass!.localize("ui.panel.config.tags.detail.update")
|
||||
: this.hass!.localize("ui.panel.config.tags.detail.create")}
|
||||
? this.hass!.localize("ui.panel.config.tag.detail.update")
|
||||
: this.hass!.localize("ui.panel.config.tag.detail.create")}
|
||||
</mwc-button>
|
||||
${this._params.openWrite && !this._params.entry
|
||||
? html` <mwc-button
|
||||
@ -171,7 +169,7 @@ class DialogTagDetail extends LitElement
|
||||
.disabled=${this._submitting}
|
||||
>
|
||||
${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.create_and_write"
|
||||
"ui.panel.config.tag.detail.create_and_write"
|
||||
)}
|
||||
</mwc-button>`
|
||||
: ""}
|
||||
|
@ -74,7 +74,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
template: (_icon, tag) => html`<tag-image .tag=${tag}></tag-image>`,
|
||||
},
|
||||
display_name: {
|
||||
title: this.hass.localize("ui.panel.config.tags.headers.name"),
|
||||
title: this.hass.localize("ui.panel.config.tag.headers.name"),
|
||||
sortable: true,
|
||||
filterable: true,
|
||||
grows: true,
|
||||
@ -86,16 +86,14 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
.hass=${this.hass}
|
||||
.datetime=${tag.last_scanned_datetime}
|
||||
></ha-relative-time>`
|
||||
: this.hass.localize("ui.panel.config.tags.never_scanned")}
|
||||
: this.hass.localize("ui.panel.config.tag.never_scanned")}
|
||||
</div>`
|
||||
: ""}`,
|
||||
},
|
||||
};
|
||||
if (!narrow) {
|
||||
columns.last_scanned_datetime = {
|
||||
title: this.hass.localize(
|
||||
"ui.panel.config.tags.headers.last_scanned"
|
||||
),
|
||||
title: this.hass.localize("ui.panel.config.tag.headers.last_scanned"),
|
||||
sortable: true,
|
||||
direction: "desc",
|
||||
width: "20%",
|
||||
@ -105,7 +103,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
.hass=${this.hass}
|
||||
.datetime=${last_scanned_datetime}
|
||||
></ha-relative-time>`
|
||||
: this.hass.localize("ui.panel.config.tags.never_scanned")}
|
||||
: this.hass.localize("ui.panel.config.tag.never_scanned")}
|
||||
`,
|
||||
};
|
||||
}
|
||||
@ -117,7 +115,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
.tag=${tag}
|
||||
@click=${(ev: Event) =>
|
||||
this._openWrite((ev.currentTarget as any).tag)}
|
||||
title=${this.hass.localize("ui.panel.config.tags.write")}
|
||||
title=${this.hass.localize("ui.panel.config.tag.write")}
|
||||
>
|
||||
<ha-svg-icon .path=${mdiContentDuplicate}></ha-svg-icon>
|
||||
</mwc-icon-button>`,
|
||||
@ -130,7 +128,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
.tag=${tag}
|
||||
@click=${(ev: Event) =>
|
||||
this._createAutomation((ev.currentTarget as any).tag)}
|
||||
title=${this.hass.localize("ui.panel.config.tags.create_automation")}
|
||||
title=${this.hass.localize("ui.panel.config.tag.create_automation")}
|
||||
>
|
||||
<ha-svg-icon .path=${mdiRobot}></ha-svg-icon>
|
||||
</mwc-icon-button>`,
|
||||
@ -142,7 +140,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
.tag=${tag}
|
||||
@click=${(ev: Event) =>
|
||||
this._openDialog((ev.currentTarget as any).tag)}
|
||||
title=${this.hass.localize("ui.panel.config.tags.edit")}
|
||||
title=${this.hass.localize("ui.panel.config.tag.edit")}
|
||||
>
|
||||
<ha-svg-icon .path=${mdiCog}></ha-svg-icon>
|
||||
</mwc-icon-button>`,
|
||||
@ -201,7 +199,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
this.hass.language
|
||||
)}
|
||||
.data=${this._data(this._tags)}
|
||||
.noDataText=${this.hass.localize("ui.panel.config.tags.no_tags")}
|
||||
.noDataText=${this.hass.localize("ui.panel.config.tag.no_tags")}
|
||||
hasFab
|
||||
>
|
||||
<mwc-icon-button slot="toolbar-icon" @click=${this._showHelp}>
|
||||
@ -209,7 +207,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
</mwc-icon-button>
|
||||
<ha-fab
|
||||
slot="fab"
|
||||
.label=${this.hass.localize("ui.panel.config.tags.add_tag")}
|
||||
.label=${this.hass.localize("ui.panel.config.tag.add_tag")}
|
||||
extended
|
||||
@click=${this._addTag}
|
||||
>
|
||||
@ -221,18 +219,18 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
|
||||
private _showHelp() {
|
||||
showAlertDialog(this, {
|
||||
title: this.hass.localize("ui.panel.config.tags.caption"),
|
||||
title: this.hass.localize("ui.panel.config.tag.caption"),
|
||||
text: html`
|
||||
<p>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.tags.detail.usage",
|
||||
"ui.panel.config.tag.detail.usage",
|
||||
"companion_link",
|
||||
html`<a
|
||||
href="https://companion.home-assistant.io/"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.companion_apps"
|
||||
"ui.panel.config.tag.detail.companion_apps"
|
||||
)}</a
|
||||
>`
|
||||
)}
|
||||
@ -243,7 +241,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
${this.hass.localize("ui.panel.config.tags.learn_more")}
|
||||
${this.hass.localize("ui.panel.config.tag.learn_more")}
|
||||
</a>
|
||||
</p>
|
||||
`,
|
||||
@ -264,7 +262,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
private _createAutomation(tag: Tag) {
|
||||
const data = {
|
||||
alias: this.hass.localize(
|
||||
"ui.panel.config.tags.automation_title",
|
||||
"ui.panel.config.tag.automation_title",
|
||||
"name",
|
||||
tag.name || tag.id
|
||||
),
|
||||
@ -312,9 +310,9 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
private async _removeTag(selectedTag: Tag) {
|
||||
if (
|
||||
!(await showConfirmationDialog(this, {
|
||||
title: this.hass!.localize("ui.panel.config.tags.confirm_remove_title"),
|
||||
title: this.hass!.localize("ui.panel.config.tag.confirm_remove_title"),
|
||||
text: this.hass.localize(
|
||||
"ui.panel.config.tags.confirm_remove",
|
||||
"ui.panel.config.tag.confirm_remove",
|
||||
"tag",
|
||||
selectedTag.name || selectedTag.id
|
||||
),
|
||||
|
@ -556,7 +556,7 @@
|
||||
"areas": "[%key:ui::panel::config::areas::caption%]",
|
||||
"scene": "[%key:ui::panel::config::scene::caption%]",
|
||||
"helpers": "[%key:ui::panel::config::helpers::caption%]",
|
||||
"tags": "[%key:ui::panel::config::tags::caption%]",
|
||||
"tag": "[%key:ui::panel::config::tag::caption%]",
|
||||
"person": "[%key:ui::panel::config::person::caption%]",
|
||||
"devices": "[%key:ui::panel::config::devices::caption%]",
|
||||
"entities": "[%key:ui::panel::config::entities::caption%]",
|
||||
@ -883,7 +883,7 @@
|
||||
"confirmation_text": "All devices in this area will become unassigned."
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"tag": {
|
||||
"caption": "Tags",
|
||||
"description": "Trigger automations when a NFC tag, QR code, etc. is scanned",
|
||||
"learn_more": "Learn more about tags",
|
||||
|
Loading…
x
Reference in New Issue
Block a user