Add i18n for a couple of hardcoded strings

This commit is contained in:
Martín Capello 2025-05-14 10:03:20 -03:00
parent 286dd1c755
commit 9fd1214947
2 changed files with 5 additions and 2 deletions

View File

@ -13,6 +13,7 @@
#include "app/commands/new_params.h"
#include "app/commands/params.h"
#include "app/context_access.h"
#include "app/i18n/strings.h"
#include "app/ini_file.h"
#include "app/ui_context.h"
#include "base/fs.h"
@ -64,7 +65,8 @@ void DuplicateSpriteCommand::onExecute(Context* context)
std::string duplicateFn = params().filename.isSet() ?
params().filename() :
base::get_file_title(fn) + " Copy" + (!ext.empty() ? "." + ext : "");
Strings::general_copy_of(base::get_file_title(fn)) +
(!ext.empty() ? "." + ext : "");
bool flatten = params().flatten.isSet() ? params().flatten() :
get_config_bool("DuplicateSprite", "Flatten", false);

View File

@ -45,6 +45,7 @@
#include "app/context.h"
#include "app/doc.h"
#include "app/doc_undo.h"
#include "app/i18n/strings.h"
#include "app/pref/preferences.h"
#include "app/snap_to_grid.h"
#include "app/transaction.h"
@ -733,7 +734,7 @@ Layer* DocApi::duplicateLayerAfter(Layer* sourceLayer,
ASSERT(parent);
Layer* newLayerPtr = copyLayerWithSprite(sourceLayer, parent->sprite());
newLayerPtr->setName(newLayerPtr->name() + nameSuffix);
newLayerPtr->setName(Strings::general_copy_of(newLayerPtr->name()));
addLayer(parent, newLayerPtr, afterLayer);