-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Inconsistent "is" in component::cover::device_automation::condition_type:: strings #128233
Comments
Don't they append the conditional value set at the end in the UI? |
@joostlek Those show up in the Conditions section of automations like this: Comparing to other entities that don't have that "is" at the end: So there is no problem in removing those as the value is not appended directly to the string. |
Can you adding a value to both? |
@joostlek What to you mean with
I can set the above and below values in either context. |
@joostlek Now I think I understand what you where after: When I define a trigger this creates a sentence that is shown in the header of that section. See both in comparison in the above screenshot. And it remains like that when I collapse the lower part. If a sentenced was created for conditions then we would need those verbs in all of them. |
I think this is worth a frontend bug, since I think we then would have
You mean this issue? |
@joostlek Well, creating those sentences with But as the first step we need to address this bug here that these two strings I reported are inconsistent and have that "is" at the end that would also collide with the ER you suggested above:
All other
strings don't end with "is". That's all that needs to be fixed here. So the two strings to fix are in: homeassistant/components/cover/strings.json Note: I have just learned that those paths I see in Lokalise and used in my bug reports like
don't seem to help in finding the strings quickly in Github. You need the full text for searching. |
Hmm, I see what you mean, I will have a check with a frontender to see if this is indeed a bug and that the frontend must change, or that the backend must change |
@joostlek I have to correct myself regarding those summaries for Conditions: I found that for entity based Conditions that sentence is already build in the header: Therefore my bug report is still valid, the static "is" in the two reported strings has to be removed,
Now as you can see in the screen shot above that German is terrible because the translation is not correct at the moment. I have changed that to:
So for the example in the screenshot I would get:
But Lokalise only saves this with a warning because I had to branch twice for Here a screenshot of English and German side-by-side so the colored syntax is easier to check: If that works I can fix several more. Already managed a few of the simpler ones that weren't correct, yet. |
I am not sure if Lokalise provides that when we download the translations. I am not sure how we can allow mutiple branches and keep it working |
@joostlek Sorry, I think I misused the word "branch" here … I meant that within that code I had to use
Because in German the state comes between the noun and the verb. There is just single translation from me, no two code branches. ;-) I manged all other of those conditional strings in the meantime, so that one is the only one where Lokalise throws a warning. Perhaps I find a way to work around the issue by rewording some way. But it is very difficult because that sentence can really have a ton of variation. |
Yea I understood correctly but couldn't find the right word. but the rest of my comment was still valid :) |
I ran my code through the parser at https://format-message.github.io/icu-message-format-for-translators/editor.html It does not complain about the format of my code, so it's probably just Lokalise that believes I accidentially duplicated that condition. I could make the whole thing even simpler, but then Lokalize complains even more. But I cannot trigger the choices for zero, both for |
Found the bug, it's in the English original, at least when parsing it with If you replace the two occurences of
With all variables empty and just specifying "Confirm an entity is a state" :-) So in case you also use https://github.com/format-message/format-message this needs a fix. |
I have no clue what we use, but what i do know is that this is frontend I believe |
Yes, that's frontend now. Sorry for taking that long detour about that.
can be removed. I filed a frontend bug for that ICU message so someone can take a look and fix that one: Thank you very much for all your help! |
@joostlek Just FYI, after some discussion on Lokalise about the error it flagged for the ICU string we discussed above not being OK:
I filed a new bug on that so we could settle the problem in German: home-assistant/frontend#22566 |
The problem
The two strings
are the only ones of all "Current {entity_name} …" strings that end with "is".
Should be fixed as it triggers inconsistent / misleading translations.
Especially with very long entity names where in German e.g. the "ist" (for "is") has to be added at end of the line:
Use just:
instead, like all other strings for Automation conditions.
What version of Home Assistant Core has the issue?
core-2024.10.2
What was the last working version of Home Assistant Core?
n/a
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: