From 674f9ff3b58094cbebdbc15471f0bc4053d33fb3 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 22 Mar 2019 11:10:49 -0300 Subject: [PATCH] Get AutocropSprite strings from i18n file After introducing AutocropSpriteCommand::onGetFriendlyName(), we stop using the automatic commands_AutocropSprite string from en.ini. This commit fix that regression from f24eb75298c118500ff4428661fe186eefdde2b2 --- data/strings/en.ini | 1 + src/app/commands/cmd_crop.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/strings/en.ini b/data/strings/en.ini index 7adfe3e5a..3a20c6c4c 100644 --- a/data/strings/en.ini +++ b/data/strings/en.ini @@ -208,6 +208,7 @@ AddColor_Foreground = Foreground AddColor_Specific = Specific AdvancedMode = Advanced Mode AutocropSprite = Trim Sprite +AutocropSprite_ByGrid = Trim Sprite by Grid BackgroundFromLayer = Background From Layer BrightnessContrast = Adjust Brightness/Contrast Cancel = Cancel Current Operation diff --git a/src/app/commands/cmd_crop.cpp b/src/app/commands/cmd_crop.cpp index 493726570..03a80498f 100644 --- a/src/app/commands/cmd_crop.cpp +++ b/src/app/commands/cmd_crop.cpp @@ -138,9 +138,9 @@ void AutocropSpriteCommand::onExecute(Context* context) std::string AutocropSpriteCommand::onGetFriendlyName() const { if (m_byGrid) - return "Trim Sprite by Grid"; + return Strings::commands_AutocropSprite_ByGrid(); else - return "Trim Sprite"; + return Strings::commands_AutocropSprite(); } Command* CommandFactory::createCropSpriteCommand()