Add more missing language strings when importing/exporting sprite sheets

This commit is contained in:
Joshua Ogunyinka 2022-01-10 11:53:14 +04:00 committed by David Capello
parent a4bc897f76
commit aaa69a3d81
3 changed files with 11 additions and 4 deletions

View File

@ -770,6 +770,8 @@ cancel = &Cancel
[export_sprite_sheet]
title = Export Sprite Sheet
save_title = Save Sprite Sheet
save_json_title = Save JSON Data
sprite = Sprite
sprite_tooltip = Source of sprite samples to export in the sprite sheet
borders = Borders
@ -975,6 +977,7 @@ horizontal_padding = Horizontal:
vertical_padding = Vertical:
partial_tiles = Include partial tiles at bottom/right edges
context_bar_help = Select bounds to identify sprite frames
layer_name = Sprite Sheet
import = &Import
cancel = &Cancel

View File

@ -854,7 +854,7 @@ private:
void onImageFilename() {
base::paths newFilename;
if (!app::show_file_selector(
"Save Sprite Sheet", m_filename,
Strings::export_sprite_sheet_save_title(), m_filename,
get_writable_extensions(),
FileSelectorType::Save, newFilename))
return;
@ -879,8 +879,11 @@ private:
base::paths exts = { "json" };
base::paths newFilename;
if (!app::show_file_selector(
"Save JSON Data", m_dataFilename, exts,
FileSelectorType::Save, newFilename))
Strings::export_sprite_sheet_save_json_title(),
m_dataFilename,
exts,
FileSelectorType::Save,
newFilename))
return;
ASSERT(!newFilename.empty());

View File

@ -518,7 +518,8 @@ void ImportSpriteSheetCommand::onExecute(Context* context)
DocApi api = document->getApi(tx);
// Add the layer in the sprite.
LayerImage* resultLayer = api.newLayer(sprite->root(), "Sprite Sheet");
LayerImage* resultLayer =
api.newLayer(sprite->root(), Strings::import_sprite_sheet_layer_name());
// Add all frames+cels to the new layer
for (size_t i=0; i<animation.size(); ++i) {