External integration - LG WebOS

Thanks @mutmut for the feedback, and well spotted :eyes:

A bit of context on the « why » of the English, because it’s not just a translation oversight:

In the integration, the « normal » messages (connection status, action feedback when at least one TV responds, badges per TV) are sent in multi-language format { en, fr, de } → automatically translated according to your language.

The red toast, on the other hand, comes from the fact that the action throws an error — that’s what triggers the red color. And on the external integration SDK side:

- a thrown error (throw) is relayed to Gladys as a simple text string, not as a multi-language object;

- the action handler (onAction) does not receive the user’s language (unlike the widgets onWidgetGet which receive language).

So today a red toast cannot be translated by language like the green messages. The only two current options are:

1. mono-language red toast (fr for the community, but an EN/DE user would see it in fr);

2. localized green toast + we rely on the red « unreachable » badges per TV for severity.

@pierre-gilles would it be possible to add to the SDK the possibility of a localized action error? Two options:

  • accept an object { en, fr, 
 } as an action error message (instead of a simple string), or

  • pass the user’s language to the onAction handler (like for onWidgetGet), with the integration responsible for translating.

In the meantime, I’ll leave 2.2.4 as is (red toast in English) — let me know which approach you prefer.