diff --git a/src/panels/config/integrations/integration-panels/matter/matter-config-dashboard.ts b/src/panels/config/integrations/integration-panels/matter/matter-config-dashboard.ts index b122fc9b70..23aae9736c 100644 --- a/src/panels/config/integrations/integration-panels/matter/matter-config-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/matter/matter-config-dashboard.ts @@ -46,44 +46,54 @@ export class MatterConfigDashboard extends LitElement { href="/config/thread" slot="toolbar-icon" > - Visit Thread Panel ` : ""}
Matter is still in the early phase of development, it is not - meant to be used in production. This panel is for development - only.${this.hass.localize( + "ui.panel.config.matter.panel.experimental_note" + )}
${this._error ? html`${this._error}` : ""} - You can add Matter devices by commissing them if they are not - setup yet, or share them from another controller and enter the - share code. + ${this.hass.localize("ui.panel.config.matter.panel.add_devices")}
${canCommissionMatterExternal(this.hass) ? html`Commission device with mobile app${this.hass.localize( + "ui.panel.config.matter.panel.mobile_app_commisioning" + )}` : ""} Commission device${this.hass.localize( + "ui.panel.config.matter.panel.commission_device" + )} Add shared device${this.hass.localize( + "ui.panel.config.matter.panel.add_shared_device" + )} Set WiFi Credentials${this.hass.localize( + "ui.panel.config.matter.panel.set_wifi_credentials" + )} Set Thread Credentials${this.hass.localize( + "ui.panel.config.matter.panel.set_thread_credentials" + )}
@@ -114,19 +124,31 @@ export class MatterConfigDashboard extends LitElement { private async _setWifi(): Promise { this._error = undefined; const networkName = await showPromptDialog(this, { - title: "Network name", - inputLabel: "Network name", + title: this.hass.localize( + "ui.panel.config.matter.panel.prompts.network_name.title" + ), + inputLabel: this.hass.localize( + "ui.panel.config.matter.panel.prompts.network_name.input_label" + ), inputType: "string", - confirmText: "Continue", + confirmText: this.hass.localize( + "ui.panel.config.matter.panel.prompts.network_name.confirm" + ), }); if (!networkName) { return; } const psk = await showPromptDialog(this, { - title: "Passcode", - inputLabel: "Code", + title: this.hass.localize( + "ui.panel.config.matter.panel.prompts.passcode.title" + ), + inputLabel: this.hass.localize( + "ui.panel.config.matter.panel.prompts.passcode.input_label" + ), inputType: "password", - confirmText: "Set Wifi", + confirmText: this.hass.localize( + "ui.panel.config.matter.panel.prompts.passcode.confirm" + ), }); if (!psk) { return; @@ -140,10 +162,16 @@ export class MatterConfigDashboard extends LitElement { private async _commission(): Promise { const code = await showPromptDialog(this, { - title: "Commission device", - inputLabel: "Code", + title: this.hass.localize( + "ui.panel.config.matter.panel.prompts.commission_device.title" + ), + inputLabel: this.hass.localize( + "ui.panel.config.matter.panel.prompts.commission_device.input_label" + ), inputType: "string", - confirmText: "Commission", + confirmText: this.hass.localize( + "ui.panel.config.matter.panel.prompts.commission_device.confirm" + ), }); if (!code) { return; @@ -160,10 +188,16 @@ export class MatterConfigDashboard extends LitElement { private async _acceptSharedDevice(): Promise { const code = await showPromptDialog(this, { - title: "Add shared device", - inputLabel: "Pin", + title: this.hass.localize( + "ui.panel.config.matter.panel.prompts.add_shared_device.title" + ), + inputLabel: this.hass.localize( + "ui.panel.config.matter.panel.prompts.add_shared_device.input_label" + ), inputType: "number", - confirmText: "Accept device", + confirmText: this.hass.localize( + "ui.panel.config.matter.panel.prompts.add_shared_device.confirm" + ), }); if (!code) { return; @@ -180,10 +214,16 @@ export class MatterConfigDashboard extends LitElement { private async _setThread(): Promise { const code = await showPromptDialog(this, { - title: "Set Thread operation", - inputLabel: "Dataset", + title: this.hass.localize( + "ui.panel.config.matter.panel.prompts.set_thread.title" + ), + inputLabel: this.hass.localize( + "ui.panel.config.matter.panel.prompts.set_thread.input_label" + ), inputType: "string", - confirmText: "Set Thread", + confirmText: this.hass.localize( + "ui.panel.config.matter.panel.prompts.set_thread.confirm" + ), }); if (!code) { return; diff --git a/src/translations/en.json b/src/translations/en.json index 0be317a523..f643847093 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -6834,6 +6834,43 @@ } }, "matter": { + "panel": { + "thread_panel": "Visit Thread Panel", + "experimental_note": "Matter is still in the early phase of development, it is not meant to be used in production. This panel is for development only.", + "add_devices": "You can add Matter devices by commissioning them if they are not set up yet, or share them from another controller and enter the sharing code.", + "mobile_app_commisioning": "Commission device with mobile app", + "commission_device": "Commission device", + "add_shared_device": "Add shared device", + "set_wifi_credentials": "Set Wi-Fi Credentials", + "set_thread_credentials": "Set Thread credentials", + "prompts": { + "network_name": { + "title": "Network name", + "input_label": "Network name", + "confirm": "Continue" + }, + "passcode": { + "title": "Passcode", + "input_label": "Code", + "confirm": "Set Wifi" + }, + "commission_device": { + "title": "Commission device", + "input_label": "Code", + "confirm": "Commission" + }, + "add_shared_device": { + "title": "Add shared device", + "input_label": "Pin", + "confirm": "Accept device" + }, + "set_thread": { + "title": "Set Thread operation", + "input_label": "Dataset", + "confirm": "Set Thread" + } + } + }, "network_type": { "thread": "Thread", "wifi": "Wi-Fi",