Use integration_type as header for config entries (#16786)

This commit is contained in:
Bram Kragten 2023-06-05 19:18:42 +02:00 committed by GitHub
parent 47fdae764f
commit 93e31df106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 7 deletions

View File

@ -478,9 +478,13 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
<ha-card>
<h1 class="card-header">
${this.hass.localize(
"ui.panel.config.integrations.integration_page.entries"
)}
${this._manifest?.integration_type
? this.hass.localize(
`ui.panel.config.integrations.integration_page.entries_${this._manifest?.integration_type}`
)
: this.hass.localize(
`ui.panel.config.integrations.integration_page.entries`
)}
</h1>
${normalEntries.length === 0
? html`<div class="card-content no-entries">
@ -494,9 +498,13 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
</mwc-list>
<div class="card-actions">
<ha-button @click=${this._addIntegration}>
${this.hass.localize(
"ui.panel.config.integrations.integration_page.add_entry"
)}
${this._manifest?.integration_type
? this.hass.localize(
`ui.panel.config.integrations.integration_page.add_${this._manifest?.integration_type}`
)
: this.hass.localize(
`ui.panel.config.integrations.integration_page.add_entry`
)}
</ha-button>
</div>
</ha-card>

View File

@ -3251,9 +3251,19 @@
},
"integration_page": {
"entries": "Integration entries",
"entries_device": "Devices",
"entries_hub": "Hubs",
"entries_service": "Services",
"entries_helper": "Helpers",
"entries_hardware": "Hardware",
"no_entries": "No entries",
"attention_entries": "Needs attention",
"add_entry": "Add entry"
"add_entry": "Add entry",
"add_device": "Add device",
"add_hub": "Add hub",
"add_service": "Add service",
"add_helper": "Add helper",
"add_hardware": "Add hardware"
},
"config_entry": {
"application_credentials": {