Use clearer dialog button texts + various translation improvements (#7584)

This commit is contained in:
Philip Allgaier 2020-11-09 23:41:22 +01:00 committed by GitHub
parent 4fe0276914
commit 5a9bd73e8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 88 additions and 76 deletions

View File

@ -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);
},

View File

@ -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;

View File

@ -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 });
},

View File

@ -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 });
},

View File

@ -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 {
@ -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;
@ -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(),
});
}

View File

@ -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 });
},

View File

@ -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();

View File

@ -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,
}));

View File

@ -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;
@ -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, {
@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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 {
@ -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(),
});
}

View File

@ -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 {
@ -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(),
});
}

View File

@ -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;

View File

@ -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;

View File

@ -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"),
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;

View File

@ -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();

View File

@ -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,

View File

@ -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;
@ -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;

View File

@ -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"
@ -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(),
});
}
@ -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;
}

View File

@ -269,18 +269,26 @@
"refresh": "Refresh",
"cancel": "Cancel",
"delete": "Delete",
"remove": "Remove",
"enable": "Enable",
"disable": "Disable",
"close": "Close",
"leave": "Leave",
"stay": "Stay",
"next": "Next",
"back": "Back",
"undo": "Undo",
"save": "Save",
"rename": "Rename",
"yes": "Yes",
"no": "No",
"not_now": "Not now",
"skip": "Skip",
"menu": "Menu",
"overflow_menu": "Overflow menu",
"successfully_saved": "Successfully saved",
"successfully_deleted": "Successfully deleted",
"back": "Back",
"error_required": "Required",
"copied": "Copied"
},
@ -446,7 +454,7 @@
"season": "Season",
"track": "Track",
"tv_show": "TV Show",
"url": "Url",
"url": "URL",
"video": "Video"
}
}
@ -789,6 +797,8 @@
"edit": "Edit",
"never_scanned": "Never scanned",
"create_automation": "Create automation with tag",
"confirm_remove_title": "Remove tag?",
"confirm_remove": "Are you sure you want to remove tag {tag}?",
"automation_title": "Tag {name} is scanned",
"headers": {
"name": "Name",
@ -963,7 +973,7 @@
"icon": "Icon",
"title": "Title",
"title_required": "Title is required.",
"url": "Url",
"url": "URL",
"url_error_msg": "The URL should contain a - and cannot contain spaces or special characters, except for _ and -",
"require_admin": "Admin only",
"delete": "Delete",
@ -983,7 +993,7 @@
},
"picker": {
"headers": {
"url": "Url",
"url": "URL",
"type": "Type"
},
"no_resources": "No resources",
@ -991,15 +1001,15 @@
},
"confirm_delete": "Are you sure you want to delete this resource?",
"refresh_header": "Do you want to refresh?",
"refresh_body": "You have to refresh the page to complete the removal, do you want to refresh now?",
"refresh_body": "You have to refresh the page to complete the removal. Do you want to refresh now?",
"cant_edit_yaml": "You are using Lovelace in YAML mode, therefore you cannot manage your resources through the UI. Manage them in configuration.yaml.",
"detail": {
"new_resource": "Add new resource",
"dismiss": "Close",
"warning_header": "Be cautious!",
"warning_text": "Adding resources can be dangerous, make sure you know the source of the resource and trust them. Bad resources could seriously harm your system.",
"url": "Url",
"url_error_msg": "Url is a required field",
"url": "URL",
"url_error_msg": "URL is a required field",
"type": "Resource type",
"delete": "Delete",
"update": "Update",
@ -1660,7 +1670,7 @@
},
"dialog_cloudhook": {
"webhook_for": "Webhook for {name}",
"available_at": "The webhook is available at the following url:",
"available_at": "The webhook is available at the following URL:",
"managed_by_integration": "This webhook is managed by an integration and cannot be disabled.",
"info_disable_webhook": "If you no longer want to use this webhook, you can",
"link_disable_webhook": "disable it",
@ -1770,18 +1780,18 @@
"selected": "{number} selected",
"enable_selected": {
"button": "Enable selected",
"confirm_title": "Do you want to enable {number} entities?",
"confirm_title": "Do you want to enable {number} {number, plural,\n one {entity}\n other {entities}\n}?",
"confirm_text": "This will make them available in Home Assistant again if they are now disabled."
},
"disable_selected": {
"button": "Disable selected",
"confirm_title": "Do you want to disable {number} entities?",
"confirm_title": "Do you want to disable {number} {number, plural,\n one {entity}\n other {entities}\n}?",
"confirm_text": "Disabled entities will not be added to Home Assistant."
},
"remove_selected": {
"button": "Remove selected",
"confirm_title": "Do you want to remove {number} entities?",
"confirm_partly_title": "Only {number} selected entities can be removed.",
"confirm_title": "Do you want to remove {number} {number, plural,\n one {entity}\n other {entities}\n}?",
"confirm_partly_title": "Only {number} {number, plural,\n one {selected entity}\n other {selected entities}\n} can be removed.",
"confirm_text": "You should remove them from your Lovelace config and automations if they contain these entities.",
"confirm_partly_text": "You can only remove {removable} of the selected {selected} entities. Entities can only be removed when the integration is no longer providing the entities. Sometimes you have to restart Home Assistant before you can remove the entities of a removed integration. Are you sure you want to remove the removable entities?"
}
@ -2353,7 +2363,6 @@
"menu": {
"configure_ui": "Edit Dashboard",
"help": "Help",
"refresh": "Refresh",
"start_conversation": "Start conversation",
"reload_resources": "Reload resources",
"exit_edit_mode": "Exit UI edit mode",
@ -2361,7 +2370,7 @@
},
"reload_resources": {
"refresh_header": "Do you want to refresh?",
"refresh_body": "You have to refresh the page to complete the reload, do you want to refresh now?"
"refresh_body": "You have to refresh the page to complete the reload. Do you want to refresh now?"
},
"editor": {
"header": "Edit UI",
@ -2467,7 +2476,7 @@
},
"action-editor": {
"navigation_path": "Navigation Path",
"url_path": "Url Path",
"url_path": "URL Path",
"editor_service_data": "Service data can only be entered in the code editor",
"actions": {
"default_action": "Default Action",
@ -2475,7 +2484,7 @@
"more-info": "More Info",
"toggle": "Toggle",
"navigate": "Navigate",
"url": "Url",
"url": "URL",
"none": "No Action"
}
},
@ -2620,7 +2629,7 @@
"theme": "Theme",
"no_theme": "No theme",
"unit": "Unit",
"url": "Url",
"url": "URL",
"state": "State",
"secondary_info_attribute": "Secondary Info Attribute",
"search": "Search",
@ -2736,8 +2745,7 @@
"starting": "Home Assistant is starting, not everything may be available yet"
},
"changed_toast": {
"message": "The Lovelace UI configuration for this dashboard was updated, refresh to see changes?",
"refresh": "Refresh"
"message": "The Lovelace UI configuration for this dashboard was updated. Refresh to see changes?"
},
"reload_lovelace": "Reload UI"
},