Internationalize " Copy" string usage

This commit is contained in:
Martín Capello 2025-04-29 17:20:32 -03:00
parent 357c054432
commit 935283e78c
3 changed files with 4 additions and 2 deletions

View File

@ -828,6 +828,7 @@ same_in_all_tools = Same in all Tools
opacity = Opacity:
tolerance = Tolerance:
show_more = Show more...
copy_of = {} Copy
[general_text]
copy = &Copy

View File

@ -90,7 +90,7 @@ void DuplicateSliceCommand::onExecute(Context* context)
doc->notifyBeforeSlicesDuplication();
for (auto* s : selectedSlices) {
Slice* slice = new Slice(*s);
slice->setName(slice->name() + " Copy");
slice->setName(Strings::general_copy_of(slice->name()));
// Offset a bit the duplicated slice to avoid overlapping
offset(slice, 2, 2);

View File

@ -21,6 +21,7 @@
#include "app/doc_api.h"
#include "app/doc_range.h"
#include "app/doc_range_ops.h"
#include "app/i18n/strings.h"
#include "app/modules/gfx.h"
#include "app/modules/gui.h"
#include "app/pref/preferences.h"
@ -827,7 +828,7 @@ void Clipboard::paste(Context* ctx, const bool interactive, const gfx::Point* po
editor->clearSlicesSelection();
for (auto& s : slices) {
Slice* slice = new Slice(s);
slice->setName(slice->name() + " Copy");
slice->setName(Strings::general_copy_of(slice->name()));
tx(new cmd::AddSlice(dstSpr, slice));
editor->selectSlice(slice);
}