Add missing language strings for dithering selector

This commit is contained in:
Joshua Ogunyinka 2022-01-03 18:38:33 +04:00 committed by David Capello
parent 974c13dd33
commit dd2efe28d2
2 changed files with 17 additions and 9 deletions

View File

@ -558,6 +558,12 @@ duplicate_view = Duplicate &View
open_with_os = &Open with OS open_with_os = &Open with OS
open_in_folder = Open in &Folder open_in_folder = Open in &Folder
[dithering_selector]
no_dithering = No Dithering
old_dithering = Old Dithering+
ordered_dithering = Ordered Dithering+
floyd_steinberg = Floyd-Steinberg Error Diffusion Dithering
[canvas_size] [canvas_size]
title = Canvas Size title = Canvas Size
size = Size: size = Size:

View File

@ -13,6 +13,7 @@
#include "app/app.h" #include "app/app.h"
#include "app/extensions.h" #include "app/extensions.h"
#include "app/i18n/strings.h"
#include "app/modules/palettes.h" #include "app/modules/palettes.h"
#include "app/ui/skin/skin_theme.h" #include "app/ui/skin/skin_theme.h"
#include "app/util/conversion_to_surface.h" #include "app/util/conversion_to_surface.h"
@ -206,29 +207,30 @@ void DitheringSelector::regenerate()
switch (m_type) { switch (m_type) {
case SelectBoth: case SelectBoth:
addItem(new DitherItem(render::DitheringAlgorithm::None, addItem(new DitherItem(render::DitheringAlgorithm::None,
render::DitheringMatrix(), "No Dithering")); render::DitheringMatrix(),
Strings::dithering_selector_no_dithering()));
for (const auto& it : ditheringMatrices) { for (const auto& it : ditheringMatrices) {
addItem( addItem(new DitherItem(
new DitherItem( render::DitheringAlgorithm::Ordered,
render::DitheringAlgorithm::Ordered, it.matrix(),
it.matrix(), Strings::dithering_selector_ordered_dithering() + it.name()));
"Ordered Dithering+" + it.name()));
} }
for (const auto& it : ditheringMatrices) { for (const auto& it : ditheringMatrices) {
addItem( addItem(
new DitherItem( new DitherItem(
render::DitheringAlgorithm::Old, render::DitheringAlgorithm::Old,
it.matrix(), it.matrix(),
"Old Dithering+" + it.name())); Strings::dithering_selector_old_dithering() + it.name()));
} }
addItem( addItem(
new DitherItem( new DitherItem(
render::DitheringAlgorithm::ErrorDiffusion, render::DitheringAlgorithm::ErrorDiffusion,
render::DitheringMatrix(), render::DitheringMatrix(),
"Floyd-Steinberg Error Diffusion Dithering")); Strings::dithering_selector_floyd_steinberg()));
break; break;
case SelectMatrix: case SelectMatrix:
addItem(new DitherItem(render::DitheringMatrix(), "No Dithering")); addItem(new DitherItem(render::DitheringMatrix(),
Strings::dithering_selector_no_dithering()));
for (auto& it : ditheringMatrices) for (auto& it : ditheringMatrices)
addItem(new DitherItem(it.matrix(), it.name())); addItem(new DitherItem(it.matrix(), it.name()));
break; break;