Due the nature that many people neither understand nor speak English, or having troubles to understand the English texts, I would like to see a posibility to make localized blueprints.
Means that a blueprint should be able publish in several languages.
I am sure that this opportunity will help HomeAssistant to come more popular in countries where English is not the main language
I would consider writing up a proposal for this, but some more feedback from blueprint creators would be useful in gauging the demand.
How are localizations currently handled in the blueprint community, is there a lot of desire for this? Are any major creators currently publishing multiple variants of blueprints, one per language? Or is english just accepted as “good-enough” given that these fields are all admin-facing, and not really non-admin user visible.
Would creators want to take on the responsibility for translating strings into many languages, or would that be a large burden?
I could see maybe altering the schema such that in fields like name, description (for blueprint and inputs) we could instead of having a string, have a dict of strings, one per language.
We could then either use the backend language to modify the content being sent to the frontend, or we could ship all languages to the frontend, and use the profile language to pick the string to display. Not sure which would be better.
blueprint:
name:
en: Zone Notification
de: Zonenbenachrichtigung
es: Notificación de zona
description:
en: Send a notification to a device when a person leaves a specific zone.
de: Senden Sie eine Benachrichtigung an ein Gerät, wenn eine Person eine bestimmte Zone verlässt.
es: Envía una notificación a un dispositivo cuando una persona abandona una zona específica.
Thank you for recognizing the utility in this. Blueprints are an easy to distribute way to provide basic to powerful automations to those who either are not capable of writing them or lack the time to do it.
My project relies heavily on custom sentence blueprints as a means of extending voice capabilities. Currently, these blueprints are written in a way that allows users to change things like the intent/command as well as some other things. Adding all of these as input options does make things more difficult and makes the blueprint setup challenging for the user. The inability to control how the input name and description are presented make this even harder for speakers who do not understand the language the blueprint author is using.
I think what you are suggesting above would work. Perhaps an approach similar to the trigger_variables definitions would allow for the configuration of these values. By including all translations within the blueprint would allow for additional languages to be added and avoid the need to make separate versions of the blueprint. As you know, this would make it much more difficult to update as an update to one would mean updating all.
The blueprint creators would be responsible for the translations. I would guess that many of these creators have their blueprints hosted on Github and would gladly accept pull requests with translations. I know that I have folks eager to do this with my blueprints.
Home Assistant could handle the currently logged in user’s language definition to be used to determine which language should be shown and no match would default to whatever the default blueprint values are the first option in the translation dictionary. I’m assuming that the old format would continue to be used and this translation option would be supplemental? Having a pulldown or something that indicate which languages are available for the blueprint could also be nice but that may be difficult?
All other translations can be handled in the normal variables section by using a similar dictionary style shown above. This is something that can be done today but the input section translations are not.
Hopefully I’ve hit on all the topics you mentioned but please ask if I can provide any additional detail. I am hopeful that my views are in line with other’s views. Thanks again for starting this dialog. This small change could broaden the reach of the Home Assistant blueprints.