-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Update translations and error messages in Bring! integration #135455
Conversation
Hey there @miaucl, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@NoRi2909 looks good? 👀 |
@tr4nt0r The strings look fine to me, I'd just use uppercase "Item" here as it's the field name: "message": "This action requires field item, please enter a valid value for item" |
@NoRi2909 oh, that's correct like that. Home Assistant uses the field name in error messages (not the label from the translation string). |
Yes, the field key is But as the error string is exposed to Lokalise "item" will be either translated or no longer match the field name the user sees in the UI. And the error message shows up below the action in Dev Tools, too. Thus I think using the English UI name here, meaning uppercase "Item", is the right way to go. |
@NoRi2909 I changed it now to use a placeholder, so that it doesn't get translated. As you can see in the screenshot, this is how it is handled elsewhere, the field name is used, not the friendly name. |
@tr4nt0r OK, that's the best solution! I just look at all this with the eyes of a translator who is (sometimes desperately) searching for hints if we should translate some word or not. Thanks for your quick fixes! Grüße aus Koblenz nach Berlin. :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
Thanks @tr4nt0r 👍
…sistant#135455) * Update translations and error messages * use placeholder for field name * change key for translation string
…sistant#135455) * Update translations and error messages * use placeholder for field name * change key for translation string
Proposed change
Follow-up to #135446
Updated the labels for the notifications so that they are en par with the button labels in the latest version of the Bring! app
Updated missing argument exception to be consistent with other Home Assistant error messages
Change field name from Articles to Items for consistency
Removed backticks and replaced with single quotes were HA doesn't support markdown formatting.
Tests have been updated and a now unnecessary translation placeholder has been removed (changed key to prevent conflicts)
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: