Localize system log detail (#19813)

This commit is contained in:
karwosts 2024-02-16 10:03:35 -05:00 committed by GitHub
parent 26600e3d78
commit 2524c96db6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 33 additions and 9 deletions

View File

@ -102,12 +102,17 @@ class DialogSystemLogDetail extends LitElement {
: ""}
<div class="contents" tabindex="-1" dialogInitialFocus>
<p>
Logger: ${item.name}<br />
Source: ${item.source.join(":")}
${this.hass.localize("ui.panel.config.logs.detail.logger")}:
${item.name}<br />
${this.hass.localize("ui.panel.config.logs.detail.source")}:
${item.source.join(":")}
${integration
? html`
<br />
Integration: ${domainToName(this.hass.localize, integration)}
${this.hass.localize(
"ui.panel.config.logs.detail.integration"
)}:
${domainToName(this.hass.localize, integration)}
${!this._manifest ||
// Can happen with custom integrations
!showDocumentation
@ -122,7 +127,9 @@ class DialogSystemLogDetail extends LitElement {
: this._manifest.documentation}
target="_blank"
rel="noreferrer"
>documentation</a
>${this.hass.localize(
"ui.panel.config.logs.detail.documentation"
)}</a
>${this._manifest.is_built_in ||
this._manifest.issue_tracker
? html`,
@ -133,7 +140,9 @@ class DialogSystemLogDetail extends LitElement {
)}
target="_blank"
rel="noreferrer"
>issues</a
>${this.hass.localize(
"ui.panel.config.logs.detail.issues"
)}</a
>`
: ""})
`}
@ -142,16 +151,21 @@ class DialogSystemLogDetail extends LitElement {
<br />
${item.count > 0
? html`
First occurred:
${this.hass.localize(
"ui.panel.config.logs.detail.first_occurred"
)}:
${formatSystemLogTime(
item.first_occurred,
this.hass!.locale,
this.hass!.config
)}
(${item.count} occurrences) <br />
(${item.count}
${this.hass.localize(
"ui.panel.config.logs.detail.occurrences"
)}) <br />
`
: ""}
Last logged:
${this.hass.localize("ui.panel.config.logs.detail.last_logged")}:
${formatSystemLogTime(
item.timestamp,
this.hass!.locale,

View File

@ -2169,7 +2169,17 @@
"show_full_logs": "Show full logs",
"download_full_log": "Download full log",
"provider_not_found": "Log provider not found",
"provider_not_available": "Logs for ''{provider}'' are not available on your system."
"provider_not_available": "Logs for ''{provider}'' are not available on your system.",
"detail": {
"logger": "Logger",
"source": "Source",
"integration": "[%key:ui::panel::config::integrations::integration%]",
"documentation": "documentation",
"issues": "issues",
"first_occurred": "First occurred",
"occurrences": "occurrences",
"last_logged": "Last logged"
}
},
"lovelace": {
"caption": "Dashboards",