Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dialogs/more-info/ha-more-info-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ export class MoreInfoDialog extends LitElement {
text: this.hass.localize(
"ui.dialogs.more_info_control.restored.confirm_remove_text"
),
confirmText: this.hass.localize("ui.common.yes"),
dismissText: this.hass.localize("ui.common.no"),
confirmText: this.hass.localize("ui.common.remove"),
dismissText: this.hass.localize("ui.common.cancel"),
confirm: () => {
removeEntityRegistryEntry(this.hass, entityId);
},
Expand Down
4 changes: 2 additions & 2 deletions src/panels/config/areas/ha-config-area-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ class HaConfigAreaPage extends LitElement {
text: this.hass.localize(
"ui.panel.config.areas.delete.confirmation_text"
),
dismissText: this.hass.localize("ui.common.no"),
confirmText: this.hass.localize("ui.common.yes"),
dismissText: this.hass.localize("ui.common.cancel"),
confirmText: this.hass.localize("ui.common.delete"),
}))
) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ export default class HaAutomationActionRow extends LitElement {
text: this.hass.localize(
"ui.panel.config.automation.editor.actions.delete_confirm"
),
dismissText: this.hass.localize("ui.common.no"),
confirmText: this.hass.localize("ui.common.yes"),
dismissText: this.hass.localize("ui.common.cancel"),
confirmText: this.hass.localize("ui.common.delete"),
confirm: () => {
fireEvent(this, "value-changed", { value: null });
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export default class HaAutomationConditionRow extends LitElement {
text: this.hass.localize(
"ui.panel.config.automation.editor.conditions.delete_confirm"
),
dismissText: this.hass.localize("ui.common.no"),
confirmText: this.hass.localize("ui.common.yes"),
dismissText: this.hass.localize("ui.common.cancel"),
confirmText: this.hass.localize("ui.common.delete"),
confirm: () => {
fireEvent(this, "value-changed", { value: null });
},
Expand Down
12 changes: 6 additions & 6 deletions src/panels/config/automation/ha-automation-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,8 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
text: this.hass!.localize(
"ui.panel.config.automation.editor.unsaved_confirm"
),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.leave"),
dismissText: this.hass!.localize("ui.common.stay"),
confirm: () => history.back(),
});
} else {
Expand All @@ -667,8 +667,8 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
text: this.hass!.localize(
"ui.panel.config.automation.editor.unsaved_confirm"
),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.leave"),
dismissText: this.hass!.localize("ui.common.stay"),
}))
) {
return;
Expand All @@ -690,8 +690,8 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
text: this.hass.localize(
"ui.panel.config.automation.picker.delete_confirm"
),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.delete"),
dismissText: this.hass!.localize("ui.common.cancel"),
confirm: () => this._delete(),
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ export default class HaAutomationTriggerRow extends LitElement {
text: this.hass.localize(
"ui.panel.config.automation.editor.triggers.delete_confirm"
),
dismissText: this.hass.localize("ui.common.no"),
confirmText: this.hass.localize("ui.common.yes"),
dismissText: this.hass.localize("ui.common.cancel"),
confirmText: this.hass.localize("ui.common.delete"),
confirm: () => {
fireEvent(this, "value-changed", { value: null });
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ export class DialogManageCloudhook extends LitElement {
text: this.hass!.localize(
"ui.panel.config.cloud.dialog_cloudhook.confirm_disable"
),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.cancel"),
confirmText: this.hass!.localize("ui.common.disable"),
confirm: () => {
this._params!.disableHook();
this._closeDialog();
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/devices/ha-config-device-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ export class HaConfigDevicePage extends LitElement {
text: this.hass.localize(
"ui.panel.config.devices.confirm_rename_entity_ids_warning"
),
confirmText: this.hass.localize("ui.common.yes"),
confirmText: this.hass.localize("ui.common.rename"),
dismissText: this.hass.localize("ui.common.no"),
warning: true,
}));
Expand Down
12 changes: 6 additions & 6 deletions src/panels/config/entities/ha-config-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,8 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
text: this.hass.localize(
"ui.panel.config.entities.picker.enable_selected.confirm_text"
),
confirmText: this.hass.localize("ui.common.yes"),
dismissText: this.hass.localize("ui.common.no"),
confirmText: this.hass.localize("ui.common.enable"),
dismissText: this.hass.localize("ui.common.cancel"),
confirm: async () => {
let require_restart = false;
let reload_delay = 0;
Expand Down Expand Up @@ -748,8 +748,8 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
text: this.hass.localize(
"ui.panel.config.entities.picker.disable_selected.confirm_text"
),
confirmText: this.hass.localize("ui.common.yes"),
dismissText: this.hass.localize("ui.common.no"),
confirmText: this.hass.localize("ui.common.disable"),
dismissText: this.hass.localize("ui.common.cancel"),
confirm: () => {
this._selectedEntities.forEach((entity) =>
updateEntityRegistryEntry(this.hass, entity, {
Expand Down Expand Up @@ -788,8 +788,8 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
"selected",
this._selectedEntities.length
),
confirmText: this.hass.localize("ui.common.yes"),
dismissText: this.hass.localize("ui.common.no"),
confirmText: this.hass.localize("ui.common.remove"),
dismissText: this.hass.localize("ui.common.cancel"),
confirm: () => {
removeableEntities.forEach((entity) =>
removeEntityRegistryEntry(this.hass, entity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ export class HaConfigLovelaceRescources extends LitElement {
text: this.hass!.localize(
"ui.panel.config.lovelace.resources.refresh_body"
),
confirmText: this.hass.localize("ui.common.refresh"),
dismissText: this.hass.localize("ui.common.not_now"),
confirm: () => location.reload(),
});
return true;
Expand Down
4 changes: 2 additions & 2 deletions src/panels/config/person/ha-config-person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ class HaConfigPerson extends LitElement {
!(await showConfirmationDialog(this, {
title: this.hass!.localize("ui.panel.config.person.confirm_delete"),
text: this.hass!.localize("ui.panel.config.person.confirm_delete2"),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.cancel"),
confirmText: this.hass!.localize("ui.common.delete"),
}))
) {
return false;
Expand Down
8 changes: 4 additions & 4 deletions src/panels/config/scene/ha-scene-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,8 @@ export class HaSceneEditor extends SubscribeMixin(
text: this.hass!.localize(
"ui.panel.config.scene.editor.unsaved_confirm"
),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.leave"),
dismissText: this.hass!.localize("ui.common.stay"),
confirm: () => this._goBack(),
});
} else {
Expand All @@ -663,8 +663,8 @@ export class HaSceneEditor extends SubscribeMixin(
private _deleteTapped(): void {
showConfirmationDialog(this, {
text: this.hass!.localize("ui.panel.config.scene.picker.delete_confirm"),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.delete"),
dismissText: this.hass!.localize("ui.common.cancel"),
confirm: () => this._delete(),
});
}
Expand Down
8 changes: 4 additions & 4 deletions src/panels/config/script/ha-script-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,8 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
text: this.hass!.localize(
"ui.panel.config.common.editor.confirm_unsaved"
),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.leave"),
dismissText: this.hass!.localize("ui.common.stay"),
confirm: () => history.back(),
});
} else {
Expand All @@ -554,8 +554,8 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
private async _deleteConfirm() {
showConfirmationDialog(this, {
text: this.hass.localize("ui.panel.config.script.editor.delete_confirm"),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.delete"),
dismissText: this.hass!.localize("ui.common.cancel"),
confirm: () => this._delete(),
});
}
Expand Down
12 changes: 7 additions & 5 deletions src/panels/config/tags/ha-config-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,14 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
private async _removeTag(selectedTag: Tag) {
if (
!(await showConfirmationDialog(this, {
title: "Remove tag?",
text: `Are you sure you want to remove tag ${
title: this.hass!.localize("ui.panel.config.tags.confirm_remove_title"),
text: this.hass.localize(
"ui.panel.config.tags.confirm_remove",
"tag",
selectedTag.name || selectedTag.id
}?`,
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.yes"),
),
dismissText: this.hass!.localize("ui.common.cancel"),
confirmText: this.hass!.localize("ui.common.remove"),
}))
) {
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/panels/config/users/ha-config-users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ export class HaConfigUsers extends LitElement {
"name",
entry.name
),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.cancel"),
confirmText: this.hass!.localize("ui.common.delete"),
}))
) {
return false;
Expand Down
5 changes: 2 additions & 3 deletions src/panels/config/zone/ha-config-zone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,8 @@ export class HaConfigZone extends SubscribeMixin(LitElement) {
if (
!(await showConfirmationDialog(this, {
title: this.hass!.localize("ui.panel.config.zone.confirm_delete"),
text: this.hass!.localize("ui.panel.config.zone.confirm_delete2"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This "text" element did not actually exist, so I only kept the title.

dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.cancel"),
confirmText: this.hass!.localize("ui.common.delete"),
}))
) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ export class HuiDialogEditCard extends LitElement
text: this.hass!.localize(
"ui.panel.lovelace.editor.edit_card.confirm_cancel"
),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.stay"),
confirmText: this.hass!.localize("ui.common.leave"),
});
if (confirm) {
this._cancel();
Expand Down
2 changes: 1 addition & 1 deletion src/panels/lovelace/ha-panel-lovelace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class LovelacePanel extends LitElement {
message: this.hass!.localize("ui.panel.lovelace.changed_toast.message"),
action: {
action: () => this._fetchConfig(false),
text: this.hass!.localize("ui.panel.lovelace.changed_toast.refresh"),
text: this.hass!.localize("ui.common.refresh"),
},
duration: 0,
dismissable: false,
Expand Down
8 changes: 4 additions & 4 deletions src/panels/lovelace/hui-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ class LovelaceFullConfigEditor extends LitElement {
text: this.hass.localize(
"ui.panel.lovelace.editor.raw_editor.confirm_unsaved_changes"
),
dismissText: this.hass!.localize("ui.common.no"),
confirmText: this.hass!.localize("ui.common.yes"),
dismissText: this.hass!.localize("ui.common.leave"),
confirmText: this.hass!.localize("ui.common.stay"),
}))
) {
return;
Expand Down Expand Up @@ -217,8 +217,8 @@ class LovelaceFullConfigEditor extends LitElement {
text: this.hass.localize(
"ui.panel.lovelace.editor.raw_editor.confirm_remove_config_text"
),
confirmText: this.hass.localize("ui.common.yes"),
dismissText: this.hass.localize("ui.common.no"),
confirmText: this.hass.localize("ui.common.remove"),
dismissText: this.hass.localize("ui.common.cancel"),
confirm: () => this._removeConfig(),
});
return;
Expand Down
11 changes: 6 additions & 5 deletions src/panels/lovelace/hui-root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,13 @@ class HUIRoot extends LitElement {
? html`
<mwc-list-item
aria-label=${this.hass!.localize(
"ui.panel.lovelace.menu.refresh"
"ui.common.refresh"
)}
graphic="icon"
@request-selected="${this._handleRefresh}"
>
<span
>${this.hass!.localize(
"ui.panel.lovelace.menu.refresh"
)}</span
>${this.hass!.localize("ui.common.refresh")}</span
>
<ha-svg-icon
slot="graphic"
Expand Down Expand Up @@ -610,6 +608,8 @@ class HUIRoot extends LitElement {
text: this.hass!.localize(
"ui.panel.lovelace.reload_resources.refresh_body"
),
confirmText: this.hass.localize("ui.common.refresh"),
dismissText: this.hass.localize("ui.common.not_now"),
confirm: () => location.reload(),
});
}
Expand Down Expand Up @@ -805,7 +805,8 @@ class HUIRoot extends LitElement {
margin-left: max(env(safe-area-inset-left), 12px);
margin-right: env(safe-area-inset-right);
}
ha-tabs, paper-tabs {
ha-tabs,
paper-tabs {
--paper-tabs-selection-bar-color: var(--text-primary-color, #fff);
text-transform: uppercase;
}
Expand Down
Loading