Thanks @mutmut for the feedback, and well spotted ![]()
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
onActionhandler (like foronWidgetGet), 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.