Add translations for backup agents encryption (#23938)

* Add translations for backup agents encryption

* Update src/translations/en.json

* Split class map

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
This commit is contained in:
Wendelin 2025-01-29 16:31:55 +01:00 committed by GitHub
parent a0e7d6f1c6
commit c97d0ce68a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 34 additions and 29 deletions

View File

@ -266,38 +266,42 @@ class HaConfigBackupDetails extends LitElement {
})}
crossorigin="anonymous"
referrerpolicy="no-referrer"
alt=""
alt=${`${domain} logo`}
slot="start"
/>
`
}
<div slot="headline">${name}</div>
${
failed
? html`
<div slot="supporting-text">
<span class="dot error"></span>
<span>
${this.hass.localize(
"ui.panel.config.backup.details.locations.backup_failed"
)}
</span>
</div>
`
: unencrypted
? html`
<div slot="supporting-text">
<span class="dot warning"></span>
<span> Unencrypted </span>
</div>
`
: html`
<div slot="supporting-text">
<span class="dot success"></span>
<span> Encrypted </span>
</div>
`
}
<div slot="supporting-text">
${
failed
? html`
<span class="dot error"></span>
<span>
${this.hass.localize(
"ui.panel.config.backup.details.locations.backup_failed"
)}
</span>
`
: unencrypted
? html`
<span class="dot warning"></span>
<span>
${this.hass.localize(
"ui.panel.config.backup.details.locations.unencrypted"
)}</span
>
`
: html`
<span class="dot success"></span>
<span
>${this.hass.localize(
"ui.panel.config.backup.details.locations.encrypted"
)}</span
>
`
}
</div>
</div>
${
success

View File

@ -232,7 +232,6 @@ class HaConfigBackupDetails extends LitElement {
private async _fetchAgent() {
try {
// Todo fetch agent details
const { agents } = await fetchBackupAgentsInfo(this.hass);
const agent = agents.find((a) => a.agent_id === this.agentId);
if (!agent) {

View File

@ -2661,7 +2661,9 @@
"title": "Locations",
"backup_failed": "Backup failed",
"encryption_turned_off": "Encryption turned off",
"download": "Download from this location"
"download": "Download from this location",
"unencrypted": "Unencrypted",
"encrypted": "Encrypted"
}
},
"location": {