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