Closed lolodomo closed 2 months ago
Isn't this because it's based on factures.xml file instead of binding.xml ?
Why is it tagged as invalid? My screen capture is clear, no? If translation was working, I should see "Extension Astro".
It's more an OHC issue because the REST API currently cannot return localized add-on names. The reason is that all the localization strings in bundles are unavailable until you install the bundle using the feature. :wink: When this is solved in OHC, it should probably work without any changes in the UI.
Yes, the tag is how I move issues that have clearly nothing to do with the UI itself out of my main filter...
More generally a lot of inconsistencies may also have to do with the browser configuration, since the API tends to consider that the Accept-Language
header trumps the org.openhab.i18n
service configuration.
If you have the browser configured like this
Then you'd have many API responses in English even if openHAB is configured in French, because requests have a:
Accept-Language: en-US,en;q=0.9,de;q=0.8,fr-FR;q=0.7,fr;q=0.6
header sent by the browser.
I think I mentioned it before, but I think the Accept-Language
header should be ignored if a language is set server-wide, if not at all (become some other things will not consider it anyways, and rely on the server config only; for instance, the login/authorize/change password screens).
Ok. But in the current case, the bindings are already installed.
It would be a confusing UX when add-on names change whenever you (un)install add-ons. :upside_down_face:
I can just confirm that my browser (Firefox) is setup for French:
I also tried with Chrome and Edge and same result.
It's actually the settings for pages not menus that is important
The add-on store (and the /rest/addons
endpoint) is different and doesn't offer translations in any case.
In Firefox, I see only one place to setup the language.
Note that in another MainUI place (adding new thing), I see correct translations:
This is apparently only in the "bindings" page that I have no translation, certainly for the reason you explained (not supported by the core REST API).
If I use the API Explorer, I got this with the addons API, that is no translation:
Same result if I add "fr-FR" as accept-language header.
Also note that the description is empty.
That UI page probably uses the /rest/bindings
endpoint.
I do not remember if this is was correctly translated before the marketplace stuff was added.
That UI page probably uses the
/rest/bindings
endpoint.
Oh yes, the bindings REST API is working well, you're right. So that means it is possible to return translated label/description in the addons API too ?
Yes but the main issue still is that the /addons endpoint is based on Karaf features and you cannot access translations of bundles that haven't been installed.
So it would help if the add-on/feature metadata (https://github.com/openhab/openhab-core/issues/2058) is aggregated and is available without having to install all add-ons. :slightly_smiling_face:
Yes but the main issue still is that the /addons endpoint is based on Karaf features and you cannot access translations of bundles that haven't been installed.
But for the ones that are already installed ?
Then I agree with @wborn in https://github.com/openhab/openhab-webui/issues/1213#issuecomment-997230256
It would be a confusing UX when add-on names change whenever you (un)install add-ons. :upside_down_face:
Then I agree with @wborn in #1213 (comment)
That is reassuring 🤣
Closed as (partially) resolved.
I would expect the display of "Extension Astro" rather than "Astro Binding" for example in the bindings/marketplace page because "Extension Astro" is the French translation for this binding name.