Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openhab 4 translation fallback in main Ui #2006

Closed
chr1s692 opened this issue Aug 6, 2023 · 3 comments · Fixed by #2029 or #2066
Closed

Openhab 4 translation fallback in main Ui #2006

chr1s692 opened this issue Aug 6, 2023 · 3 comments · Fixed by #2029 or #2066
Assignees
Labels
bug Something isn't working main ui Main UI

Comments

@chr1s692
Copy link

chr1s692 commented Aug 6, 2023

The problem

Hello everyone,
I successfully migrate to Openhab 4 (from 3.4 / docker Version) and everything seems to work fine :).
The only thing I recognize is that the translation in the main UI sometimes switches between german and english (seems that it fallback to english).
Going to the setting menu and open the regional settings and saving it without changing anything, changes the language back to german. After some hours or days it switches back to english.
The “problem” occurs in the tab “Geräte” or “Eigenschaften” as you can see in the screenshot
image

Expected behavior

The tab “Geräte” or “Eigenschaften” is translated and don't fallback after some time to english.

Steps to reproduce

I don't really know, in my case it happens after some time.

Your environment

openhab 4.0.1 // docker version

Browser console

Browser network traffic

Additional information

@chr1s692 chr1s692 added bug Something isn't working main ui Main UI labels Aug 6, 2023
@lolodomo
Copy link
Contributor

lolodomo commented Aug 8, 2023

That could be the sign that the REST API is sometimes called without the proper language parameter. Just a hint.

@florian-h05
Copy link
Contributor

AFAIK, the REST API decides which language to return based on the Accept-Language header that is added by the browser.

@ghys ghys closed this as completed in #2029 Sep 1, 2023
ghys pushed a commit that referenced this issue Sep 1, 2023
Fixes #2006.
Probably fixes the issue described in
#1986 (comment).

Reported on the community:
https://community.openhab.org/t/openhab-4-0-release-discussion/147957/86.

Sometimes, the equipment and property cards did not use the
translations.
I found out, that in some cases the equipment and property pages (Main
UI in general) initialized before the translations loaded, this
hopefully solves it.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05
Copy link
Contributor

florian-h05 commented Sep 4, 2023

With #2054, this issue is expected to appear again, therefore reopening.

@florian-h05 florian-h05 reopened this Sep 4, 2023
@florian-h05 florian-h05 self-assigned this Sep 4, 2023
ghys pushed a commit that referenced this issue Sep 16, 2023
Fixes #2006.

With the attempt in #2029 failing due to #2054, this finally fixes an
issue where the semantic model pages (Equipment, Properties) were
missing translations.
This was due to a race condition, where the semantic model pages were
built before the tags were loaded.

This PR fixes this by watching for semantic model updates (i.e.
subscripting to the underlying Vuex mutation) and loading/building the
model pages after such an update.

Futher improvements:
- Initial loading of semantic tags is put in parallel with other API
requests performed on app init.
- Vuex semantics: A mutation is used for setting the semantic tags from
the action.
- Debug logging is added to both the semantic tag and the semantic model
page loading.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
florian-h05 added a commit that referenced this issue Sep 18, 2023
Fixes #2006.
Probably fixes the issue described in
#1986 (comment).

Reported on the community:
https://community.openhab.org/t/openhab-4-0-release-discussion/147957/86.

Sometimes, the equipment and property cards did not use the
translations.
I found out, that in some cases the equipment and property pages (Main
UI in general) initialized before the translations loaded, this
hopefully solves it.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
(cherry picked from commit 1dcbaeb)
florian-h05 added a commit that referenced this issue Sep 18, 2023
Fixes #2006.

With the attempt in #2029 failing due to #2054, this finally fixes an
issue where the semantic model pages (Equipment, Properties) were
missing translations.
This was due to a race condition, where the semantic model pages were
built before the tags were loaded.

This PR fixes this by watching for semantic model updates (i.e.
subscripting to the underlying Vuex mutation) and loading/building the
model pages after such an update.

