mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Add missing language strings in sprite properties & import sprite sheet
This commit is contained in:
parent
6bc0d312d2
commit
974c13dd33
@ -905,6 +905,10 @@ new_version_available = New {0} v{1} available!
|
||||
[import_sprite_sheet]
|
||||
title = Import Sprite Sheet
|
||||
type = Type:
|
||||
type_horz = Horizontal Strip
|
||||
type_vert = Vertical Strip
|
||||
type_rows = By Rows
|
||||
type_cols = By Columns
|
||||
tiles = Tiles:
|
||||
x = X:
|
||||
y = Y:
|
||||
@ -914,6 +918,7 @@ padding = Padding
|
||||
horizontal_padding = Horizontal:
|
||||
vertical_padding = Vertical:
|
||||
partial_tiles = Include partial tiles at bottom/right edges
|
||||
context_bar_help = Select bounds to identify sprite frames
|
||||
import = &Import
|
||||
cancel = &Cancel
|
||||
|
||||
@ -1762,6 +1767,14 @@ double_high = Double-high Pixels (1:2)
|
||||
color_profile = Color Profile:
|
||||
assign_color_profile = Assign
|
||||
convert_color_profile = Convert
|
||||
rgb = RGB
|
||||
grayscale = Grayscale
|
||||
indexed_color = Indexed ({0} colors)
|
||||
unknown = Unknown
|
||||
indexed_image_only = (only for indexed images)
|
||||
assign_color_profile = Assign Color Profile
|
||||
convert_color_profile = Convert Color Profile
|
||||
change_sprite_props = Change Sprite Properties
|
||||
|
||||
[sprite_size]
|
||||
title = Sprite Size
|
||||
|
@ -70,10 +70,10 @@ public:
|
||||
(int)app::SpriteSheetType::Columns == 4,
|
||||
"SpriteSheetType enum changed");
|
||||
|
||||
sheetType()->addItem("Horizontal Strip");
|
||||
sheetType()->addItem("Vertical Strip");
|
||||
sheetType()->addItem("By Rows");
|
||||
sheetType()->addItem("By Columns");
|
||||
sheetType()->addItem(Strings::import_sprite_sheet_type_horz());
|
||||
sheetType()->addItem(Strings::import_sprite_sheet_type_vert());
|
||||
sheetType()->addItem(Strings::import_sprite_sheet_type_rows());
|
||||
sheetType()->addItem(Strings::import_sprite_sheet_type_cols());
|
||||
sheetType()->setSelectedItemIndex((int)app::SpriteSheetType::Rows-1);
|
||||
|
||||
sheetType()->Change.connect([this]{ onSheetTypeChange(); });
|
||||
@ -251,7 +251,7 @@ protected:
|
||||
}
|
||||
|
||||
std::string onGetContextBarHelp() override {
|
||||
return "Select bounds to identify sprite frames";
|
||||
return Strings::import_sprite_sheet_context_bar_help();
|
||||
}
|
||||
|
||||
private:
|
||||
@ -513,7 +513,8 @@ void ImportSpriteSheetCommand::onExecute(Context* context)
|
||||
// The following steps modify the sprite, so we wrap all
|
||||
// operations in a undo-transaction.
|
||||
ContextWriter writer(context);
|
||||
Tx tx(writer.context(), "Import Sprite Sheet", ModifyDocument);
|
||||
Tx tx(
|
||||
writer.context(), Strings::import_sprite_sheet_title(), ModifyDocument);
|
||||
DocApi api = document->getApi(tx);
|
||||
|
||||
// Add the layer in the sprite.
|
||||
|
@ -122,18 +122,18 @@ void SpritePropertiesCommand::onExecute(Context* context)
|
||||
// Update widgets values
|
||||
switch (sprite->pixelFormat()) {
|
||||
case IMAGE_RGB:
|
||||
imgtype_text = "RGB";
|
||||
imgtype_text = Strings::sprite_properties_rgb();
|
||||
break;
|
||||
case IMAGE_GRAYSCALE:
|
||||
imgtype_text = "Grayscale";
|
||||
imgtype_text = Strings::sprite_properties_grayscale();
|
||||
break;
|
||||
case IMAGE_INDEXED:
|
||||
imgtype_text = fmt::format("Indexed ({0} colors)",
|
||||
imgtype_text = fmt::format(Strings::sprite_properties_indexed_color(),
|
||||
sprite->palette(0)->size());
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
imgtype_text = "Unknown";
|
||||
imgtype_text = Strings::sprite_properties_unknown();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -169,7 +169,8 @@ void SpritePropertiesCommand::onExecute(Context* context)
|
||||
LEFT);
|
||||
}
|
||||
else {
|
||||
window.transparentColorPlaceholder()->addChild(new Label("(only for indexed images)"));
|
||||
window.transparentColorPlaceholder()->addChild(
|
||||
new Label(Strings::sprite_properties_indexed_image_only()));
|
||||
}
|
||||
|
||||
// Pixel ratio
|
||||
@ -205,7 +206,7 @@ void SpritePropertiesCommand::onExecute(Context* context)
|
||||
|
||||
ContextWriter writer(context);
|
||||
Sprite* sprite(writer.sprite());
|
||||
Tx tx(writer.context(), "Assign Color Profile");
|
||||
Tx tx(writer.context(), Strings::sprite_properties_assign_color_profile());
|
||||
tx(new cmd::AssignColorProfile(
|
||||
sprite, colorSpaces[selectedColorProfile]->gfxColorSpace()));
|
||||
tx.commit();
|
||||
@ -218,7 +219,7 @@ void SpritePropertiesCommand::onExecute(Context* context)
|
||||
|
||||
ContextWriter writer(context);
|
||||
Sprite* sprite(writer.sprite());
|
||||
Tx tx(writer.context(), "Convert Color Profile");
|
||||
Tx tx(writer.context(), Strings::sprite_properties_convert_color_profile());
|
||||
tx(new cmd::ConvertColorProfile(
|
||||
sprite, colorSpaces[selectedColorProfile]->gfxColorSpace()));
|
||||
tx.commit();
|
||||
@ -248,7 +249,7 @@ void SpritePropertiesCommand::onExecute(Context* context)
|
||||
if (index != sprite->transparentColor() ||
|
||||
pixelRatio != sprite->pixelRatio() ||
|
||||
newUserData != sprite->userData()) {
|
||||
Tx tx(writer.context(), "Change Sprite Properties");
|
||||
Tx tx(writer.context(), Strings::sprite_properties_change_sprite_props());
|
||||
DocApi api = writer.document()->getApi(tx);
|
||||
|
||||
if (index != sprite->transparentColor())
|
||||
|
Loading…
x
Reference in New Issue
Block a user