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

Fix merge of AddonInfo (masterAddonInfo field) #4309

Merged
merged 1 commit into from
Jul 13, 2024

Conversation

lolodomo
Copy link
Contributor

This fix allows having translated label for bindings when showing list of installed bindings in Main UI parameters.

Fix openhab/openhab-webui#2639

Signed-off-by: Laurent Garnier lg.hc@free.fr

This fix allows having translated label for bindings when showing list of installed bindings in Main UI parameters.

Fix openhab/openhab-webui#2639

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@lolodomo lolodomo requested a review from a team as a code owner July 12, 2024 16:19
@lolodomo
Copy link
Contributor Author

Without the fix (look at the third column named "Add-on Settings"), no translation
image

With the fix, labels are properly translated.
image

Comment on lines +109 to +110
if (!a.isMasterAddonInfo() && b.isMasterAddonInfo()) {
builder.isMasterAddonInfo(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it important that a is not masterAddonInfo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to avoid the useless call to builder.isMasterAddonInfo when the builder value is already set to true, and have a similar pattern as the remaining in that method.

But could also be done differently by replacing the full if then block by just:
builder.isMasterAddonInfo(a.isMasterAddonInfo() || b.isMasterAddonInfo()};

@J-N-K J-N-K merged commit 24d1ba0 into openhab:main Jul 13, 2024
5 checks passed
@J-N-K J-N-K added the bug An unexpected problem or unintended behavior of the Core label Jul 13, 2024
@J-N-K J-N-K added this to the 4.3 milestone Jul 13, 2024
@lolodomo lolodomo deleted the fix_merge_addoninfo branch July 13, 2024 13:33
@holgerfriedrich
Copy link
Member

shall we backport this to 4.2.x?

@lolodomo
Copy link
Contributor Author

shall we backport this to 4.2.x?

Would be appreciated.

holgerfriedrich pushed a commit that referenced this pull request Jul 18, 2024
This fix allows having translated label for bindings when showing list of installed bindings in Main UI parameters.

Fix openhab/openhab-webui#2639

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@holgerfriedrich holgerfriedrich added the patch A PR that has been cherry-picked to a patch release branch label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Localized entries for "add-on settings"
3 participants