Use clearer dialog button texts + various translation improvements#7584
Use clearer dialog button texts + various translation improvements#7584bramkragten merged 5 commits intohome-assistant:devfrom
Conversation
adamjernst
left a comment
There was a problem hiding this comment.
Nice tweak! I'm not a maintainer, just a drive-by commenter...
| "ui.panel.config.lovelace.resources.refresh_body" | ||
| ), | ||
| confirmText: this.hass.localize("ui.common.yes"), | ||
| dismissText: this.hass.localize("ui.common.no"), |
There was a problem hiding this comment.
Nit: I would prefer "Refresh" / "Ignore", because it makes it clear what the buttons do if you don't read the text. 🤷
There was a problem hiding this comment.
I would be fine with "Refresh", but I am not sure about "Ignore". In other places such as the integration config page, "Ignore" means really ignore from now on out = do not ask again. That however is not the case here and therefore could be confusing plus the user is not really ignoring it here (in the sense of stopping e.g. a longer guided "wizard" / dialog), but deciding "no" right on this popup.
There was a problem hiding this comment.
I like "Refresh" for the yes button. The no could be something as Not now
There was a problem hiding this comment.
I changed to "Refresh".
@bramkragten I am not sure if there really is a meaningful difference between "No" and "Not now". Isn't a "No" basically always implicitly a "Not now"? There are not many situations where you couldn't come back later and do whatever you previously declined. If there is no real difference I would stick with "No" since shorter and commonly (and consistently) used through the frontend today.
There was a problem hiding this comment.
@spacegaier I myself was influenced by the Apple Human Interface Guidelines, which say that you should avoid using Yes and No for button titles.
You point out that No is already widely used in the frontend, but hey, it's never too late to start doing better :D
I vote for "Not Now" myself, because it is clear what the dialog will do even if you only read the button titles.
There was a problem hiding this comment.
I now went through the code base and applied this principle of more meaningful button texts to all dialogs. Got rid of yes/no in most places and substituted by clearer texts, e.g. delete/cancel or enable/cancel or leave/stay (for unsaved changes popups). The concrete refresh topic that started this PR is no refresh/not_now.
Let me know what you think.
Note: I saw we have both "delete" and "remove" used. It makes sense e.g. for tags to only be removed since we are actually deleting the physical tag, but in other areas that distinction might be not really thought through yet.
| if ( | ||
| !(await showConfirmationDialog(this, { | ||
| title: this.hass!.localize("ui.panel.config.zone.confirm_delete"), | ||
| text: this.hass!.localize("ui.panel.config.zone.confirm_delete2"), |
There was a problem hiding this comment.
This "text" element did not actually exist, so I only kept the title.
| "back": "Back", | ||
| "undo": "Undo", | ||
| "save": "Save", | ||
| "rename": "Rename", |
There was a problem hiding this comment.
This one is used once, not really common?
There was a problem hiding this comment.
I put it in here, since I interpreted "common" to also also mean "generic" => it doesn't make sense to stick this really generic simple string into a specific subsection IMHO.
I wouldn't be surprised if other processes in the future would require the same as well.
1367641 to
54cd928
Compare
…ments (home-assistant#7584)" This reverts commit f7703c8.
Breaking change
Proposed change
Original scope of the PR: Currently the reload dialogs are Ok/Cancel which is weird since they suggest you can cancel the overall process e.g. the process of deleting a resource (after which this dialog pops up). This PR converts them to Yes/No.
New scope of the PR:
By now it has increased to include the following:
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: