Skip to content

Commit

Permalink
Change wording from add section to create section (#19978)
Browse files Browse the repository at this point in the history
* Rename add section to create section

* update function name
  • Loading branch information
piitaya committed Mar 4, 2024
1 parent 63d93f2 commit aac00a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/panels/lovelace/views/hui-sections-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
${editMode
? html`
<button
class="add"
@click=${this._addSection}
class="create"
@click=${this._createSection}
aria-label=${this.hass.localize(
"ui.panel.lovelace.editor.section.add_section"
"ui.panel.lovelace.editor.section.create_section"
)}
.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>
Expand All @@ -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!, {
type: "grid",
cards: [],
Expand Down Expand Up @@ -303,7 +303,7 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
padding: 8px;
}
.add {
.create {
margin-top: calc(66px + 8px);
outline: none;
background: none;
Expand All @@ -316,7 +316,7 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
box-sizing: content-box;
}
.add:focus {
.create:focus {
border: 2px solid var(--primary-color);
}
Expand Down
2 changes: 1 addition & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5176,7 +5176,7 @@
"section": {
"unnamed_section": "Unnamed section",
"add_card": "[%key:ui::panel::lovelace::editor::edit_card::add%]",
"add_section": "Add section"
"create_section": "Create section"
},
"delete_section": {
"title": "Delete section",
Expand Down

0 comments on commit aac00a5

Please sign in to comment.