Reword the three switch_as_x alerts to avoid forced lowercase #23481
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 (here in German):
The new device type is inserted there but forced into lowercase which already causes this to be a spelling mistake in languages like German. The same happens when you revert the change, but here with two occurrences:
And when you opt to change from one device type to another it gets even messier:
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:
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.
Proposed change
This PR changes all occurrences of "{domain}" to "''{domain}'' entity" which makes it no longer necessary to force the entity type into lowercase for proper spelling in English.
Thus the forced lowercase is removed in code.
And with all those occurrences now becoming "… a 'Type' entity …" there is no more gender problem in all languages.
Type of change
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: