Localized Blueprints (translating existing)

Regarding my question here: Localized (translations for) blueprint(s)
I would like to make this “feature request” …

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 :sunglasses:

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.

Any word on this request moving forward? It would be more than great to have these available in multiple languages for widest distribution. Thanks

I haven’t filed an architectural proposal yet, was a bit hoping to see a little more interest from the community before I take a proposal to the core maintainers, as I’m sure they will want to see the same thing.

I didn’t see much response to my first comments. Do you know are there lots of popular blueprints currently in use that have demand for localization? Are developers publishing multiple variants of blueprints per language? Do they want to see all the languages mushed into the same source file? I had a feeling that might make it hard to read if every input was 50 lines long.

As an alternative option, blueprint devs could have a build pipeline that uses a translation file and builds a separate BP for each language, though maybe that’s too much to ask to setup.

I can’t speak for the community at large but my project is tied to Assist voice functions and we have users around the world using our custom sentence blueprints to extend functionality. Here’s some examples (about 20 blueprints):

We have had numerous requests to make these blueprints multilingual and have even had a user create one that is multilingual but it is not easily distributable which, to me, defeats the intent of blueprints in that they should be easy, one click installs.

On that note, I think the only way would be to have the translations built into the blueprint and not stored as a separate file unless a mechanism can be implemented that would allow for the downloading of those language files with the same one click install method.

FYI I did take a look at this, and it appears what user has created actually functionally changes the behavior of the created automation based on language?

I just want to be clear that the only thing I was proposing here is changing the displayed language for the various inputs and descriptions in the blueprint configuration page.

Nothing proposed would assist with localizing any functionality (any input or output sentences) of any created automation, it would only be a visible difference for the admin creating the automation from the blueprint.

As long as we’re on the same page about that, I can go ahead and ask in an architecture discussion about moving forward with that. I’m not sure if that’s sufficient for what you’re asking for.

2 Likes

Apologies. I was misremembering what the user did. This is not a good example at all.

Yes, having the ability to provide multilanguage abilities to the input and description section is really what needs to be addressed and would love to see a solution be targeted to that portion only. Thanks much!

Ok I have asked. We will see if it gets an approval.

2 Likes

Thanks for all your efforts! Much appreciated.