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(ui5-color-palette): add i18n text for default color button's text #8157

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/main/src/ColorPalette.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class="ui5-cp-default-color-button"
design="Transparent"
@click={{_onDefaultColorClick}}
@keydown={{_onDefaultColorKeyDown}}>Default color</ui5-button>
@keydown={{_onDefaultColorKeyDown}}>{{colorPaletteDefaultColorText}}</ui5-button>
<div class="ui5-cp-separator"></div>
</div>
{{/if}}
Expand All @@ -35,7 +35,7 @@
class="ui5-cp-more-colors"
@click="{{_openMoreColorsDialog}}"
@keydown={{_onMoreColorsKeyDown}}
>{{colorPaleteMoreColorsText}}</ui5-button>
>{{colorPaletteMoreColorsText}}</ui5-button>
</div>
{{/if}}

Expand Down
7 changes: 6 additions & 1 deletion packages/main/src/ColorPalette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import type { IColorPaletteItem } from "./Interfaces.js";
import {
COLORPALETTE_CONTAINER_LABEL,
COLOR_PALETTE_MORE_COLORS_TEXT,
COLOR_PALETTE_DEFAULT_COLOR_TEXT,
} from "./generated/i18n/i18n-defaults.js";

// Styles
Expand Down Expand Up @@ -422,10 +423,14 @@ class ColorPalette extends UI5Element {
return ColorPalette.i18nBundle.getText(COLORPALETTE_CONTAINER_LABEL);
}

get colorPaleteMoreColorsText() {
get colorPaletteMoreColorsText() {
return ColorPalette.i18nBundle.getText(COLOR_PALETTE_MORE_COLORS_TEXT);
}

get colorPaletteDefaultColorText() {
return ColorPalette.i18nBundle.getText(COLOR_PALETTE_DEFAULT_COLOR_TEXT);
}

get _showMoreColors() {
return this.showMoreColors && this.moreColorsFeature;
}
Expand Down
5 changes: 4 additions & 1 deletion packages/main/src/i18n/messagebundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ COLOR_PALETTE_DIALOG_OK_BUTTON=OK
#XTIT: Color Palette dialog title of the Color Picker
COLOR_PALETTE_DIALOG_TITLE=Change Color

#XTIT: Color Palette dialog title of the Color Picker
#XTIT: Color Palette dialog button text to open the Color Picker
COLOR_PALETTE_MORE_COLORS_TEXT=More Colors...

#XTIT: Color Palette dialog button text to set the default color
COLOR_PALETTE_DEFAULT_COLOR_TEXT=Default Color

#XACT: Aria information for the ColorPicker Alpha slider
COLORPICKER_ALPHA_SLIDER=Alpha control

Expand Down