Skip to content

Commit

Permalink
[BasicUI] Replace OK by CLOSE in the 2 color pop-ups (openhab#2895)
Browse files Browse the repository at this point in the history
Also make the button label translatable.

Signed-off-by: Laurent Garnier <[email protected]>
  • Loading branch information
lolodomo authored Dec 7, 2024
1 parent d6cc341 commit 7d80bbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bundles/org.openhab.ui.basic/snippets-src/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<input class="colorpicker__brightness" type="range" min="0" max="100" tabindex="0"/>
</div>
<div class="colorpicker__buttons">
<button class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">OK</button>
<button class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">%popup.button.close%</button>
</div>
</div>
</script>
Expand All @@ -59,7 +59,7 @@
<input class="colortemppicker__input" type="range" min="1000" max="10000" tabindex="0"/>
</div>
<div class="colortemppicker__buttons">
<button class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">OK</button>
<button class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">%popup.button.close%</button>
</div>
</div>
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public StringBuilder processPage(String id, String sitemap, String label, EList<
snippet = snippet.replaceAll("%main.offline-msg%", localizeText("@text/main.offline-msg"));
snippet = snippet.replaceAll("%main.long-polling-mode-msg%", localizeText("@text/main.long-polling-mode-msg"));
snippet = snippet.replaceAll("%id%", id);
snippet = snippet.replaceAll("%popup.button.close%", localizeText("@text/popup.button.close"));

// if the label contains a value span, we remove this span as
// the title of a page/layer cannot deal with this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ sitemaps-list.available-sitemaps = Available sitemaps
# preferences

preferences.title = Preferences

# pop-up

popup.button.close = Close

0 comments on commit 7d80bbe

Please sign in to comment.