mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Fix backup data picker translations (#23826)
This commit is contained in:
parent
7535d66373
commit
87907b98bd
@ -4,6 +4,7 @@ import {
|
|||||||
mdiFolder,
|
mdiFolder,
|
||||||
mdiPlayBoxMultiple,
|
mdiPlayBoxMultiple,
|
||||||
mdiPuzzle,
|
mdiPuzzle,
|
||||||
|
mdiShieldCheck,
|
||||||
} from "@mdi/js";
|
} from "@mdi/js";
|
||||||
import type { PropertyValues } from "lit";
|
import type { PropertyValues } from "lit";
|
||||||
import { css, html, LitElement, nothing } from "lit";
|
import { css, html, LitElement, nothing } from "lit";
|
||||||
@ -36,6 +37,7 @@ const ITEM_ICONS = {
|
|||||||
database: mdiChartBox,
|
database: mdiChartBox,
|
||||||
media: mdiPlayBoxMultiple,
|
media: mdiPlayBoxMultiple,
|
||||||
share: mdiFolder,
|
share: mdiFolder,
|
||||||
|
ssl: mdiShieldCheck,
|
||||||
};
|
};
|
||||||
|
|
||||||
interface SelectedItems {
|
interface SelectedItems {
|
||||||
@ -104,6 +106,8 @@ export class HaBackupDataPicker extends LitElement {
|
|||||||
return this.hass.localize(
|
return this.hass.localize(
|
||||||
"ui.panel.config.backup.data_picker.share_folder"
|
"ui.panel.config.backup.data_picker.share_folder"
|
||||||
);
|
);
|
||||||
|
case "ssl":
|
||||||
|
return this.hass.localize("ui.panel.config.backup.data_picker.ssl");
|
||||||
case "addons/local":
|
case "addons/local":
|
||||||
return this.hass.localize(
|
return this.hass.localize(
|
||||||
"ui.panel.config.backup.data_picker.local_addons"
|
"ui.panel.config.backup.data_picker.local_addons"
|
||||||
@ -167,15 +171,14 @@ export class HaBackupDataPicker extends LitElement {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
private _itemChanged(ev: Event) {
|
private _homeassistantChanged(ev: Event) {
|
||||||
const itemValues = this._parseValue(this.value);
|
const itemValues = this._parseValue(this.value);
|
||||||
|
|
||||||
const checkbox = ev.currentTarget as HaCheckbox;
|
const checkbox = ev.currentTarget as HaCheckbox;
|
||||||
const section = (checkbox as any).section;
|
|
||||||
if (checkbox.checked) {
|
if (checkbox.checked) {
|
||||||
itemValues[section].push(checkbox.id);
|
itemValues.homeassistant.push(checkbox.id);
|
||||||
} else {
|
} else {
|
||||||
itemValues[section] = itemValues[section].filter(
|
itemValues.homeassistant = itemValues.homeassistant.filter(
|
||||||
(id) => id !== checkbox.id
|
(id) => id !== checkbox.id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -262,8 +265,7 @@ export class HaBackupDataPicker extends LitElement {
|
|||||||
.checked=${selectedItems.homeassistant.includes(
|
.checked=${selectedItems.homeassistant.includes(
|
||||||
item.id
|
item.id
|
||||||
)}
|
)}
|
||||||
.section=${"homeassistant"}
|
@change=${this._homeassistantChanged}
|
||||||
@change=${this._itemChanged}
|
|
||||||
></ha-checkbox>
|
></ha-checkbox>
|
||||||
</ha-formfield>
|
</ha-formfield>
|
||||||
`
|
`
|
||||||
@ -279,7 +281,7 @@ export class HaBackupDataPicker extends LitElement {
|
|||||||
<ha-backup-formfield-label
|
<ha-backup-formfield-label
|
||||||
slot="label"
|
slot="label"
|
||||||
.label=${this.hass.localize(
|
.label=${this.hass.localize(
|
||||||
"ui.panel.config.backup.data_picker.local_addons"
|
"ui.panel.config.backup.data_picker.addons"
|
||||||
)}
|
)}
|
||||||
.iconPath=${mdiPuzzle}
|
.iconPath=${mdiPuzzle}
|
||||||
>
|
>
|
||||||
|
@ -2408,7 +2408,8 @@
|
|||||||
"media": "Media",
|
"media": "Media",
|
||||||
"share_folder": "Share folder",
|
"share_folder": "Share folder",
|
||||||
"local_addons": "Local add-ons folder",
|
"local_addons": "Local add-ons folder",
|
||||||
"addons": "Add-ons"
|
"addons": "Add-ons",
|
||||||
|
"ssl": "SSL certificates"
|
||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"schedule": "Schedule",
|
"schedule": "Schedule",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user