Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forced lowercase and grammar mess in "change device type of a switch" alerts #22677

Open
3 of 4 tasks
NoRi2909 opened this issue Nov 5, 2024 · 0 comments · May be fixed by #23481
Open
3 of 4 tasks

Forced lowercase and grammar mess in "change device type of a switch" alerts #22677

NoRi2909 opened this issue Nov 5, 2024 · 0 comments · May be fixed by #23481

Comments

@NoRi2909
Copy link
Contributor

NoRi2909 commented Nov 5, 2024

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

When you change a switch entity to show up as a light, fan, lock etc. the following alert comes up as soon as you select Update:

Screenshot 2024-11-05 15 51 46

The new device type is inserted there but forced into lowercase which already causes this to be a spelling mistake in language like German. The same happens when you revert the change, but here with two occurrences:

Screenshot 2024-11-05 15 57 22

And when you opt to change from one device type to another it gets even messier:

Screenshot 2024-11-05 16 01 52

If you know German grammar you will also have noticed that the lowercase isn't the only issue here, on top we run into a lot of grammar mistakes because it's:

  • der Lüfter (male)
  • die Leuchte (female)
  • das Schloss (neutrum)

in German, and that's getting wrong here all over the place with only one translation of "the" into German. The first screenshot already has the workaround in place suggested below, otherwise it would have the same gender problem.

Describe the behavior you expected

We need some general rework of these three strings:

"switch_as_x_confirm": "This switch will be hidden and a new {domain} will be added. Your existing configurations using the switch will continue to work.",
"switch_as_x_remove_confirm": "This {domain} will be removed and the original switch will be visible again. Your existing configurations using the {domain} will no longer work!",
"switch_as_x_change_confirm": "This {domain_1} will be removed and will be replaced by a new {domain_2}. Your existing configurations using the {domain_1} will no longer work!",

  • "This switch will be hidden and a new ''{domain}'' entity will be added. Your existing configurations using the switch will continue to work."
  • "This ''{domain}'' entity will be removed and the original switch will be visible again. Your existing configurations using the ''{domain}'' entity will no longer work!"
  • "This ''{domain_1}'' entity will be removed and will be replaced by a new ''{domain_2}'' entity . Your existing configurations using the ''{domain_1}'' entity will no longer work!"

By placing all device types within apostrophes they can remain uppercase so translations will no longer be harmed.

I'll extend the grammar workaround already present for the first strings to all three in the German translation in Lokalise so it's at least using correct grammar from now on, but the lowercase will remain an issue to fix in code.

What version of Home Assistant Core has the issue?

core-2024.11.3

@NoRi2909 NoRi2909 linked a pull request Dec 27, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant