Add missing translations to Supervisor Wi-Fi network section (#14606)

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
This commit is contained in:
Philip Allgaier 2023-01-30 21:50:20 +01:00 committed by GitHub
parent 549d893407
commit cb00535683
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 7 deletions

View File

@ -138,7 +138,10 @@ export class DialogHassioNetwork
)} )}
${this._interface?.type === "wireless" ${this._interface?.type === "wireless"
? html` ? html`
<ha-expansion-panel header="Wi-Fi" outlined> <ha-expansion-panel
.header=${this.supervisor.localize("dialog.network.wifi")}
outlined
>
${this._interface?.wifi?.ssid ${this._interface?.wifi?.ssid
? html`<p> ? html`<p>
${this.supervisor.localize( ${this.supervisor.localize(
@ -177,7 +180,11 @@ export class DialogHassioNetwork
> >
<span>${ap.ssid}</span> <span>${ap.ssid}</span>
<span slot="secondary"> <span slot="secondary">
${ap.mac} - Strength: ${ap.signal} ${ap.mac} -
${this.supervisor.localize(
"dialog.network.signal_strength"
)}:
${ap.signal}
</span> </span>
</mwc-list-item> </mwc-list-item>
` `
@ -241,7 +248,9 @@ export class DialogHassioNetwork
class="flex-auto" class="flex-auto"
type="password" type="password"
id="psk" id="psk"
label="Password" .label=${this.supervisor.localize(
"dialog.network.wifi_password"
)}
version="wifi" version="wifi"
@value-changed=${this @value-changed=${this
._handleInputValueChangedWifi} ._handleInputValueChangedWifi}

View File

@ -24,7 +24,7 @@ export class HaDialogDatePicker extends LitElement {
@state() private _value?: string; @state() private _value?: string;
public async showDialog(params: datePickerDialogParams): Promise<void> { public async showDialog(params: datePickerDialogParams): Promise<void> {
// app-datpicker has a bug, that it removes its handlers when disconnected, but doesnt add them back when reconnected. // app-datepicker has a bug, that it removes its handlers when disconnected, but doesn't add them back when reconnected.
// So we need to wait for the next render to make sure the element is removed and re-created so the handlers are added. // So we need to wait for the next render to make sure the element is removed and re-created so the handlers are added.
await nextRender(); await nextRender();
this._params = params; this._params = params;

View File

@ -106,7 +106,12 @@ export class HassioNetwork extends LitElement {
)} )}
${this._interface?.type === "wireless" ${this._interface?.type === "wireless"
? html` ? html`
<ha-expansion-panel header="Wi-Fi" outlined> <ha-expansion-panel
.header=${this.hass.localize(
"ui.panel.config.network.supervisor.wifi"
)}
outlined
>
${this._interface?.wifi?.ssid ${this._interface?.wifi?.ssid
? html`<p> ? html`<p>
${this.hass.localize( ${this.hass.localize(
@ -147,7 +152,11 @@ export class HassioNetwork extends LitElement {
> >
<span>${ap.ssid}</span> <span>${ap.ssid}</span>
<span slot="secondary"> <span slot="secondary">
${ap.mac} - Strength: ${ap.signal} ${ap.mac} -
${this.hass.localize(
"ui.panel.config.network.supervisor.signal_strength"
)}:
${ap.signal}
</span> </span>
</mwc-list-item> </mwc-list-item>
` `
@ -211,7 +220,9 @@ export class HassioNetwork extends LitElement {
class="flex-auto" class="flex-auto"
type="password" type="password"
id="psk" id="psk"
label="Password" .label=${this.hass.localize(
"ui.panel.config.network.supervisor.wifi_password"
)}
version="wifi" version="wifi"
@value-changed=${this @value-changed=${this
._handleInputValueChangedWifi} ._handleInputValueChangedWifi}

View File

@ -3679,9 +3679,12 @@
"title": "Configure network interfaces", "title": "Configure network interfaces",
"connected_to": "Connected to {ssid}", "connected_to": "Connected to {ssid}",
"scan_ap": "Scan for access points", "scan_ap": "Scan for access points",
"signal_strength": "Signal strength",
"open": "Open", "open": "Open",
"wep": "WEP", "wep": "WEP",
"wpa": "wpa-psk", "wpa": "wpa-psk",
"wifi": "Wi-Fi",
"wifi_password": "Wi-Fi password",
"warning": "If you are changing the Wi-Fi, IP or gateway addresses, you might lose the connection!", "warning": "If you are changing the Wi-Fi, IP or gateway addresses, you might lose the connection!",
"static": "Static", "static": "Static",
"dhcp": "DHCP", "dhcp": "DHCP",
@ -5376,9 +5379,12 @@
"title": "Network settings", "title": "Network settings",
"connected_to": "Connected to {ssid}", "connected_to": "Connected to {ssid}",
"scan_ap": "Scan for access points", "scan_ap": "Scan for access points",
"signal_strength": "[%key:ui::panel::config::network::supervisor::signal_strength%]",
"open": "Open", "open": "Open",
"wep": "WEP", "wep": "WEP",
"wpa": "wpa-psk", "wpa": "wpa-psk",
"wifi": "[%key:ui::panel::config::network::supervisor::wifi%]",
"wifi_password": "[%key:ui::panel::config::network::supervisor::wifi_password%]",
"warning": "If you are changing the Wi-Fi, IP or gateway addresses, you might lose the connection!", "warning": "If you are changing the Wi-Fi, IP or gateway addresses, you might lose the connection!",
"static": "Static", "static": "Static",
"dhcp": "DHCP", "dhcp": "DHCP",