Futher improvements:
- Initial loading of semantic tags is put in parallel with other API
requests performed on app init.
- Vuex semantics: A mutation is used for setting the semantic tags from
the action.
- Debug logging is added to both the semantic tag and the semantic model
page loading.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
(cherry picked from commit f2c008b)
stefan-hoehn pushed a commit to stefan-hoehn/openhab-webui that referenced this issue Sep 23, 2023
Fixes openhab#2006.
Probably fixes the issue described in
openhab#1986 (comment).

Reported on the community:
https://community.openhab.org/t/openhab-4-0-release-discussion/147957/86.

Sometimes, the equipment and property cards did not use the
translations.
I found out, that in some cases the equipment and property pages (Main
UI in general) initialized before the translations loaded, this
hopefully solves it.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
stefan-hoehn pushed a commit to stefan-hoehn/openhab-webui that referenced this issue Sep 23, 2023
…2066)

Fixes openhab#2006.

With the attempt in openhab#2029 failing due to openhab#2054, this finally fixes an
issue where the semantic model pages (Equipment, Properties) were
missing translations.
This was due to a race condition, where the semantic model pages were
built before the tags were loaded.

This PR fixes this by watching for semantic model updates (i.e.
subscripting to the underlying Vuex mutation) and loading/building the
model pages after such an update.

Futher improvements:
- Initial loading of semantic tags is put in parallel with other API
requests performed on app init.
- Vuex semantics: A mutation is used for setting the semantic tags from
the action.
- Debug logging is added to both the semantic tag and the semantic model
page loading.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
JustinGeorgi pushed a commit to JustinGeorgi/openhab-webui that referenced this issue Sep 24, 2023
…2066)

Fixes openhab#2006.

With the attempt in openhab#2029 failing due to openhab#2054, this finally fixes an
issue where the semantic model pages (Equipment, Properties) were
missing translations.
This was due to a race condition, where the semantic model pages were
built before the tags were loaded.

This PR fixes this by watching for semantic model updates (i.e.
subscripting to the underlying Vuex mutation) and loading/building the
model pages after such an update.

Futher improvements:
- Initial loading of semantic tags is put in parallel with other API
requests performed on app init.
- Vuex semantics: A mutation is used for setting the semantic tags from
the action.
- Debug logging is added to both the semantic tag and the semantic model
page loading.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
JustinGeorgi pushed a commit to JustinGeorgi/openhab-webui that referenced this issue Sep 24, 2023
…2066)

Fixes openhab#2006.

With the attempt in openhab#2029 failing due to openhab#2054, this finally fixes an
issue where the semantic model pages (Equipment, Properties) were
missing translations.
This was due to a race condition, where the semantic model pages were
built before the tags were loaded.

This PR fixes this by watching for semantic model updates (i.e.
subscripting to the underlying Vuex mutation) and loading/building the
model pages after such an update.

Futher improvements:
- Initial loading of semantic tags is put in parallel with other API
requests performed on app init.
- Vuex semantics: A mutation is used for setting the semantic tags from
the action.
- Debug logging is added to both the semantic tag and the semantic model
page loading.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
digitaldan pushed a commit to digitaldan/openhab-webui that referenced this issue Sep 24, 2023
…2066)

Fixes openhab#2006.

With the attempt in openhab#2029 failing due to openhab#2054, this finally fixes an
issue where the semantic model pages (Equipment, Properties) were
missing translations.
This was due to a race condition, where the semantic model pages were
built before the tags were loaded.

This PR fixes this by watching for semantic model updates (i.e.
subscripting to the underlying Vuex mutation) and loading/building the
model pages after such an update.

Futher improvements:
- Initial loading of semantic tags is put in parallel with other API
requests performed on app init.
- Vuex semantics: A mutation is used for setting the semantic tags from
the action.
- Debug logging is added to both the semantic tag and the semantic model
page loading.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
florian-h05 added a commit to wuschi/openhab-webui that referenced this issue Aug 12, 2024
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
3 participants