-
Notifications
You must be signed in to change notification settings - Fork 779
PaperUI: translations of "description" is ignored #2589
Comments
Did you set the locale of your runtime or the locale of the Paper UI (in Preferences menu)? |
I have some additional information from some tests with the REST API. IF I execute this request with "Accept-Language" set to "de"
I get the correct german description for the binding. If I set "Accept-Language" to "de_DE" or if I leave it empty the english text is returned. |
Thanks for the analysis. So it is clearly not an issue of the Paper UI, but rather a bug on the server side / REST API. |
It seems so, but I not absolutely sure yet. Maybe it is combination of Paper/Basic UI and server side. In my test I create an own REST request. |
@kaikreuzer I have executed some more tests and to me it looks like there is a either problem with the language string passed to methods implementing the REST API or the method that tries to parse the language is implemented too simple. In my test environment I used a fresh openHAB installation (Build 644), no explicit locale was set and language in preferences was set to "German" (same as the browser language). I have debugged method Test 1: REST request with explicit "Accept-Language: de" ()
The parameter Test 2: REST request without "Accept-Language"
Now parameter To me this does not look like a valid locale. Test 3: I opened URL http://127.0.0.1:8080/ui/index.html#/configuration/bindings Test 4: Set locale to de_DE and performed "Test 3" again Test 5: Similar to Test 2 but with a browser that uses english as language Test 6: English browser with preference language set to "German" and then I openend URL http://127.0.0.1:8080/ui/index.html#/configuration/bindings This explains why locales other then english do not work correct. Either the content of the language string passed to server is wrong or method Another result of my test is that the language setting under "Preferences" seems not to work because always the browser language is used. Before performing further tests and fixing the other issues related to locales I think this problem needs to be solved. |
I have created a PR (#2699) that solves this problem that is caused by the wrong interpretation of the Accept-Language HTTP header. But the language handling in Paper UI in general seems not to work correct (e.g. the preferences settings seems to be ignored). I will do some further testing and create a new issue for that. |
I have set the language and locale to "German" resp. "de_DE". The PaperUi shows the translated names of the things but the "...description" entries in the properties file are ignored.
This is an example from the Yahoo Weather binding:

The text was updated successfully, but these errors were encountered: