Add missing language strings in sprite size command

This commit is contained in:
Joshua Ogunyinka 2022-01-07 12:29:48 +04:00 committed by David Capello
parent 9105642dbf
commit 05ece3fad1
2 changed files with 8 additions and 4 deletions

View File

@ -1817,6 +1817,9 @@ lock_ratio = Lock Ratio
percentage = Percentage:
interpolation = Interpolation:
method = Method:
method_nearest_neighbor = Nearest-neighbor
method_bilinear = Bilinear
method_rotsprite = RotSprite
[svg_options]
title = SVG Options

View File

@ -17,6 +17,7 @@
#include "app/commands/params.h"
#include "app/doc_api.h"
#include "app/ini_file.h"
#include "app/i18n/strings.h"
#include "app/modules/gui.h"
#include "app/modules/palettes.h"
#include "app/sprite_job.h"
@ -80,7 +81,7 @@ class SpriteSizeJob : public SpriteJob {
public:
SpriteSizeJob(const ContextReader& reader, int new_width, int new_height, ResizeMethod resize_method)
: SpriteJob(reader, "Sprite Size") {
: SpriteJob(reader, Strings::sprite_size_title().c_str()) {
m_new_width = new_width;
m_new_height = new_height;
m_resize_method = resize_method;
@ -263,9 +264,9 @@ public:
doc::algorithm::RESIZE_METHOD_BILINEAR == 1 &&
doc::algorithm::RESIZE_METHOD_ROTSPRITE == 2,
"ResizeMethod enum has changed");
method()->addItem("Nearest-neighbor");
method()->addItem("Bilinear");
method()->addItem("RotSprite");
method()->addItem(Strings::sprite_size_method_nearest_neighbor());
method()->addItem(Strings::sprite_size_method_bilinear());
method()->addItem(Strings::sprite_size_method_rotsprite());
int resize_method;
if (params.method.isSet())
resize_method = (int)params.method();