Change wording from add section to create section (#19978)

* Rename add section to create section

* update function name
This commit is contained in:
Paul Bottein 2024-03-04 16:33:31 +01:00 committed by GitHub
parent 0c6bf701c7
commit 1b7742ef7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View File

@ -119,13 +119,13 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
${editMode ${editMode
? html` ? html`
<button <button
class="add" class="create"
@click=${this._addSection} @click=${this._createSection}
aria-label=${this.hass.localize( aria-label=${this.hass.localize(
"ui.panel.lovelace.editor.section.add_section" "ui.panel.lovelace.editor.section.create_section"
)} )}
.title=${this.hass.localize( .title=${this.hass.localize(
"ui.panel.lovelace.editor.section.add_section" "ui.panel.lovelace.editor.section.create_section"
)} )}
> >
<ha-svg-icon .path=${mdiViewGridPlus}></ha-svg-icon> <ha-svg-icon .path=${mdiViewGridPlus}></ha-svg-icon>
@ -137,7 +137,7 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
`; `;
} }
private _addSection(): void { private _createSection(): void {
const newConfig = addSection(this.lovelace!.config, this.index!, { const newConfig = addSection(this.lovelace!.config, this.index!, {
type: "grid", type: "grid",
cards: [], cards: [],
@ -303,7 +303,7 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
padding: 8px; padding: 8px;
} }
.add { .create {
margin-top: calc(66px + 8px); margin-top: calc(66px + 8px);
outline: none; outline: none;
background: none; background: none;
@ -316,7 +316,7 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
box-sizing: content-box; box-sizing: content-box;
} }
.add:focus { .create:focus {
border: 2px solid var(--primary-color); border: 2px solid var(--primary-color);
} }

View File

@ -5199,7 +5199,7 @@
"section": { "section": {
"unnamed_section": "Unnamed section", "unnamed_section": "Unnamed section",
"add_card": "[%key:ui::panel::lovelace::editor::edit_card::add%]", "add_card": "[%key:ui::panel::lovelace::editor::edit_card::add%]",
"add_section": "Add section" "create_section": "Create section"
}, },
"delete_section": { "delete_section": {
"title": "Delete section", "title": "Delete section",