Skip to content

Commit

Permalink
Add network adapter translations (#24096)
Browse files Browse the repository at this point in the history
  • Loading branch information
wendevlin authored Feb 6, 2025
1 parent e9fef1f commit 3918194
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
19 changes: 13 additions & 6 deletions src/components/ha-network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,13 @@ export class HaNetwork extends LitElement {
>
</ha-checkbox>
</span>
<span slot="heading" data-for="auto_configure"> Auto Configure </span>
<span slot="heading" data-for="auto_configure">
${this.hass.localize(
"ui.panel.config.network.adapter.auto_configure"
)}
</span>
<span slot="description" data-for="auto_configure">
Detected:
${this.hass.localize("ui.panel.config.network.adapter.detected")}:
${format_auto_detected_interfaces(this.networkConfig.adapters)}
</span>
</ha-settings-row>
Expand All @@ -85,18 +89,21 @@ export class HaNetwork extends LitElement {
</ha-checkbox>
</span>
<span slot="heading">
Adapter: ${adapter.name}
${this.hass.localize(
"ui.panel.config.network.adapter.adapter"
)}:
${adapter.name}
${adapter.default
? html`<ha-svg-icon .path=${mdiStar}></ha-svg-icon>
(Default)`
: ""}
(${this.hass.localize("ui.common.default")})`
: nothing}
</span>
<span slot="description">
${format_addresses([...adapter.ipv4, ...adapter.ipv6])}
</span>
</ha-settings-row>`
)
: ""}
: nothing}
`;
}

Expand Down
7 changes: 6 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6122,7 +6122,12 @@
},
"network_adapter": "Network adapter",
"network_adapter_info": "Configure which network adapters integrations will use. Currently this setting only affects multicast traffic. A restart is required for these settings to apply.",
"ip_information": "IP Information"
"ip_information": "IP Information",
"adapter": {
"auto_configure": "Auto configure",
"detected": "Detected",
"adapter": "Adapter"
}
},
"storage": {
"caption": "Storage",
Expand Down

0 comments on commit 3918194

Please sign in to comment.