Add missing language strings for the color bar

This commit is contained in:
Joshua Ogunyinka 2022-01-03 12:05:45 +04:00 committed by David Capello
parent 3c815ac1bd
commit 60b5df4030
2 changed files with 31 additions and 17 deletions

View File

@ -249,6 +249,20 @@ remap_tiles_tooltip = Matches old tiles with new tiles
clear_tiles = Clear Tiles clear_tiles = Clear Tiles
resize_tiles = Resize Tiles resize_tiles = Resize Tiles
drag_and_drop_tiles = Drag And Drop Tiles drag_and_drop_tiles = Drag And Drop Tiles
reverse_colors = Reverse Colors
sort_colors = Sort Colors
gradient = Gradient
gradient_by_hue = Gradient by Hue
sort_by_hue = Sort by Hue
sort_by_saturation = Sort by Saturation
sort_by_brightness = Sort by Brightness
sort_by_luminance = Sort by Luminance
sort_by_red = Sort by Red
sort_by_green = Sort by Green
sort_by_blue = Sort by Blue
sort_by_alpha = Sort by Alpha
ascending = Ascending
descending = Descending
[commands] [commands]
About = About About = About

View File

@ -1456,7 +1456,7 @@ void ColorBar::onReverseColors()
} }
Palette newPalette(*get_current_palette(), remap); Palette newPalette(*get_current_palette(), remap);
setPalette(&newPalette, "Reverse Colors"); setPalette(&newPalette, Strings::color_bar_reverse_colors());
} }
void ColorBar::onSortBy(SortPaletteBy channel) void ColorBar::onSortBy(SortPaletteBy channel)
@ -1500,7 +1500,7 @@ void ColorBar::onSortBy(SortPaletteBy channel)
// Create a new palette and apply the remap. This is the final new // Create a new palette and apply the remap. This is the final new
// palette for the sprite. // palette for the sprite.
Palette newPalette(palette, remapOrig); Palette newPalette(palette, remapOrig);
setPalette(&newPalette, "Sort Colors"); setPalette(&newPalette, Strings::color_bar_sort_colors());
} }
void ColorBar::onGradient(GradientType gradientType) void ColorBar::onGradient(GradientType gradientType)
@ -1512,11 +1512,11 @@ void ColorBar::onGradient(GradientType gradientType)
Palette newPalette(*get_current_palette()); Palette newPalette(*get_current_palette());
if (gradientType == GradientType::LINEAR) { if (gradientType == GradientType::LINEAR) {
newPalette.makeGradient(index1, index2); newPalette.makeGradient(index1, index2);
setPalette(&newPalette, "Gradient"); setPalette(&newPalette, Strings::color_bar_gradient());
} }
else { else {
newPalette.makeHueGradient(index1, index2); newPalette.makeHueGradient(index1, index2);
setPalette(&newPalette, "Gradient by Hue"); setPalette(&newPalette, Strings::color_bar_gradient_by_hue());
} }
} }
@ -1919,19 +1919,19 @@ void ColorBar::showPaletteSortOptions()
Menu menu; Menu menu;
MenuItem MenuItem
rev("Reverse Colors"), rev(Strings::color_bar_reverse_colors()),
grd("Gradient"), grd(Strings::color_bar_gradient()),
grh("Gradient by Hue"), grh(Strings::color_bar_gradient_by_hue()),
hue("Sort by Hue"), hue(Strings::color_bar_sort_by_hue()),
sat("Sort by Saturation"), sat(Strings::color_bar_sort_by_saturation()),
bri("Sort by Brightness"), bri(Strings::color_bar_sort_by_brightness()),
lum("Sort by Luminance"), lum(Strings::color_bar_sort_by_luminance()),
red("Sort by Red"), red(Strings::color_bar_sort_by_red()),
grn("Sort by Green"), grn(Strings::color_bar_sort_by_green()),
blu("Sort by Blue"), blu(Strings::color_bar_sort_by_blue()),
alp("Sort by Alpha"), alp(Strings::color_bar_sort_by_alpha()),
asc("Ascending"), asc(Strings::color_bar_ascending()),
des("Descending"); des(Strings::color_bar_descending());
menu.addChild(&rev); menu.addChild(&rev);
menu.addChild(&grd); menu.addChild(&grd);
menu.addChild(&grh); menu.addChild(&grh);