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