Closed MartinHjelmare closed 3 years ago
I believe the insteon
component is good since my last PR. I just had a look at it and I don't see any strings I would further adjust. All but a few use standard references.
I checked that box now.
dsmr
and rfxtrx
are also good in dev branch, the latter I'll double check in the options branch
I think the accuweather
integration uses all available references.
Also dunehd
is OK.
The met integration should replace name_exists
with already_configured
.
Just to get correct indications :
unable_to_connect
that could become the reference cannot_connect
should we change it to reference key name and update tests + config_flow.py
?[%key:common::config_flow::error::cannot_connect%] to the XYZ device, please check the logs
=> would become "Failed to connect to the XYZ device, please check the logs"Note that we don't change user input data keys unless it's clearly completely safe. Usually this is not safe to do since those keys are used in the config entry data.
Canary is OK : https://github.com/home-assistant/core/blob/dev/homeassistant/components/canary/strings.json control4 is OK : https://github.com/home-assistant/core/blob/dev/homeassistant/components/control4/strings.json dexcom is OK : https://github.com/home-assistant/core/blob/dev/homeassistant/components/dexcom/strings.json dialogflow is OK : https://github.com/home-assistant/core/blob/dev/homeassistant/components/dialogflow/strings.json eafm is OK : https://github.com/home-assistant/core/blob/dev/homeassistant/components/eafm/strings.json
Time for a break !
dexcom
should rename these keys to the standard names:
https://github.com/home-assistant/core/blob/bba0bb1badcd80c52d640d5576314bddca7ae6a8/homeassistant/components/dexcom/strings.json#L15-L16
Does it make sense to keep partial strings?!? How will it work for translations?
For example on PR #41057 we have
"[%key:common::config_flow::abort::already_configured_service%] for this country."
In English it would become "Service is already configured for this country." But in French would it become "Service déjà configuré for this country."?
Each language will get it's own translation. But yes, since the grammar is different between languages the composition of a reference and additional text might not work well.
So, is it encouraged as part of this Hacktoberfest? Or is it discouraged? Personnally I prefer to have a full string in French, or a full string in English, but not a dodgy mix. And I prefer a good English string, than a grammatically wrong French string.
If we stick to English and French examples :
Works good, but i can't guarantee in other languages...for sure !
So...
Yeelight is already good.
If we update a key in the strings.json
, should we also update that key in all translation files?
It seems like they won't be loaded anymore if the key's don't match.
No, don't touch the translation files. They will be updated by our infrastructure, or manually by an admin change.
monoprice and somfy are done
Somfy should update missing configuration key to: https://github.com/home-assistant/core/blob/ed867955f4ca76ed027765a22237bd762758f730/homeassistant/strings.json#L57
Ok, that was missed in #40594. Will add them in a new PR
tradfri
, xiaomi_miio
, xiaomi_aqara
, tesla
, toon
, pi_hole
, mailgun
, sentry
are all good
No, only mail gun and sentry are completely good with the available common references.
somfy and home connect should be fine now
What do we do if we find /components/xxxx/strings.json entries that aren't used anywhere? Should we delete them? If so I assume in a separate PR.
Yes, please clean up if you find orphan strings. Note that we have helpers that abort and need corresponding strings in each integration, eg self._abort_if_unique_id_configured
needs already_configured
.
tuya is fine
nightscout is OK : https://github.com/home-assistant/core/blob/dev/homeassistant/components/nightscout/strings.json plum_lightpad is OK : https://github.com/home-assistant/core/blob/dev/homeassistant/components/plum_lightpad/strings.json poolsense is OK : https://github.com/home-assistant/core/blob/dev/homeassistant/components/poolsense/strings.json progettihwsw is OK : https://github.com/home-assistant/core/blob/dev/homeassistant/components/progettihwsw/strings.json
Tuya should replace the keys auth_failed
and conn_error
with invalid_auth
and cannot_connect
.
Gpslogger is OK: https://github.com/home-assistant/core/blob/dev/homeassistant/components/gpslogger/strings.json
Griddy can reuse already_configured
but is marked as done. Can I take it? https://github.com/home-assistant/core/blob/dev/homeassistant/components/griddy/strings.json
Gpslogger is OK: https://github.com/home-assistant/core/blob/dev/homeassistant/components/gpslogger/strings.json Griddy can reuse
already_configured
but is marked as done. Can I take it? https://github.com/home-assistant/core/blob/dev/homeassistant/components/griddy/strings.json
Griddy was done from me, and i thought that the generic error message doesn't fit with the explicit message set in the strings.json That is just a personnal feeling.
SmartHab should already be good as well.
Alarmdecoder looks good : https://github.com/home-assistant/core/blob/dev/homeassistant/components/alarmdecoder/strings.json hlk_sw16 looks good : https://github.com/home-assistant/core/blob/dev/homeassistant/components/hlk_sw16/strings.json Kodi looks good : https://github.com/home-assistant/core/blob/dev/homeassistant/components/kodi/strings.json mobile is fine : https://github.com/home-assistant/core/blob/dev/homeassistant/components/mobile_app/strings.json
guardian looks good https://github.com/home-assistant/core/blob/dev/homeassistant/components/guardian/strings.json spider looks good https://github.com/home-assistant/core/blob/dev/homeassistant/components/spider/strings.json nzbget looks good https://github.com/home-assistant/core/blob/dev/homeassistant/components/nzbget/strings.json
We should replace the wrong_login
key with invalid_auth
for smarthab.
We should replace the service_unavailable
key with cannot_connect
for alarmdecoder.
Tomorrow evening I should have enough time to make a full pass on all. Maybe not open PR for all but at least give a full status 👍
speedtestdotnet
can now also receive the checkmark, since related PR #41139 has been merged.
Ambiclimate
, Dexcom
, Rfxtrx
, sharkiq
, Smappee
, VIZIO
, Withings
Use"already_configured_account":
or "already_configured_device":
the rest (132(144) intergrations) use "already_configured":
Should "already_configured_account":
and "already_configured_device":
be replaced by "already_configured":
in these intergrations?
Yes, please.
Tomorrow evening I should have enough time to make a full pass on all. Maybe not open PR for all but at least give a full status 👍
Ehh I did not found the time to to this and I think with the complications I have right now in personal life I won't be able to make a full pass before a while. Sorry, I won't be able to help more on the topic, good job until now from all pple around here :) I know it will be done great :)
Thanks @SNoof85! Great job!
@MartinHjelmare looks like zerproc has nothing to change.
If any reviewers are free please have a look at the open pulls related to this issue, so we can check more items in the list😁
@MartinHjelmare you can update the checkbox for xiaomi_miio
Should we replace the name key too in the data section for xiamoi_miio? https://github.com/home-assistant/core/blob/0f1011ba3f5b2f9b75d8dbcd52b012bcd1e4143c/homeassistant/strings.json#L29
Flo, Geofency, Emulated_roku, Wled, Enocean, Gogogate2, ifttt, wolflink looks already done https://github.com/home-assistant/core/blob/dev/homeassistant/components/flo/strings.json
https://github.com/home-assistant/core/blob/dev/homeassistant/components/shelly/strings.json only contains references to common strings. This one can be marked as done.
The problem
strings.json
files that represent integration config flow translations.strings.json
file. Replace as many strings as possible with references according to our docs. Make sure to also replace the error and abort string keys in theconfig_flow.py
module of the integration, but not the user input data keys. Finally update tests intest_config_flow.py
for the integration. Open a PR with the changes for the integration.Integrations
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information