Merge branch 'i18n' into master

This commit is contained in:
David Capello 2017-01-30 16:25:46 -03:00
commit dd381131c7
58 changed files with 1543 additions and 509 deletions

View File

@ -93,6 +93,7 @@
<global>
<section id="general">
<option id="language" type="std::string" default="&quot;en&quot;" />
<option id="screen_scale" type="int" default="0" />
<option id="ui_scale" type="int" default="1" migrate="experimental.ui_scale" />
<option id="gpu_acceleration" type="bool" default="false" />

535
data/strings/en.ini Normal file
View File

@ -0,0 +1,535 @@
# Aseprite
# Copyright (C) 2016-2017 by David Capello
[advanced_mode]
title = Warning - Important
description = You are going to enter in "Advanced Mode".
dont_show_again = Don't show this again
[brush_slot_params]
brush = Brush:
brush_type = Type
brush_size = Size
brush_angle = Angle
color = Color:
foreground = Foreground
background = Background
image_color = Image Color
ink = Ink:
ink_type = Type
ink_opacity = Opacity
extras = Extras:
shade = Shade
pixel_perfect = Pixel-Perfect
[canvas_size]
title = Canvas Size
size = Size:
width = Width:
height = Height:
borders = Borders:
left = Left:
left_tooltip = <<<END
Columns to be added/removed in the left side.
Use a negative number to remove columns.
END
top = Top:
top_tooltip = <<<END
Rows to be added/removed in the top side.
Use a negative number to remove rows
END
right = Right:
right_tooltip = <<<END
Columns to be added/removed in the right side.
Use a negative number to remove columns.
END
bottom = Bottom:
bottom_tooltip = <<<END
Rows to be added/removed in the bottom side.
Use a negative number to remove rows.
END
[cel_properties]
title = Cel Properties
opacity = Opacity:
user_data_tooltip = User Data
[color_curve_point]
title = Point Properties
x = X:
y = Y:
ok = &OK
cancel = &Cancel
delete = &Delete
[convolution_matrix]
reload_stock = &Reload Stock
[despeckle]
width = Width:
height = Height:
[duplicate_sprite]
title = Duplicate Sprite
duplicate = Duplicate:
as = As:
merged_layers = Duplicate merged layers only
[export_sprite_sheet]
title = Export Sprite Sheet
sheet_type = Sheet Type:
columns = # of Columns:
rows = # of Rows:
padding = Padding
border = Border:
shape = Shape:
inner = Inner:
width = Width:
height = Height:
best_fit = Best fit for texture
layers = Layers:
frames = Frames:
output_file = Output File
json_data = JSON Data
json_data_hash = Hash
json_data_array = Array
meta = Meta:
meta_layers = Layers
meta_frame_tags = Frame Tags
open_sprite_sheet = Open generated sprite sheet
export = &Export
cancel = &Cancel
[file_selector]
go_back_button_tooltip = Go back one folder
go_forward_button_tooltip = Go forward one folder
go_up_button_tooltip = Up to parent folder
new_folder_button_tooltip = New folder
file_name = File name:
file_type = File type:
resize = Resize:
layeres = Layers:
frames = Frames:
[file_selector_extras]
resize = Resize:
layers = Layers:
frames = Frames:
pixel_ratio = Apply pixel ratio
[font_popup]
available_fonts = Available Fonts:
load = Load
[frame_properties]
title = Frame Properties
frame_number = Frame number:
duration = Duration (milliseconds):
[frame_tag_properties]
title = Frame Tag Properties
name = Name:
from = From:
to = To:
color = Color:
ani_dir = Animation Direction:
[general]
ok = &OK
close = &Close
yes = &Yes
no = &No
cancel = &Cancel
user_data = User Data
[gif_options]
title = GIF Options
general_options = General Options:
interlaced = &Interlaced
animation_loop = Animation &Loop
ok = &OK
cancel = &Cancel
[goto_frame]
title = Go to Frame
frame_number = Frame number:
[grid_settings]
title = Grid Settings
x = X:
y = Y:
width = Width:
height = Height:
[home_view]
recover = Recover Lost Sprites
new_file = New File...
open_file = Open File...
recent_files = Recent files:
recent_folders = Recent folders:
news = News:
[import_sprite_sheet]
title = Import Sprite Sheet
select_file = Select File
type = Type:
x = X:
y = Y:
width = Width:
height = Height:
partial_tiles = Include partial tiles at bottom/right edges
import = &Import
cancel = &Cancel
[jpeg_options]
title = JPEG Options
quality = Quality:
[keyboard_shortcuts]
title = Keyboard Shortcuts
import = &Import
export = &Export
reset = &Reset
ok = &OK
cancel = &Cancel
[layer_properties]
title = Layer Properties
name = Name:
mode = Mode:
opacity = Opacity:
[modify_selection]
title = Modify Selection
circle = Circle Brush
square = Square Brush
[new_folder]
title = New Folder
folder_name = Folder Name:
default_new_folder_name = New Folder
[new_layer]
title = New Layer
name = Name:
default_new_layer_name = New Layer
[new_sprite]
title = New Sprite
size = Size:
width = Width:
height = Height:
color_mode = Color Mode:
rgba = &RGBA
grayscale = &Grayscale
indexed = &Indexed
rgba_tooltip = <<<END
Each pixel has Red, Green, Blue, and Alpha components
(32 bits per pixel)
END
grayscale_tooltip = <<<END
Each pixel has a Gray value and Alpha
(16 bits per pixel)
END
indexed_tooltip = <<<END
Each pixel is a reference to the palette
(8 bits per pixel)
END
background = Background:
transparent = &Transparent
white = &White
black = &Black
advanced_options = Advanced Options
pixel_ratio = Pixel Ratio:
square_pixels = Square Pixels (1:1)
double_wide = Double-wide Pixels (2:1)
double_high = Double-high Pixels (1:2)
[open_sequence]
title = Notice
description = Do you want to load the following files as an animation?
repeat = Do the same for other files
agree = &Agree
skip = &Skip
[options]
title = Preferences
section_general = General
section_editor = Editor
section_timeline = Timeline
section_cursors = Cursors
section_background = Background
section_grid = Grid
section_undo = Undo
section_theme = Theme
section_experimental = Experimental
general = General
screen_scaling = Screen Scaling:
ui_scaling = UI Elements Scaling:
gpu_acceleration = GPU acceleration
gpu_acceleration_tooltip = Check this option to enable hardware acceleration
show_home = Show Home tab when Aseprite is started
expand_menu_bar_items_on_mouseover = Expand menu bar items on mouseover
expand_menu_bar_items_on_mouseover_tooltip = <<<END
Check this option to get
this old menus behavior.
END
auto_save_recovery_data = Automatically save recovery data every
auto_save_recovery_data_tooltip = <<<END
With this option you can recover your documents
if the program finalizes unexpectedly.
END
10_seconds = 10 Seconds
30_seconds = 30 Seconds
1_minute = 1 Minute
2_minutes = 2 Minutes
5_minutes = 5 Minutes
10_minutes = 10 Minutes
15_minutes = 15 Minutes
30_minutes = 30 Minutes
show_full_path = Show full file name path
show_full_path_tooltip = <<<END
Uncheck this option if you would prefer to hide
full path on UI (e.g. useful for live streaming)
END
locate_file = Locate Configuration File
locate_crash_folder = Locate Crash Folder
wheel_zoom = Zoom with scroll wheel
slide_zoom = Zoom sliding two fingers up or down
zoom_from_center_with_wheel = Zoom from center with scroll wheel
zoom_from_center_with_keys = Zoom from center with keys
show_scrollbars = Show scroll-bars in sprite editor
show_scrollbars_tooltip = Show scroll-bars in all sprite editors.
auto_scroll = Auto-scroll on editor edges
right_click = Right-click:
editor_selection = Selection
auto_opaque = Adjust opaque/transparent mode automatically
auto_opaque_tooltip = <<<END
Depending on the layer (background/transparent),
the pasted selection will be adjusted
automatically (opaque/transparent)
END
keep_selection_after_clear = Keep selection after "Edit > Clear" command
keep_selection_after_clear_tooltip = <<END
Check this if you want to keep the selection
after deleting it.
END
autotimeline = Show timeline automatically
autotimeline_tooltip = <<<END
Show the timeline automatically
when a new frame or layer is added.
END
rewind_on_stop = Rewind on Stop
rewind_on_stop_tooltip = <<<END
The 'Stop' button should rewind the animation
where it was started.
END
default_first_frame = Default First Frame:
ui_mouse_cursor = UI Mouse Cursor
native_cursor = Use native mouse cursors
cursor_scale_label = Mouse Cursor Scale:
painting_cursors = Painting Cursors
crosshair_type = Crosshair Type:
simple_crosshair = Simple Crosshair
crosshair_on_sprite = Crosshair on Sprite
brush_preview = Brush Preview:
brush_preview_none = None
brush_preview_edges = Brush Edges
brush_preview_full = Full Real-time Brush Preview
cursor_color_type = Crosshair & Brush Edges Color:
cursor_neg_bw = Negative Black and White
cursor_specific_color = Specific Color
bg_checked = Checked Background
bg_size = Size:
bg_apply_zoom = Apply Zoom
bg_colors = Colors:
reset_bg = Reset
grid_visible = Visible Grid
grid_x = X:
grid_y = Y:
grid_width = Width:
grid_height = Height:
grid_color = Color:
grid_opacity = Opacity:
grid_auto = Auto
grid_pixel_grid_visible = Visible Pixel Grid
grid_pixel_grid_color = Color:
grid_pixel_grid_opacity = Opacity:
reset_grid = Reset
undo = Undo
undo_size_limit = Undo Limit:
undo_size_limit_tooltip = <<<END
Limit of memory to be used
for undo information per sprite.
Specified in megabytes.
END
undo_mb = MB
undo_goto_modified = Go to modified frame/layer
undo_goto_modified_tooltip = <<<END
When it's enabled each time you undo/redo
the current frame & layer will be modified
to focus the undid/redid change.
END
undo_allow_nonlinear_history = Allow non-linear history
available_themes = Available Themes
select_theme = &Select
open_theme_folder = Open &Folder
user_interface = User Interface
native_file_dialog = Use native file dialog
flash_selected_layer = Flash layer when it is selected
non_active_layer_opacity = Opacity for non-active layers:
ok = &OK
apply = &Apply
cancel = &Cancel
[palette_from_sprite]
title = Palette from Sprite
new_palette = Create a new palette with a specific number of colors (or less):
replace_palette = Replace current palette
replace_range = Replace current range
alpha_channel = Create entries with alpha component
[palette_popup]
title = Available Palettes:
load = &Load
open_folder = Open &Folder
[palette_size]
title = Palette Size
number_of_colors = Number of colors:
[paste_text]
title = Insert Text
text = Text:
font_size = Font Size:
font = Font:
select_font = Select Font
color = Color:
antialias = Anti-aliasing filter
antialias_tooltip = Smooth font edges
[replace_color]
from = From:
to = To:
tolerance = Tolerance:
[select_accelerator]
title = Keyboard Shortcut
key = Key:
clear = Clear
modifiers = Modifiers:
ctrl = Ctrl
cmd = Cmd
alt = Alt
shift = Shift
space = Space
win = Win
assigned_to = Assigned to:
ok = OK
cancel = Cancel
[send_crash]
title = Crash Report
send_file = Please send the following file:
to_email = To this email:
explaining = Explaining what you was doing when the program crashed.
using_dev_ver = You are using a development version.
open_dmp_file = Open the following file to debug your compilation:
do_it_later = Do it later
delete_file = Delete file, I've already sent it
[sprite_properties]
title = Sprite Properties
filename = File name:
type = Type:
size = Size:
frames = Frames:
advanced = Advanced
transparent_color = Transparent Color:
transparent_color_tooltip = <<<END
Palette entry used as
transparent color in each
layer (only for indexed images).
END
pixel_ratio = Pixel Ratio:
square_pixels = Square Pixels (1:1)
double_wide = Double-wide Pixels (2:1)
double_high = Double-high Pixels (1:2)
[sprite_size]
title = Sprite Size
pixels = Pixels:
width = Width:
width_px_tooltip = New width for the sprite (in pixels)
width_perc_tooltip = <<<END
New width for the sprite
Percentage of current width.
END
height = Height:
height_px_tooltip = New height for the sprite (in pixels)
height_perc_tooltip = <<<END
New height for the sprite
Percentage of current height.
END
lock_ratio = Lock Ratio
percentage = Percentage:
interpolation = Interpolation:
method = Method:
[timeline_conf]
position = Position:
left = &Left
right = &Right
bottom = &Bottom
frame_header = Frame Header:
first_frame = First Frame:
thumbnails = Thumbnails:
force = Force
zoom = Zoom:
overlay = Overlay
size = Size:
onion_skin = Onion Skin:
merge_frames = Merge Frames
red_blue_tint = Red/Blue Tint
reset = Reset
opacity = Opacity:
opacity_step = Opacity Step:
loop_tags = Loop through tag frames
current_layer = Current layer only
behind_sprite = Behind sprite
behind_sprite_toolip = <<<END
Only for transparent layers.
Background is not included in this onion skin mode.
END
in_front = In front of sprite
in_front_toolip = For all kind of layers (background and transparents)
[undo_history]
title = Undo History
[user_data]
title = User Data
user_data = User Data:
color = Color:
[webp_options]
title = WebP Options
save_as = Save as:
lossless_webp = Lossless WebP
lossless_webp_tooltip = Save in simple WebP lossless format.
compression = Compression:
image_hint = Image Hint:
image_hint_default = Default
image_hint_picture = Picture
image_hint_photo = Photo
image_hint_graph = Graph
lossy_webp = Lossy WebP
lossy_webp_tooltip = Save in simple WebP lossy format.
quality = Quality:
image_preset = Image Preset:
image_preset_default = Default
image_preset_picture = Picture
image_preset_photo = Photo
image_preset_drawing = Drawing
image_preset_icon = Icon
image_preset_text = Text

View File

@ -1,13 +1,13 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013, 2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Warning - Important" id="advanced_mode">
<window text="@.title" id="advanced_mode">
<grid columns="1">
<label text="You are going to enter in &quot;Advanced Mode&quot;." />
<label text="@.description" />
<label text="" id="warning_label" />
<check text="Don't show this again" id="donot_show" />
<check text="@.dont_show_again" id="donot_show" />
<separator horizontal="true" />
<button text="&amp;OK" closewindow="true" magnet="true" minwidth="60" cell_align="center" />
<button text="@general.ok" closewindow="true" magnet="true" minwidth="60" cell_align="center" />
</grid>
</window>
</gui>

View File

@ -1,33 +1,33 @@
<!-- ASEPRITE -->
<!-- Aseprite -->
<!-- Copyright (C) 2015-2016 by David Capello -->
<gui>
<vbox id="brush_slot_params">
<grid columns="2">
<label text="Brush:" />
<label text="@.brush" />
<buttonset id="brush_params" columns="3" multiple="true">
<item id="brush_type" text="Type" />
<item id="brush_size" text="Size" />
<item id="brush_angle" text="Angle" />
<item id="brush_type" text="@.brush_type" />
<item id="brush_size" text="@.brush_size" />
<item id="brush_angle" text="@.brush_angle" />
</buttonset>
<label text="Color:" />
<label text="@.color" />
<buttonset id="color_params" columns="2" multiple="true">
<item id="fg_color" text="Foreground" />
<item id="bg_color" text="Background" />
<item id="image_color" text="Image Color" hspan="2" />
<item id="fg_color" text="@.foreground" />
<item id="bg_color" text="@.background" />
<item id="image_color" text="@.image_color" hspan="2" />
</buttonset>
<label text="Ink:" />
<label text="@.ink" />
<buttonset id="ink_params" columns="2" multiple="true">
<item id="ink_type" text="Type" />
<item id="ink_opacity" text="Opacity" />
<item id="ink_type" text="@.ink_type" />
<item id="ink_opacity" text="@.ink_opacity" />
</buttonset>
<label text="Extras:" />
<label text="@.extras" />
<buttonset id="extra_params" columns="2" multiple="true">
<item id="shade" text="Shade" />
<item id="pixel_perfect" text="Pixel-Perfect" />
<item id="shade" text="@.shade" />
<item id="pixel_perfect" text="@.pixel_perfect" />
</buttonset>
</grid>

View File

@ -1,14 +1,14 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Canvas Size" id="canvas_size">
<window id="canvas_size" text="@.title">
<vbox>
<separator text="Size:" left="true" horizontal="true" />
<separator text="@.size" left="true" horizontal="true" />
<hbox>
<grid columns="2">
<label text="Width:" />
<label text="@.width" />
<entry text="0" id="width" maxsize="32" maxwidth="64" suffix="px" magnet="true" />
<label text="Height:" />
<label text="@.height" />
<entry text="0" id="height" maxsize="32" maxwidth="64" suffix="px" />
<hbox filler="true" cell_hspan="2" />
</grid>
@ -25,27 +25,27 @@
</buttonset>
</hbox>
<separator text="Borders:" left="true" horizontal="true" />
<separator text="@.borders" left="true" horizontal="true" />
<grid columns="4">
<label text="Left:" />
<entry text="0" id="left" maxsize="32" maxwidth="64" suffix="px" tooltip="Columns to be added/removed in the left side.&#10;Use a negative number to remove columns." />
<label text="@.left" />
<entry text="0" id="left" maxsize="32" maxwidth="64" suffix="px" tooltip="@.left_tooltip" />
<label text="Top:" />
<entry text="0" id="top" maxsize="32" maxwidth="64" suffix="px" tooltip="Rows to be added/removed in the top side.&#10;Use a negative number to remove rows." />
<label text="@.top" />
<entry text="0" id="top" maxsize="32" maxwidth="64" suffix="px" tooltip="@.top_tooltip" />
<label text="Right:" />
<entry text="0" id="right" maxsize="32" maxwidth="64" suffix="px" tooltip="Columns to be added/removed in the right side.&#10;Use a negative number to remove columns." />
<label text="@.right" />
<entry text="0" id="right" maxsize="32" maxwidth="64" suffix="px" tooltip="@.right_tooltip" />
<label text="Bottom:" />
<entry text="0" id="bottom" maxsize="32" maxwidth="64" suffix="px" tooltip="Rows to be added/removed in the bottom side.&#10;Use a negative number to remove rows." />
<label text="@.bottom" />
<entry text="0" id="bottom" maxsize="32" maxwidth="64" suffix="px" tooltip="@.bottom_tooltip" />
</grid>
<separator horizontal="true" />
<hbox>
<boxfiller />
<hbox homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" width="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" width="60" />
<button text="@general.cancel" closewindow="true" />
</hbox>
</hbox>
</vbox>

View File

@ -1,11 +1,11 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013, 2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Cel Properties" id="cel_properties">
<window id="cel_properties" text="@.title">
<grid columns="3">
<label text="Opacity:" />
<label text="@.opacity" />
<slider min="0" max="255" id="opacity" cell_align="horizontal" width="128" />
<button id="user_data" icon="icon_user_data" tooltip="User Data" />
<button id="user_data" icon="icon_user_data" tooltip="@.user_data_tooltip" />
</grid>
</window>
</gui>

View File

@ -1,21 +1,21 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013, 2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Point Properties" id="color_curve_point">
<window id="color_curve_point" text="@.title">
<vbox>
<hbox expansive="true">
<grid columns="2">
<label text="X:" />
<label text="@.x" />
<entry maxsize="32" id="x" magnet="true" />
<label text="Y:" />
<label text="@.y" />
<entry maxsize="32" id="y" />
</grid>
</hbox>
<hbox homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" />
<button text="&amp;Cancel" closewindow="true" />
<button text="&amp;Delete" closewindow="true" id="delete_button" />
<button text="@.ok" closewindow="true" id="ok" magnet="true" />
<button text="@.cancel" closewindow="true" />
<button text="@.delete" closewindow="true" id="delete_button" />
</hbox>
</vbox>
</window>

View File

@ -1,12 +1,12 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<box vertical="true" id="controls" expansive="true">
<view expansive="true" id="view" minwidth="128" minheight="64">
<listbox id="stock" />
</view>
<box horizontal="true">
<button text="&amp;Reload Stock" id="reload" />
<button text="@convolution_matrix.reload_stock" id="reload" />
</box>
</box>
</gui>

View File

@ -1,10 +1,10 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<grid columns="2" id="controls">
<label text="Width:" />
<label text="@despeckle.width" />
<entry id="width" maxsize="4" cell_align="horizontal" />
<label text="Height:" />
<label text="@despeckle.height" />
<entry id="height" maxsize="4" cell_align="horizontal" />
</grid>
</gui>

View File

@ -1,22 +1,22 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Duplicate Sprite" id="duplicate_sprite">
<window id="duplicate_sprite" text="@.title">
<box vertical="true">
<box horizontal="true" expansive="true">
<box vertical="true" homogeneous="true">
<label text="Duplicate:" />
<label text="As:" />
<label text="@.duplicate" />
<label text="@.as" />
</box>
<box vertical="true" homogeneous="true" expansive="true">
<label text="" id="src_name" />
<entry maxsize="256" id="dst_name" magnet="true" />
</box>
</box>
<check text="Duplicate merged layers only" id="flatten" />
<check text="@.merged_layers" id="flatten" />
<box horizontal="true" homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" />
<button text="@general.cancel" closewindow="true" />
</box>
</box>
</window>

View File

@ -1,70 +1,70 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window id="export_sprite_sheet" text="Export Sprite Sheet">
<window id="export_sprite_sheet" text="@.title">
<grid columns="4">
<label text="Sheet Type:" />
<label text="@.sheet_type" />
<combobox id="sheet_type" cell_hspan="3" />
<label id="columns_label" text="# of Columns:" />
<label id="columns_label" text="@.columns" />
<entry id="columns" text="" maxsize="4" />
<boxfiller cell_hspan="2" />
<label id="rows_label" text="# of Rows:" />
<label id="rows_label" text="@.rows" />
<entry id="rows" text="" maxsize="4" />
<boxfiller cell_hspan="2" />
<hbox />
<vbox>
<check id="padding_enabled" text="Padding" />
<check id="padding_enabled" text="@.padding" />
</vbox>
<grid columns="2" id="padding_container" cell_hspan="2">
<label text="Border:" />
<label text="@.border" />
<entry id="border_padding" text="0" maxsize="4" />
<label text="Shape:" />
<label text="@.shape" />
<entry id="shape_padding" text="0" maxsize="4" />
<label text="Inner:" />
<label text="@.inner" />
<entry id="inner_padding" text="0" maxsize="4" />
</grid>
<label id="fit_width_label" text="Width:" />
<label id="fit_width_label" text="@.width" />
<combobox id="fit_width" text="" maxsize="5" editable="true" />
<label id="fit_height_label" text="Height:" />
<label id="fit_height_label" text="@.height" />
<combobox id="fit_height" text="" maxsize="5" editable="true" />
<hbox id="best_fit_filler" />
<check cell_hspan="3" id="best_fit" text="Best fit for texture" />
<check cell_hspan="3" id="best_fit" text="@.best_fit" />
<label text="Layers:" />
<label text="@.layers" />
<combobox id="layers" text="" cell_hspan="3" />
<label text="Frames:" />
<label text="@.frames" />
<combobox id="frames" text="" cell_hspan="3" />
<check id="image_enabled" text="Output File" />
<check id="image_enabled" text="@.output_file" />
<button id="image_filename" cell_hspan="3" />
<check id="data_enabled" text="JSON Data" />
<check id="data_enabled" text="@.json_data" />
<button id="data_filename" cell_hspan="3" />
<hbox />
<hbox id="data_meta" cell_hspan="3">
<combobox id="data_format">
<listitem text="Hash" value="0" />
<listitem text="Array" value="1" />
<listitem text="@.json_data_hash" value="0" />
<listitem text="@.json_data_array" value="1" />
</combobox>
<label text="Meta:" />
<check id="list_layers" text="Layers" />
<check id="list_tags" text="Frame Tags" />
<label text="@.meta" />
<check id="list_layers" text="@.meta_layers" />
<check id="list_tags" text="@.meta_frame_tags" />
</hbox>
<check id="open_generated" text="Open generated sprite sheet" cell_hspan="4" />
<check id="open_generated" text="@.open_sprite_sheet" cell_hspan="4" />
<hbox cell_hspan="4">
<boxfiller />
<hbox homogeneous="true">
<button id="export_button" text="&amp;Export" minwidth="60" magnet="true" />
<button text="&amp;Cancel" minwidth="60" closewindow="true" />
<button text="@.export" minwidth="60" id="export_button" magnet="true" />
<button text="@.cancel" minwidth="60" closewindow="true" />
</hbox>
</hbox>
</grid>

View File

@ -1,23 +1,23 @@
<!-- ASEPRITE -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window id="file_selector" text="">
<vbox id="main">
<box horizontal="true">
<box horizontal="true" noborders="true">
<button text="" id="go_back_button" bevel="2 0 2 0" tooltip="Go back one folder" />
<button text="" id="go_forward_button" bevel="0 2 0 2" tooltip="Go forward one folder" />
<button text="" id="go_back_button" bevel="2 0 2 0" tooltip="@file_selector.go_back_button_tooltip" />
<button text="" id="go_forward_button" bevel="0 2 0 2" tooltip="@file_selector.go_forward_button_tooltip" />
</box>
<button text="" id="go_up_button" tooltip="Up to parent folder&#10;(Backspace)" />
<button text="" id="new_folder_button" tooltip="New folder" />
<button text="" id="go_up_button" tooltip="@file_selector.go_up_button_tooltip" />
<button text="" id="new_folder_button" tooltip="@file_selector.new_folder_button_tooltip" />
<combobox id="location" expansive="true" />
</box>
<vbox id="file_view_placeholder" expansive="true" />
<grid columns="2">
<label text="File name:" />
<label text="@file_selector.file_name" />
<box id="file_name_placeholder" cell_align="horizontal" />
<label text="File type:" />
<label text="@file_selector.file_type" />
<hbox cell_align="horizontal">
<combobox id="file_type" minwidth="70" />
<vbox>
@ -27,8 +27,8 @@
</vbox>
<boxfiller />
<box horizontal="true" homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" width="60" />
<button text="&amp;Cancel" closewindow="true" id="cancel" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" width="60" />
<button text="@general.cancel" closewindow="true" id="cancel" />
</box>
</hbox>
</grid>

View File

@ -1,9 +1,9 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2016 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2016-2017 by David Capello -->
<gui>
<vbox id="file_selector_extras">
<grid columns="2">
<label id="resize_label" text="Resize:" />
<label id="resize_label" text="@.resize" />
<combobox id="resize" cell_align="horizontal">
<listitem text="25%" value="0.25" />
<listitem text="50%" value="0.5" />
@ -19,13 +19,13 @@
<listitem text="1000%" value="10" />
</combobox>
<label id="layers_label" text="Layers:" />
<label id="layers_label" text="@.layers" />
<combobox id="layers" text="" cell_align="horizontal" />
<label id="frames_label" text="Frames:" />
<label id="frames_label" text="@.frames" />
<combobox id="frames" text="" cell_align="horizontal" />
<check id="pixel_ratio" text="Apply pixel ratio" cell_hspan="2" />
<check id="pixel_ratio" text="@.pixel_ratio" cell_hspan="2" />
</grid>
</vbox>
</gui>

View File

@ -1,12 +1,12 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2015-2016 by David Capello -->
<gui>
<vbox id="font_popup">
<label text="Available Fonts:" />
<label text="@.available_fonts" />
<view id="view" expansive="true" />
<hbox>
<boxfiller />
<button id="load_font" text="Load" magnet="true" width="80" />
<button id="load_font" text="@.load" magnet="true" width="80" />
</hbox>
</vbox>
</gui>

View File

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Aseprite -->
<!-- Copyright (C) 2001-2015 by David Capello -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Frame Properties" id="frame_properties">
<window id="frame_properties" text="@.title">
<grid columns="3">
<label text="Frame number:" />
<label text="@.frame_number" />
<label text="" id="frame" />
<box cell_align="horizontal" />
<label text="Duration (milliseconds):" />
<label text="@.duration" />
<entry maxsize="10" id="frlen" magnet="true" />
<box cell_align="horizontal" />
<separator horizontal="true" cell_hspan="3" />
<box horizontal="true" homogeneous="true" cell_hspan="3" cell_align="right">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</box>
</grid>
</window>

View File

@ -1,29 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Aseprite -->
<!-- Copyright (C) 2015 by David Capello -->
<!-- Copyright (C) 2015-2016 by David Capello -->
<gui>
<window text="Frame Tag Properties" id="frame_tag_properties">
<window id="frame_tag_properties" text="@.title">
<grid columns="2">
<label text="Name:" />
<label text="@.name" />
<entry maxsize="256" id="name" magnet="true" />
<label text="From:" />
<label text="@.from" />
<entry maxsize="10" id="from" />
<label text="To:" />
<label text="@.to" />
<entry maxsize="10" id="to" />
<label text="Color:" />
<label text="@.color" />
<colorpicker id="color" />
<label text="Animation Direction:" />
<label text="@.ani_dir" />
<combobox id="anidir" />
<separator horizontal="true" cell_hspan="2" />
<box horizontal="true" homogeneous="true" cell_hspan="2" cell_align="right">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</box>
</grid>
</window>

View File

@ -1,19 +1,19 @@
<!-- Aseprite -->
<!-- Copyright (C) 2014, 2015 by David Capello -->
<!-- Copyright (C) 2014-2016 by David Capello -->
<gui>
<window text="GIF Options" id="gif_options">
<window id="gif_options" text="@gif_options.title">
<vbox>
<separator text="General Options:" left="true" horizontal="true" />
<check text="&amp;Interlaced" id="interlaced" />
<check text="Animation &amp;Loop" id="loop" />
<separator text="@gif_options.general_options" left="true" horizontal="true" />
<check text="@gif_options.interlaced" id="interlaced" />
<check text="@gif_options.animation_loop" id="loop" />
<separator horizontal="true" />
<hbox>
<boxfiller />
<hbox homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</hbox>
</hbox>
</vbox>

View File

@ -1,17 +1,17 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Go to Frame" id="goto_frame">
<window id="goto_frame" text="@.title">
<grid columns="3">
<label text="Frame number:" />
<label text="@.frame_number" />
<entry expansive="true" maxsize="4" id="frame" magnet="true" />
<box cell_align="horizontal" />
<separator horizontal="true" cell_hspan="3" />
<box horizontal="true" homogeneous="true" cell_hspan="3" cell_align="right">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</box>
</grid>
</window>

View File

@ -1,26 +1,26 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Grid Settings" id="grid_settings">
<window id="grid_settings" text="@.title">
<grid columns="4">
<label text="X:" />
<label text="@.x" />
<entry id="grid_x" text="" maxsize="4" magnet="true" />
<label text="Y:" />
<label text="@.y" />
<entry id="grid_y" text="" maxsize="4" />
<label text="Width:" />
<label text="@.width" />
<entry id="grid_w" text="" maxsize="4" />
<label text="Height:" />
<label text="@.height" />
<entry id="grid_h" text="" maxsize="4" />
<separator horizontal="true" cell_hspan="4" />
<box horizontal="true" homogeneous="true" cell_hspan="4" cell_align="right">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</box>
</grid>
</window>

View File

@ -1,18 +1,18 @@
<!-- Aseprite -->
<!-- Copyright (C) 2001-2015 by David Capello -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<vbox noborders="true" id="home_view" border="4" childspacing="2" expansive="true">
<hbox noborders="true" id="recover_sprites_placeholder">
<boxfiller />
<button id="recover_sprites" text="Recover Lost Sprites" border="8" />
<button id="recover_sprites" text="@.recover" border="8" />
<boxfiller />
</hbox>
<hbox noborders="true" id="header_placeholder">
<image file="icons/ase48.png" align="center" />
<vbox border="4" childspacing="4">
<link id="new_file" text="New File..." style="workspace_link" />
<link id="open_file" text="Open File..." style="workspace_link" />
<link id="new_file" text="@.new_file" style="workspace_link" />
<link id="open_file" text="@.open_file" style="workspace_link" />
</vbox>
<boxfiller />
<vbox border="4">
@ -23,16 +23,16 @@
expansive="true" by="percetage" position="50" >
<splitter vertical="true" noborders="true" childspacing="2">
<vbox id="files_placeholder">
<label text="Recent files:" style="workspace_label" />
<label text="@home_view.recent_files" style="workspace_label" />
<view id="files_view" expansive="true" style="workspace_view" />
</vbox>
<vbox id="folders_placeholder">
<label text="Recent folders:" style="workspace_label" />
<label text="@home_view.recent_folders" style="workspace_label" />
<view id="folders_view" expansive="true" style="workspace_view" />
</vbox>
</splitter>
<vbox id="news_placeholder" noborders="true" childspacing="2">
<label text="News:" style="workspace_label" />
<label text="@home_view.news" style="workspace_label" />
<view id="news_view" expansive="true" style="workspace_view" />
</vbox>
</splitter>

View File

@ -1,33 +1,33 @@
<!-- ASEPRITE -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window id="import_sprite_sheet" text="Import Sprite Sheet">
<window id="import_sprite_sheet" text="@.title">
<grid columns="4">
<button id="select_file" text="Select File" cell_hspan="4" />
<button id="select_file" text="@.select_file" cell_hspan="4" />
<label text="Type:" />
<label text="@.type" />
<combobox id="sheet_type" cell_hspan="3" />
<label text="X:" />
<label text="@.x" />
<entry id="x" text="0" maxsize="4" />
<label text="Y:" />
<label text="@.y" />
<entry id="y" text="0" maxsize="4" />
<label text="Width:" />
<label text="@.width" />
<entry id="width" text="16" maxsize="4" />
<label text="Height:" />
<label text="@.height" />
<entry id="height" text="16" maxsize="4" />
<check id="partial_tiles" text="Include partial tiles at bottom/right edges" cell_hspan="4" />
<check id="partial_tiles" text="@.partial_tiles" cell_hspan="4" />
<hbox cell_hspan="4">
<boxfiller />
<hbox>
</hbox>
<button id="import" text="&amp;Import" minwidth="60" magnet="true" cell_align="center" closewindow="true" />
<button id="cancel" text="&amp;Cancel" minwidth="60" cell_align="center" closewindow="true" />
<button id="import" text="@.import" minwidth="60" magnet="true" cell_align="center" closewindow="true" />
<button id="cancel" text="@.cancel" minwidth="60" cell_align="center" closewindow="true" />
</hbox>
</grid>
</window>

View File

@ -1,16 +1,16 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="JPEG Options" id="jpeg_options">
<window id="jpeg_options" text="@.title">
<grid columns="2">
<label text="Quality:" />
<label text="@.quality" />
<slider min="0" max="10" id="quality" cell_align="horizontal" width="128" />
<separator horizontal="true" cell_hspan="2" />
<box horizontal="true" homogeneous="true" cell_hspan="2" cell_align="right">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</box>
</grid>
</window>

View File

@ -1,7 +1,7 @@
<!-- Aseprite -->
<!-- Copyright (C) 2001-2015 by David Capello -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window id="keyboard_shortcuts" text="Keyboard Shortcuts">
<window id="keyboard_shortcuts" text="@keyboard_shortcuts.title">
<vbox>
<hbox expansive="true">
<vbox>
@ -10,9 +10,9 @@
<listbox id="section" expansive="true" />
</view>
<separator horizontal="true" />
<button text="&amp;Import" id="import_button" />
<button text="&amp;Export" id="export_button" />
<button text="&amp;Reset" id="reset_button" />
<button text="@keyboard_shortcuts.import" id="import_button" />
<button text="@keyboard_shortcuts.export" id="export_button" />
<button text="@keyboard_shortcuts.reset" id="reset_button" />
</vbox>
<vbox expansive="true">
<view id="search_view" expansive="true">
@ -35,8 +35,8 @@
<hbox>
<boxfiller />
<hbox homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" width="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@keyboard_shortcuts.ok" closewindow="true" id="ok" magnet="true" width="60" />
<button text="@keyboard_shortcuts.cancel" closewindow="true" />
</hbox>
</hbox>
</vbox>

View File

@ -1,17 +1,17 @@
<!-- Aseprite -->
<!-- Copyright (C) 2001-2015 by David Capello -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Layer Properties" id="layer_properties">
<window id="layer_properties" text="@.title">
<vbox>
<grid columns="3">
<label text="Name:" />
<label text="@.name" />
<entry text="" id="name" magnet="true" maxsize="256" minwidth="64" cell_align="horizontal" />
<button id="user_data" icon="icon_user_data" tooltip="User Data" />
<button id="user_data" icon="icon_user_data" tooltip="@general.user_data" />
<label text="Mode:" />
<label text="@.mode" />
<combobox id="mode" cell_hspan="2" />
<label text="Opacity:" />
<label text="@.opacity" />
<slider id="opacity" min="0" max="255" width="128" cell_align="horizontal" cell_hspan="2" />
</grid>
</vbox>

View File

@ -1,24 +1,24 @@
<!-- Aseprite -->
<!-- Copyright (C) 2015 by David Capello -->
<!-- Copyright (C) 2015-2016 by David Capello -->
<gui>
<window id="modify_selection" text="Modify Selection">
<window id="modify_selection" text="@.title">
<vbox>
<grid columns="2">
<label id="by_label" text="By:" />
<label id="by_label" text="" />
<entry id="quantity" expansive="true" maxsize="4" magnet="true" suffix="px" />
<hbox />
<vbox>
<radio id="circle" text="Circle Brush" group="1" />
<radio id="square" text="Square Brush" group="1" />
<radio id="circle" text="@.circle" group="1" />
<radio id="square" text="@.square" group="1" />
</vbox>
</grid>
<separator horizontal="true" cell_hspan="3" />
<hbox homogeneous="true" cell_hspan="3" cell_align="right">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</hbox>
</vbox>
</window>

View File

@ -1,17 +1,17 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013, 2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="New Folder" id="new_folder_window">
<window id="new_folder_window" text="@new_folder.title">
<vbox>
<hbox>
<label text="Folder Name:" />
<entry text="New Folder" id="name" maxsize="256" magnet="true" expansive="true" />
<label text="@new_folder.folder_name" />
<entry text="@new_folder.default_new_folder_name" id="name" maxsize="256" magnet="true" expansive="true" />
</hbox>
<hbox>
<boxfiller />
<hbox homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" width="60" />
<button text="&amp;Cancel" closewindow="true" id="cancel" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" width="60" />
<button text="@general.cancel" closewindow="true" id="cancel" />
</hbox>
</hbox>
</vbox>

View File

@ -1,19 +1,19 @@
<!-- ASEPRITE -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="New Layer" id="new_layer">
<window id="new_layer" text="@.title">
<box vertical="true">
<box horizontal="true">
<box vertical="true" homogeneous="true">
<label text="Name:" />
<label text="@.name" />
</box>
<box vertical="true" homogeneous="true">
<entry maxsize="256" text="New Layer" id="name" magnet="true" />
<entry maxsize="256" text="@.default_new_layer_name" id="name" magnet="true" />
</box>
</box>
<box horizontal="true" homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" />
<button text="@general.cancel" closewindow="true" />
</box>
</box>
</window>

View File

@ -1,48 +1,46 @@
<!-- ASEPRITE -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="New Sprite" id="new_sprite">
<window id="new_sprite" text="@.title">
<box vertical="true">
<separator text="Size:" left="true" horizontal="true" />
<separator text="@.size" left="true" horizontal="true" />
<grid columns="2">
<label text="Width:" />
<label text="@.width" />
<entry id="width" maxsize="8" magnet="true" cell_align="horizontal" suffix="px" />
<label text="Height:" />
<label text="@.height" />
<entry id="height" maxsize="8" cell_align="horizontal" suffix="px" />
</grid>
<separator text="Color Mode:" left="true" horizontal="true" />
<separator text="@.color_mode" left="true" horizontal="true" />
<buttonset columns="3" id="color_mode">
<item text="&amp;RGBA" icon="icon_rgb" tooltip="Each pixel has Red, Green, Blue, and Alpha components&#10;(32 bits per pixel)" tooltip_dir="bottom" />
<item text="&amp;Grayscale" icon="icon_grayscale" tooltip="Each pixel has a Gray value and Alpha&#10;(16 bits per pixel)" tooltip_dir="bottom" />
<item text="&amp;Indexed" icon="icon_indexed" tooltip="Each pixel is a reference to the palette&#10;(8 bits per pixel)" tooltip_dir="bottom" />
<item text="@.rgba" icon="icon_rgb" tooltip="@.rgba_tooltip" tooltip_dir="bottom" />
<item text="@.grayscale" icon="icon_grayscale" tooltip="@.grayscale_tooltip" tooltip_dir="bottom" />
<item text="@.indexed" icon="icon_indexed" tooltip="@.indexed_tooltip" tooltip_dir="bottom" />
</buttonset>
<separator text="Background:" left="true" horizontal="true" />
<separator text="@.background" left="true" horizontal="true" />
<buttonset columns="3" id="bg_color">
<item text="&amp;Transparent" icon="icon_transparent" />
<item text="&amp;White" icon="icon_white" />
<item text="&amp;Black" icon="icon_black" />
<item text="@.transparent" icon="icon_transparent" />
<item text="@.white" icon="icon_white" />
<item text="@.black" icon="icon_black" />
</buttonset>
<check id="advanced_check" text="Advanced Options" />
<check id="advanced_check" text="@.advanced_options" />
<vbox id="advanced">
<grid columns="2">
<label text="Pixel Ratio:" />
<combobox id="pixel_ratio" cell_align="horizontal">
<listitem text="Square Pixels (1:1)" value="1:1" />
<listitem text="Double-wide Pixels (2:1)" value="2:1" />
<listitem text="Double-high Pixels (1:2)" value="1:2" />
</combobox>
</grid>
<label text="@.pixel_ratio" />
<combobox id="pixel_ratio" cell_align="horizontal">
<listitem text="@.square_pixels" value="1:1" />
<listitem text="@.double_wide" value="2:1" />
<listitem text="@.double_high" value="1:2" />
</combobox>
</vbox>
<box horizontal="true">
<box horizontal="true" expansive="true" />
<box horizontal="true" homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok_button" magnet="true" width="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok_button" magnet="true" width="60" />
<button text="@general.cancel" closewindow="true" />
</box>
</box>

View File

@ -1,19 +1,19 @@
<!-- ASEPRITE -->
<!-- Aseprite -->
<!-- Copyright (C) 2016 by David Capello -->
<gui>
<window text="Notice" id="open_sequence">
<window id="open_sequence" text="@.title">
<vbox>
<label text="Do you want to load the following files as an animation?" />
<label text="@.description" />
<view expansive="true" id="view" minwidth="128" minheight="64">
<listbox id="files" multiselect="true" />
</view>
<separator horizontal="true" />
<check id="repeat" text="Do the same for other files" />
<check id="repeat" text="@.repeat" />
<hbox>
<boxfiller />
<hbox homogeneous="true">
<button id="agree" text="&amp;Agree" closewindow="true" minwidth="60" />
<button id="skip" text="&amp;Skip" closewindow="true" minwidth="60" magnet="true" />
<button id="agree" text="@.agree" closewindow="true" minwidth="60" />
<button id="skip" text="@.skip" closewindow="true" minwidth="60" magnet="true" />
</hbox>
<boxfiller />
</hbox>

View File

@ -1,36 +1,36 @@
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<!-- Copyright (C) 2001-2017 by David Capello -->
<gui>
<window id="options" text="Preferences">
<window id="options" text="@.title">
<vbox>
<hbox expansive="true">
<view maxsize="true">
<listbox id="section_listbox">
<listitem text="General" value="section_general" />
<listitem text="Editor" value="section_editor" />
<listitem text="Timeline" value="section_timeline" />
<listitem text="Cursors" value="section_cursors" />
<listitem text="Background" value="section_bg" />
<listitem text="Grid" value="section_grid" />
<listitem text="Undo" value="section_undo" />
<listitem text="Theme" value="section_theme" />
<listitem text="Experimental" value="section_experimental" />
<listitem text="@.section_general" value="section_general" />
<listitem text="@.section_editor" value="section_editor" />
<listitem text="@.section_timeline" value="section_timeline" />
<listitem text="@.section_cursors" value="section_cursors" />
<listitem text="@.section_background" value="section_bg" />
<listitem text="@.section_grid" value="section_grid" />
<listitem text="@.section_undo" value="section_undo" />
<listitem text="@.section_theme" value="section_theme" />
<listitem text="@.section_experimental" value="section_experimental" />
</listbox>
</view>
<panel id="panel" expansive="true">
<vbox id="section_general">
<separator text="General" horizontal="true" />
<separator text="@.section_general" horizontal="true" />
<hbox>
<grid columns="2">
<label text="Screen Scaling:" />
<label text="@.screen_scaling" />
<combobox id="screen_scale">
<listitem text="100%" value="1" />
<listitem text="200%" value="2" />
<listitem text="300%" value="3" />
<listitem text="400%" value="4" />
</combobox>
<label text="UI Elements Scaling:" />
<label text="@.ui_scaling" />
<combobox id="ui_scale">
<listitem text="100%" value="1" />
<listitem text="200%" value="2" />
@ -39,64 +39,73 @@
</combobox>
</grid>
</hbox>
<check text="GPU acceleration" id="gpu_acceleration" tooltip="Check this option to enable hardware acceleration" />
<check text="Show Home tab when Aseprite is started" id="show_home" />
<check text="Expand menu bar items on mouseover" id="expand_menubar_on_mouseover" tooltip="Check this option to get&#10;this old menus behavior." />
<check id="gpu_acceleration"
text="@.gpu_acceleration"
tooltip="@.gpu_acceleration_tooltip" />
<check id="show_home"
text="@.show_home" />
<check id="expand_menubar_on_mouseover"
text="@.expand_menu_bar_items_on_mouseover"
tooltip="@.expand_menu_bar_items_on_mouseover" />
<hbox>
<check text="Automatically save recovery data every" id="enable_data_recovery" tooltip="With this option you can recover your documents&#10;if the program finalizes unexpectedly." />
<check id="enable_data_recovery"
text="@.auto_save_recovery_data"
tooltip="@.auto_save_recovery_data_tooltip" />
<combobox id="data_recovery_period">
<listitem text="10 seconds" value="0.33" />
<listitem text="30 seconds" value="0.5" />
<listitem text="1 Minutes" value="1" />
<listitem text="2 Minutes" value="2" />
<listitem text="5 Minutes" value="5" />
<listitem text="10 Minutes" value="10" />
<listitem text="15 Minutes" value="15" />
<listitem text="30 Minutes" value="30" />
<listitem text="@.10_seconds" value="0.33" />
<listitem text="@.30_seconds" value="0.5" />
<listitem text="@.1_minute" value="1" />
<listitem text="@.2_minutes" value="2" />
<listitem text="@.5_minutes" value="5" />
<listitem text="@.10_minutes" value="10" />
<listitem text="@.15_minutes" value="15" />
<listitem text="@.30_minutes" value="30" />
</combobox>
</hbox>
<check text="Show full file name path" id="show_full_path" tooltip="Uncheck this option if you would prefer to hide&#10;full path on UI (e.g. useful for live streaming)" />
<check id="show_full_path"
text="@.show_full_path"
tooltip="@.show_full_path_tooltip" />
<separator horizontal="true" />
<link id="locate_file" text="Locate Configuration File" />
<link id="locate_crash_folder" text="Locate Crash Folder" />
<link id="locate_file" text="@.locate_file" />
<link id="locate_crash_folder" text="@.locate_crash_folder" />
</vbox>
<!-- Editor -->
<vbox id="section_editor">
<separator text="Editor" horizontal="true" />
<check text="Zoom with scroll wheel" id="wheel_zoom" />
<check text="Zoom sliding two fingers up or down" id="slide_zoom" />
<check text="Zoom from center with scroll wheel" id="zoom_from_center_with_wheel" />
<check text="Zoom from center with keys" id="zoom_from_center_with_keys" />
<check text="Show scroll-bars in sprite editor" id="show_scrollbars" tooltip="Show scroll-bars in all sprite editors." />
<check text="Auto-scroll on editor edges" id="auto_scroll" />
<separator text="@.section_editor" horizontal="true" />
<check text="@.wheel_zoom" id="wheel_zoom" />
<check text="@.slide_zoom" id="slide_zoom" />
<check text="@.zoom_from_center_with_wheel" id="zoom_from_center_with_wheel" />
<check text="@.zoom_from_center_with_keys" id="zoom_from_center_with_keys" />
<check text="@.show_scrollbars" id="show_scrollbars" tooltip="@.show_scrollbars_tooltip" />
<check text="@.auto_scroll" id="auto_scroll" />
<hbox>
<label text="Right-click:" />
<label text="@.right_click" />
<combobox id="right_click_behavior" expansive="true" />
</hbox>
<separator text="Selection" horizontal="true" />
<check text="Adjust opaque/transparent mode automatically" id="auto_opaque" tooltip="Depending on the layer (background/transparent),&#10;the pasted selection will be adjusted&#10;automatically (opaque/transparent)" />
<check text="Keep selection after &quot;Edit &gt; Clear&quot; command" id="keep_selection_after_clear" tooltip="Check this if you want to keep the selection&#10;after deleting it." />
<separator text="@.editor_selection" horizontal="true" />
<check text="@.auto_opaque" id="auto_opaque" tooltip="@.auto_opaque_tooltip" />
<check text="@.keep_selection_after_clear" id="keep_selection_after_clear" tooltip="@.keep_selection_after_clear_tooltip" />
</vbox>
<!-- Timeline -->
<vbox id="section_timeline">
<separator text="Timeline" horizontal="true" />
<check text="Show timeline automatically" id="autotimeline" tooltip="Show the timeline automatically&#10;when a new frame or layer is added." />
<check text="Rewind on Stop" id="rewind_on_stop" tooltip="The 'Stop' button should rewind the animation&#10;where it was started." />
<separator text="@.section_timeline" horizontal="true" />
<check text="@.autotimeline" id="autotimeline" tooltip="@.autotimeline_tooltip" />
<check text="@.rewind_on_stop" id="rewind_on_stop" tooltip="@.rewind_on_stop_tooltip" />
<hbox>
<label text="Default First Frame:" />
<label text="@.default_first_frame" />
<entry id="first_frame" maxsize="3" />
</hbox>
</vbox>
<!-- Cursors -->
<vbox id="section_cursors">
<separator text="UI Mouse Cursor" horizontal="true" />
<check id="native_cursor" text="Use native mouse cursors" />
<separator text="@.ui_mouse_cursor" horizontal="true" />
<check id="native_cursor" text="@.native_cursor" />
<hbox>
<label id="cursor_scale_label" text="Mouse Cursor Scale:" />
<label id="cursor_scale_label" text="@.cursor_scale_label" />
<combobox id="cursor_scale">
<listitem text="100%" value="1" />
<listitem text="200%" value="2" />
@ -105,26 +114,26 @@
</combobox>
</hbox>
<separator text="Painting Cursors" horizontal="true" />
<separator text="@.painting_cursors" horizontal="true" />
<grid columns="2">
<label text="Crosshair Type:" />
<label text="@.crosshair_type" />
<combobox id="painting_cursor_type">
<listitem text="Simple Crosshair" value="0" />
<listitem text="Crosshair on Sprite" value="1" />
<listitem text="@.simple_crosshair" value="0" />
<listitem text="@.crosshair_on_sprite" value="1" />
</combobox>
<label text="Brush Preview:" />
<label text="@.brush_preview" />
<combobox id="brush_preview">
<listitem text="None" value="0" />
<listitem text="Brush Edges" value="1" />
<listitem text="Full Real-time Brush Preview" value="2" />
<listitem text="@.brush_preview_none" value="0" />
<listitem text="@.brush_preview_edges" value="1" />
<listitem text="@.brush_preview_full" value="2" />
</combobox>
<label text="Crosshair &amp; Brush Edges Color:" />
<label text="@.cursor_color_type" />
<combobox group="1" id="cursor_color_type">
<listitem text="Negative Black and White" value="0" />
<listitem text="Specific Color" value="1" />
<listitem text="@.cursor_neg_bw" value="0" />
<listitem text="@.cursor_specific_color" value="1" />
</combobox>
<boxfiller />
@ -136,15 +145,15 @@
<vbox id="section_bg">
<combobox id="bg_scope" />
<separator text="Checked Background" horizontal="true" />
<separator text="@.bg_checked" horizontal="true" />
<grid columns="2">
<label text="Size:" />
<label text="@.bg_size" />
<hbox>
<combobox id="checked_bg_size" />
<check text="Apply Zoom" id="checked_bg_zoom" />
<check text="@.bg_apply_zoom" id="checked_bg_zoom" />
</hbox>
<label text="Colors:" />
<label text="@.bg_colors" />
<hbox>
<box horizontal="true" id="checked_bg_color1_box" />
<box horizontal="true" id="checked_bg_color2_box" />
@ -153,7 +162,7 @@
<hbox>
<hbox expansive="true" />
<button id="reset_bg" text="Reset" width="60" />
<button id="reset_bg" text="@.reset_bg" width="60" />
</hbox>
</vbox>
@ -161,87 +170,90 @@
<vbox id="section_grid">
<combobox id="grid_scope" />
<hbox>
<check id="grid_visible" text="Visible Grid" />
<check id="grid_visible" text="@.grid_visible" />
<separator horizontal="true" expansive="true" />
</hbox>
<grid columns="5">
<label text="X:" />
<label text="@.grid_x" />
<entry id="grid_x" text="" maxsize="4" />
<label text="Y:" />
<label text="@.grid_y" />
<entry id="grid_y" text="" maxsize="4" />
<hbox />
<label text="Width:" />
<label text="@.grid_width" />
<entry id="grid_w" text="" maxsize="4" />
<label text="Height:" />
<label text="@.grid_height" />
<entry id="grid_h" text="" maxsize="4" />
<hbox />
<label text="Color:" />
<label text="@.grid_color" />
<box id="grid_color_placeholder" cell_hspan="3" /><!-- custom widget -->
<hbox />
<label text="Opacity:" />
<label text="@.grid_opacity" />
<slider id="grid_opacity" cell_hspan="3" min="1" max="255" width="128" />
<check id="grid_auto_opacity" text="Auto" />
<check id="grid_auto_opacity" text="@.grid_auto" />
</grid>
<hbox>
<check id="pixel_grid_visible" text="Visible Pixel Grid" />
<check id="pixel_grid_visible" text="@.grid_pixel_grid_visible" />
<separator horizontal="true" expansive="true" />
</hbox>
<grid columns="3">
<label text="Color:" />
<label text="@.grid_color" />
<box id="pixel_grid_color_placeholder" /><!-- custom widget -->
<hbox />
<label text="Opacity:" />
<label text="@.grid_opacity" />
<slider id="pixel_grid_opacity" min="1" max="255" width="128" />
<check id="pixel_grid_auto_opacity" text="Auto" />
<check id="pixel_grid_auto_opacity" text="@.grid_auto" />
</grid>
<hbox>
<hbox expansive="true" />
<button id="reset_grid" text="Reset" width="60" />
<button id="reset_grid" text="@.reset_grid" width="60" />
</hbox>
</vbox>
<!-- Undo -->
<vbox id="section_undo">
<separator text="Undo" horizontal="true" />
<separator text="@.section_undo" horizontal="true" />
<hbox>
<label text="Undo Limit:" />
<entry id="undo_size_limit" maxsize="4" tooltip="Limit of memory to be used&#10;for undo information per sprite.&#10;Specified in megabytes." />
<label text="MB" />
<label text="@.undo_size_limit" />
<entry id="undo_size_limit" maxsize="4" tooltip="@.undo_size_limit_tooltip" />
<label text="@.undo_mb" />
</hbox>
<vbox>
<check id="undo_goto_modified" text="Go to modified frame/layer" tooltip="When it's enabled each time you undo/redo&#10;the current frame &amp; layer will be modified&#10;to focus the undid/redid change." />
<check id="undo_allow_nonlinear_history" text="Allow non-linear history" />
<check id="undo_goto_modified"
text="@.undo_goto_modified"
tooltip="@.undo_goto_modified_tooltip" />
<check id="undo_allow_nonlinear_history"
text="@.undo_allow_nonlinear_history" />
</vbox>
</vbox>
<!-- Theme -->
<vbox id="section_theme">
<separator text="Available Themes" horizontal="true" />
<separator text="@.available_themes" horizontal="true" />
<view expansive="true" maxsize="true">
<listbox id="theme_list" />
</view>
<hbox>
<button id="select_theme" text="&amp;Select" width="60" />
<button id="select_theme" text="@.select_theme" width="60" />
<boxfiller />
<button id="open_theme_folder" text="Open &amp;Folder" width="100" />
<button id="open_theme_folder" text="@.open_theme_folder" width="100" />
</hbox>
</vbox>
<!-- Experimental -->
<vbox id="section_experimental">
<separator text="User Interface" horizontal="true" />
<check id="native_file_dialog" text="Use native file dialog" />
<check id="flash_layer" text="Flash layer when it is selected" />
<separator text="@.user_interface" horizontal="true" />
<check id="native_file_dialog" text="@.native_file_dialog" />
<check id="flash_layer" text="@.flash_selected_layer" />
<hbox>
<label text="Opacity for non-active layers:" />
<label text="@.non_active_layer_opacity" />
<slider id="nonactive_layers_opacity" min="0" max="255" width="128" />
</hbox>
</vbox>
@ -252,9 +264,9 @@
<hbox>
<boxfiller />
<hbox homogeneous="true">
<button text="&amp;OK" closewindow="true" id="button_ok" magnet="true" width="60" />
<button text="&amp;Apply" id="button_apply" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@.ok" closewindow="true" id="button_ok" magnet="true" width="60" />
<button text="@.apply" id="button_apply" />
<button text="@.cancel" closewindow="true" />
</hbox>
</hbox>
</vbox>

View File

@ -1,21 +1,19 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2015-2016 by David Capello -->
<gui>
<window text="Palette from Sprite" id="palette_from_sprite">
<grid columns="3">
<radio id="new_palette" text="Create new palette with" group="1" />
<window id="palette_from_sprite" text="@.title">
<grid columns="2">
<radio id="new_palette" text="@.new_palette" group="1" />
<entry expansive="true" maxsize="4" id="ncolors" magnet="true" />
<label text="colors or less" />
<radio id="current_palette" text="Replace current palette" group="1" cell_hspan="3" />
<radio id="current_range" text="Replace current range" group="1" cell_hspan="3" />
<radio id="current_palette" text="@.replace_palette" group="1" cell_hspan="2" />
<radio id="current_range" text="@.replace_range" group="1" cell_hspan="2" />
<check id="alpha_channel" text="@.alpha_channel" cell_hspan="2" />
<check id="alpha_channel" text="Create entries with alpha component" cell_hspan="3" />
<separator horizontal="true" cell_hspan="2" />
<separator horizontal="true" cell_hspan="3" />
<box horizontal="true" homogeneous="true" cell_hspan="3" cell_align="right">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<box horizontal="true" homogeneous="true" cell_hspan="2" cell_align="right">
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</box>
</grid>
</window>

View File

@ -1,13 +1,13 @@
<!-- ASEPRITE -->
<!-- Aseprite -->
<!-- Copyright (C) 2014-2016 by David Capello -->
<gui>
<vbox id="palette_popup">
<label text="Available Palettes:" />
<label text="@.title" />
<view id="view" expansive="true" />
<hbox>
<button id="load_pal" text="&amp;Load" width="80" magnet="true" />
<button id="load_pal" text="@.load" width="80" magnet="true" />
<hbox expansive="true" />
<button id="open_folder" text="Open &amp;Folder" width="60" />
<button id="open_folder" text="@.open_folder" width="60" />
</hbox>
</vbox>
</gui>

View File

@ -1,17 +1,17 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2015-2016 by David Capello -->
<gui>
<window text="Palette Size" id="palette_size">
<window id="palette_size" text="@.title">
<grid columns="3">
<label text="Number of colors:" />
<label text="@.number_of_colors" />
<entry expansive="true" maxsize="4" id="colors" magnet="true" />
<box cell_align="horizontal" />
<separator horizontal="true" cell_hspan="3" />
<box horizontal="true" homogeneous="true" cell_hspan="3" cell_align="right">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</box>
</grid>
</window>

View File

@ -1,29 +1,30 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2015-2016 by David Capello -->
<gui>
<window text="Insert Text" id="paste_text">
<window id="paste_text" text="@.title">
<grid columns="2">
<label text="Text:" />
<label text="@.text" />
<entry expansive="true" maxsize="256" id="user_text" magnet="true" cell_align="horizontal" />
<label text="Font Size:" />
<label text="@.font_size" />
<entry id="font_size" maxsize="3" text="32" cell_align="horizontal" />
<label text="Font:" />
<dropdownbutton minwidth="60" id="font_face" text="Select Font" cell_align="horizontal" />
<label text="@.font" />
<dropdownbutton minwidth="60" id="font_face" text="@.select_font" cell_align="horizontal" />
<label text="Color:" />
<label text="@.color" />
<colorpicker id="font_color" cell_align="horizontal" />
<hbox />
<check id="antialias" text="Anti-aliasing filter" cell_align="horizontal"
tooltip="Smooth font edges" />
<check id="antialias"
text="@.antialias" cell_align="horizontal"
tooltip="@.antialias_tooltip" />
<separator horizontal="true" cell_hspan="2" />
<box horizontal="true" homogeneous="true" cell_hspan="2" cell_align="right">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</box>
</grid>
</window>

View File

@ -1,16 +1,16 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<box vertical="true" expansive="true" id="controls">
<box horizontal="true" expansive="true">
<grid columns="2" id="controls">
<label text="From:" />
<label text="@replace_color.from" />
<colorpicker id="from" cell_align="horizontal" />
<label text="To:" />
<label text="@replace_color.to" />
<colorpicker id="to" cell_align="horizontal" />
</grid>
</box>
<label text="Tolerance:" />
<label text="@replace_color.tolerance" />
<slider min="0" max="255" id="tolerance" />
</box>
</gui>

View File

@ -1,24 +1,24 @@
<!-- Aseprite -->
<!-- Copyright (C) 2001-2015 by David Capello -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window id="select_accelerator" text="Keyboard Shortcut">
<window id="select_accelerator" text="@.title">
<vbox expansive="true">
<grid columns="3">
<label text="Key:" />
<label text="@.key" />
<hbox id="key_placeholder" cell_align="horizontal" />
<button text="Clear" id="clear_button" width="60" />
<button text="@.clear" id="clear_button" width="60" />
<label text="Modifiers:" />
<label text="@.modifiers" />
<hbox cell_hspan="2" cell_align="horizontal">
<check text="Ctrl" id="ctrl" />
<check text="Cmd" id="cmd" />
<check text="Alt" id="alt" />
<check text="Shift" id="shift" />
<check text="Space" id="space" />
<check text="Win" id="win" />
<check text="@.ctrl" id="ctrl" />
<check text="@.cmd" id="cmd" />
<check text="@.alt" id="alt" />
<check text="@.shift" id="shift" />
<check text="@.space" id="space" />
<check text="@.win" id="win" />
</hbox>
<label text="Assigned to:" />
<label text="@.assigned_to" />
<label text="" id="assigned_to" cell_hspan="2" />
</grid>
@ -28,8 +28,8 @@
<box horizontal="true">
<boxfiller />
<box horizontal="true" homogeneous="true">
<button text="OK" id="ok_button" magnet="true" width="60" />
<button text="Cancel" id="cancel_button" />
<button text="@.ok" id="ok_button" magnet="true" width="60" />
<button text="@.cancel" id="cancel_button" />
</box>
</box>

View File

@ -1,27 +1,27 @@
<!-- Aseprite -->
<!-- Copyright (C) 2014, 2016 by David Capello -->
<!-- Copyright (C) 2014-2016 by David Capello -->
<gui>
<window text="Crash Report" id="send_crash">
<window id="send_crash" text="@.title">
<vbox>
<vbox id="official">
<label text="Please send the following file:" />
<label text="@.send_file" />
<link id="filename" text="" url="" />
<label text="to this email:" />
<label text="@.to_email" />
<entry readonly="true" text="support@aseprite.org" maxsize="256" />
<label text="explaining what you was doing when the program crashed." />
<label text="@.explaining" />
</vbox>
<vbox id="dev">
<label text="You are using a development version." />
<label text="Open the following file to debug your compilation:" />
<label text="@.using_dev_ver" />
<label text="@.open_dmp_file" />
<link id="dev_filename" text="" url="" />
</vbox>
<separator horizontal="true" />
<button text="Do it later" closewindow="true" />
<button id="delete_file" text="Delete file, I've already sent it" closewindow="true" />
<button text="@.do_it_later" closewindow="true" />
<button text="@.delete_file" closewindow="true" id="delete_file" />
</vbox>
</window>
</gui>

View File

@ -1,39 +1,39 @@
<!-- ASEPRITE -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Sprite Properties" id="sprite_properties">
<window id="sprite_properties" text="@.title">
<vbox>
<grid columns="2">
<label text="File name:" />
<label text="@.filename" />
<entry text="" id="name" maxsize="256" minwidth="64" readonly="true" cell_align="horizontal" />
<label text="Type:" />
<label text="@.type" />
<label text="" id="type" />
<label text="Size:" />
<label text="@.size" />
<label text="" id="size" />
<label text="Frames:" />
<label text="@.frames" />
<label text="" id="frames" />
<separator text="Advanced" horizontal="true" cell_hspan="2" />
<separator text="@.advanced" horizontal="true" cell_hspan="2" />
<label text="Transparent Color:" />
<hbox id="transparent_color_placeholder" tooltip="Palette entry used as&#10;transparent color in each&#10;layer (only for indexed images)." />
<label text="@.transparent_color" />
<hbox id="transparent_color_placeholder" tooltip="@.transparent_color_tooltip" />
<label text="Pixel Ratio:" />
<label text="@.pixel_ratio" />
<combobox id="pixel_ratio" cell_align="horizontal">
<listitem text="Square Pixels (1:1)" value="1:1" />
<listitem text="Double-wide Pixels (2:1)" value="2:1" />
<listitem text="Double-high Pixels (1:2)" value="1:2" />
<listitem text="@.square_pixels" value="1:1" />
<listitem text="@.double_wide" value="2:1" />
<listitem text="@.double_high" value="1:2" />
</combobox>
</grid>
<separator horizontal="true" />
<hbox>
<boxfiller />
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" width="60" />
<button text="&amp;Cancel" closewindow="true" id="cancel" width="60" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" width="60" />
<button text="@general.cancel" closewindow="true" id="cancel" width="60" />
</hbox>
</vbox>
</window>

View File

@ -1,50 +1,50 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2001-2013 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<window text="Sprite Size" id="sprite_size">
<window id="sprite_size" text="@.title">
<box vertical="true">
<box vertical="true">
<separator text="Pixels:" left="true" horizontal="true" />
<separator text="@.pixels" left="true" horizontal="true" />
<box vertical="true" expansive="true">
<box horizontal="true">
<box vertical="true" homogeneous="true">
<label text="Width:" />
<label text="Height:" />
<label text="@.width" />
<label text="@.height" />
</box>
<box vertical="true" homogeneous="true" expansive="true">
<entry expansive="true" id="width_px" suffix="px" maxsize="8" magnet="true" tooltip="New width for the sprite (in pixels)" />
<entry expansive="true" id="height_px" suffix="px" maxsize="8" tooltip="New height for the sprite (in pixels)" />
<entry expansive="true" id="width_px" suffix="px" maxsize="8" magnet="true" tooltip="@.width_px_tooltip" />
<entry expansive="true" id="height_px" suffix="px" maxsize="8" tooltip="@.height_px_tooltip" />
</box>
<check text="Lock Ratio" id="lock_ratio" selected="true" />
<check text="@.lock_ratio" id="lock_ratio" selected="true" />
</box>
</box>
<separator text="Percentage:" left="true" horizontal="true" />
<separator text="@.percentage" left="true" horizontal="true" />
<box vertical="true" expansive="true">
<box horizontal="true">
<box vertical="true" homogeneous="true">
<label text="Width:" />
<label text="Height:" />
<label text="@.width" />
<label text="@.height" />
</box>
<box vertical="true" homogeneous="true" expansive="true">
<entry expansive="true" text="100" suffix="%" id="width_perc" maxsize="8" magnet="true" tooltip="New width for the sprite&#10;Percentage of current width." />
<entry expansive="true" text="100" suffix="%" id="height_perc" maxsize="8" tooltip="New height for the sprite&#10;Percentage of current height." />
<entry expansive="true" text="100" suffix="%" id="width_perc" maxsize="8" magnet="true" tooltip="@.width_perc_tooltip" />
<entry expansive="true" text="100" suffix="%" id="height_perc" maxsize="8" tooltip="@.height_perc_tooltip" />
</box>
<box horizontal="true" width="64" />
</box>
</box>
</box>
<separator text="Interpolation:" left="true" horizontal="true" />
<separator text="@.interpolation" left="true" horizontal="true" />
<box vertical="true" expansive="true">
<box horizontal="true">
<label text="Method:" />
<label text="@.method" />
<combobox id="method" expansive="true" />
</box>
</box>
<box horizontal="true">
<box horizontal="true" expansive="true" />
<box horizontal="true" homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" width="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" width="60" />
<button text="@general.cancel" closewindow="true" />
</box>
</box>
</box>

View File

@ -1,57 +1,57 @@
<!-- ASEPRITE -->
<!-- Aseprite -->
<!-- Copyright (C) 2014-2016 by David Capello -->
<gui>
<vbox id="timeline_conf">
<hbox>
<vbox>
<separator cell_hspan="2" text="Position:" left="true" horizontal="true" />
<separator cell_hspan="2" text="@.position" left="true" horizontal="true" />
<hbox>
<buttonset columns="2" id="position">
<item text="&amp;Left" />
<item text="&amp;Right" />
<item text="&amp;Bottom" hspan="2" />
<item text="@.left" />
<item text="@.right" />
<item text="@.bottom" hspan="2" />
</buttonset>
</hbox>
</vbox>
<vbox>
<separator cell_hspan="2" text="Frame Header:" left="true" horizontal="true" />
<separator cell_hspan="2" text="@.frame_header" left="true" horizontal="true" />
<hbox>
<label text="First Frame:" />
<label text="@.first_frame" />
<entry id="first_frame" maxsize="3" />
</hbox>
<separator cell_hspan="2" text="Thumbnails:" left="true" horizontal="true" />
<separator cell_hspan="2" text="@.thumbnails" left="true" horizontal="true" />
<grid columns="3">
<check id="thumb_enabled" text="Force" />
<label text="Zoom:" />
<check id="thumb_enabled" text="@.force" />
<label text="@.zoom" />
<slider min="1" max="10" id="zoom" cell_align="horizontal" width="128" />
<check id="thumb_overlay_enabled" text="Overlay"/>
<label text="Size:" />
<check id="thumb_overlay_enabled" text="@.overlay"/>
<label text="@.size" />
<slider min="2" max="10" id="thumb_overlay_size" cell_align="horizontal" width="128" />
</grid>
</vbox>
</hbox>
<separator cell_hspan="2" text="Onion Skin:" left="true" horizontal="true" />
<separator cell_hspan="2" text="@.onion_skin" left="true" horizontal="true" />
<grid columns="2">
<hbox cell_hspan="2">
<radio group="1" text="Merge Frames" id="merge" />
<radio group="1" text="Red/Blue Tint" id="tint" />
<button id="reset_onionskin" text="Reset" width="60" />
<radio group="1" text="@.merge_frames" id="merge" />
<radio group="1" text="@.red_blue_tint" id="tint" />
<button id="reset_onionskin" text="@.reset" width="60" />
</hbox>
<label text="Opacity:" />
<label text="@.opacity" />
<slider min="0" max="255" id="opacity" cell_align="horizontal" width="128" />
<label text="Opacity Step:" />
<label text="@.opacity_step" />
<slider min="0" max="255" id="opacity_step" cell_align="horizontal" width="128" />
<check id="loop_tag" text="Loop through tag frames" cell_hspan="2" />
<check id="current_layer" text="Current layer only" cell_hspan="2" />
<check id="loop_tag" text="@.loop_tags" cell_hspan="2" />
<check id="current_layer" text="@.current_layer" cell_hspan="2" />
<hbox cell_hspan="2">
<radio group="2" text="Behind sprite" id="behind" tooltip="Only for transparent layers.&#10;Background is not included in this onion skin mode." tooltip_dir="top" />
<radio group="2" text="In front of sprite" id="infront" tooltip="For all kind of layers (background and transparents)" />
<radio group="2" text="@.behind_sprite" id="behind" tooltip="@.behind_sprite_toolip" tooltip_dir="top" />
<radio group="2" text="@.in_front" id="infront" tooltip="@.in_front_toolip" />
</hbox>
</grid>
</vbox>

View File

@ -1,7 +1,7 @@
<!-- ASEPRITE -->
<!-- Copyright (C) 2015 by David Capello -->
<!-- Aseprite -->
<!-- Copyright (C) 2015-2016 by David Capello -->
<gui>
<window id="undo_history" text="Undo History">
<window id="undo_history" text="@.title">
<view id="view" expansive="true" width="80" height="100">
<listbox id="actions" />
</view>

View File

@ -1,13 +1,13 @@
<!-- Aseprite -->
<!-- Copyright (C) 2001-2015 by David Capello -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<tipwindow text="User Data" id="user_data">
<tipwindow id="user_data" text="@.title">
<vbox>
<label text="User Data:" />
<label text="@.user_data" />
<entry id="text" magnet="true" maxsize="65535" minwidth="128" expansive="true" />
<hbox>
<label text="Color:" />
<colorpicker id="color" expansive="true" />
<label text="@.color" />
<colorpicker id="color" expansive="true" />
</hbox>
</vbox>
</tipwindow>

View File

@ -1,45 +1,46 @@
<!-- ASEPRITE -->
<!-- Aseprite -->
<!-- Copyright (C) 2015 by Gabriel Rauter -->
<!-- Copyright (C) 2016 by David Capello -->
<gui>
<window text="WebP Options" id="webp_options">
<window id="webp_options" text="@.title">
<vbox>
<label text="Save as:" />
<radio group="1" text="Lossless WebP" id="lossless" tooltip="Save in simple WebP lossless format." />
<label text="@.save_as" />
<radio group="1" text="@.lossless_webp" id="lossless" tooltip="@.lossless_webp_tooltip" />
<hbox>
<label width="55" text="Compression:" />
<label width="55" text="@.compression" />
<slider min="0" max="9" id="compression" cell_align="horizontal" width="128" />
</hbox>
<hbox>
<label width="55" text="Image Hint:" />
<label width="55" text="@.image_hint" />
<combobox width="128" id="image_hint">
<listitem text="Default" value="0" />
<listitem text="Picture" value="1" />
<listitem text="Photo" value="2" />
<listitem text="Graph" value="3" />
<listitem text="@.image_hint_default" value="0" />
<listitem text="@.image_hint_picture" value="1" />
<listitem text="@.image_hint_photo" value="2" />
<listitem text="@.image_hint_graph" value="3" />
</combobox>
</hbox>
<separator horizontal="true" />
<radio group="1" text="Lossy WebP" id="lossy" tooltip="Save in simple WebP lossy format." />
<radio group="1" text="@.lossy_webp" id="lossy" tooltip="@.lossy_webp_tooltip" />
<hbox>
<label width="55" text="Quality:" />
<label width="55" text="@.quality" />
<slider min="0" max="100" id="quality" cell_align="horizontal" width="128" />
</hbox>
<hbox>
<label width="55" text="Image Preset:" />
<label width="55" text="@.image_preset" />
<combobox width="128" id="image_preset">
<listitem text="Default" value="0" />
<listitem text="Picture" value="1" />
<listitem text="Photo" value="2" />
<listitem text="Drawing" value="3" />
<listitem text="Icon" value="4" />
<listitem text="Text" value="5" />
<listitem text="@.image_preset_default" value="0" />
<listitem text="@.image_preset_picture" value="1" />
<listitem text="@.image_preset_photo" value="2" />
<listitem text="@.image_preset_drawing" value="3" />
<listitem text="@.image_preset_icon" value="4" />
<listitem text="@.image_preset_text" value="5" />
</combobox>
</hbox>
<hbox>
<boxfiller />
<hbox homogeneous="true">
<button text="&amp;OK" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="&amp;Cancel" closewindow="true" />
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />
<button text="@general.cancel" closewindow="true" />
</hbox>
</hbox>
</vbox>

View File

@ -41,7 +41,7 @@ add_custom_command(
DEPENDS gen)
list(APPEND generated_files ${output_fn})
# Generate generated_skin.h from data/skins/default/skin.xml
# Generate skin.xml.h from data/skins/default/skin.xml
set(skin_xml ${CMAKE_SOURCE_DIR}/data/skins/default/skin.xml)
set(output_fn ${CMAKE_CURRENT_BINARY_DIR}/skin.xml.h)
add_custom_command(
@ -53,6 +53,28 @@ add_custom_command(
DEPENDS gen)
list(APPEND generated_files ${output_fn})
# Generate strings.h from data/strings/en.ini
set(strings_en_ini ${CMAKE_SOURCE_DIR}/data/strings/en.ini)
set(output_fn ${CMAKE_CURRENT_BINARY_DIR}/strings.ini.h)
add_custom_command(
OUTPUT ${output_fn}
COMMAND ${CMAKE_BINARY_DIR}/bin/gen --input ${strings_en_ini} --strings > ${output_fn}.tmp
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${output_fn}.tmp ${output_fn}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
MAIN_DEPENDENCY ${strings_en_ini}
DEPENDS gen)
list(APPEND generated_files ${output_fn})
# Check translations
file(GLOB string_files ${CMAKE_SOURCE_DIR}/data/strings/*.ini)
set(output_fn ${CMAKE_CURRENT_BINARY_DIR}/check-translations.txt)
add_custom_command(
OUTPUT ${output_fn}
COMMAND ${CMAKE_BINARY_DIR}/bin/gen --widgets-dir "${CMAKE_SOURCE_DIR}/data/widgets/" --strings-dir "${CMAKE_SOURCE_DIR}/data/strings/" >${output_fn}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS gen ${widget_files} ${string_files})
list(APPEND generated_files ${output_fn})
# Directory where generated files by "gen" utility will stay.
include_directories(${CMAKE_CURRENT_BINARY_DIR})
@ -336,6 +358,7 @@ add_library(app-lib
filename_formatter.cpp
flatten.cpp
gui_xml.cpp
i18n/strings.cpp
ini_file.cpp
job.cpp
launcher.cpp

73
src/app/i18n/strings.cpp Normal file
View File

@ -0,0 +1,73 @@
// Aseprite
// Copyright (C) 2016 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "app/i18n/strings.h"
#include "app/pref/preferences.h"
#include "app/resource_finder.h"
#include "app/xml_document.h"
#include "app/xml_exception.h"
#include "base/fs.h"
#include "cfg/cfg.h"
namespace app {
// static
Strings* Strings::instance()
{
static Strings* singleton = nullptr;
if (!singleton)
singleton = new Strings();
return singleton;
}
Strings::Strings()
{
const std::string lang = Preferences::instance().general.language();
LOG("I18N: Loading strings/%s.ini file\n", lang.c_str());
ResourceFinder rf;
rf.includeDataDir(("strings/" + lang + ".ini").c_str());
if (!rf.findFirst())
throw base::Exception("strings/" + lang + ".txt was not found");
cfg::CfgFile cfg;
cfg.load(rf.filename());
std::vector<std::string> sections;
std::vector<std::string> keys;
cfg.getAllSections(sections);
for (const auto& section : sections) {
keys.clear();
cfg.getAllKeys(section.c_str(), keys);
std::string textId = section;
textId.push_back('.');
for (auto key : keys) {
textId.append(key);
m_strings[textId] = cfg.getValue(section.c_str(), key.c_str(), "");
//TRACE("I18N: Reading string %s -> %s\n", textId.c_str(), m_strings[textId].c_str());
textId.erase(section.size()+1);
}
}
}
const std::string& Strings::translate(const char* id)
{
auto it = m_strings.find(id);
if (it != m_strings.end())
return it->second;
else
return m_strings[id] = id;
}
} // namespace app

36
src/app/i18n/strings.h Normal file
View File

@ -0,0 +1,36 @@
// Aseprite
// Copyright (C) 2016 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
#ifndef APP_I18N_STRINGS_INCLUDED
#define APP_I18N_STRINGS_INCLUDED
#pragma once
#include <string>
#include <unordered_map>
#include <vector>
#include "strings.ini.h"
namespace app {
// Singleton class to load and access "strings/english.txt" file.
class Strings {
public:
static Strings* instance();
const std::string& translate(const char* id);
private:
Strings();
std::unordered_map<std::string, std::string> m_strings;
};
#define tr(id) (Strings::instance()->translate(id))
} // namespace app
#endif

View File

@ -11,6 +11,7 @@
#include "app/widget_loader.h"
#include "app/app.h"
#include "app/i18n/strings.h"
#include "app/modules/gui.h"
#include "app/resource_finder.h"
#include "app/ui/button_set.h"
@ -88,6 +89,7 @@ Widget* WidgetLoader::loadWidgetFromXmlFile(
ui::Widget* widget)
{
m_tooltipManager = NULL;
m_stringIdPrefix = widgetId;
XmlDocumentRef doc(open_xml(xmlFilename));
TiXmlHandle handle(doc.get());
@ -380,8 +382,7 @@ Widget* WidgetLoader::convertXmlElementToWidget(const TiXmlElement* elem, Widget
(middle ? MIDDLE: (bottom ? BOTTOM: TOP));
if (!widget) {
const char* text = elem->Attribute("text");
widget = new Separator(text ? text: "", align);
widget = new Separator(textAttr(elem, "text"), align);
}
else
widget->setAlign(widget->align() | align);
@ -411,13 +412,12 @@ Widget* WidgetLoader::convertXmlElementToWidget(const TiXmlElement* elem, Widget
}
else if (elem_name == "window") {
if (!widget) {
const char* text = elem->Attribute("text");
bool desktop = bool_attr_is_true(elem, "desktop");
if (desktop)
widget = new Window(Window::DesktopWindow);
else if (text)
widget = new Window(Window::WithTitleBar, text);
else if (elem->Attribute("text"))
widget = new Window(Window::WithTitleBar, textAttr(elem, "text"));
else
widget = new Window(Window::WithoutTitleBar);
}
@ -428,8 +428,7 @@ Widget* WidgetLoader::convertXmlElementToWidget(const TiXmlElement* elem, Widget
}
else if (elem_name == "dropdownbutton") {
if (!widget) {
const char* text = elem->Attribute("text");
widget = new DropDownButton(text);
widget = new DropDownButton(textAttr(elem, "text").c_str());
}
}
else if (elem_name == "buttonset") {
@ -463,7 +462,7 @@ Widget* WidgetLoader::convertXmlElementToWidget(const TiXmlElement* elem, Widget
}
if (text)
item->setText(text);
item->setText(textAttr(elem, "text"));
buttonset->addItem(item, hspan, vspan);
fillWidgetWithXmlElementAttributes(elem, root, item);
@ -505,8 +504,6 @@ Widget* WidgetLoader::convertXmlElementToWidget(const TiXmlElement* elem, Widget
void WidgetLoader::fillWidgetWithXmlElementAttributes(const TiXmlElement* elem, Widget* root, Widget* widget)
{
const char* id = elem->Attribute("id");
const char* text = elem->Attribute("text");
const char* tooltip = elem->Attribute("tooltip");
const char* tooltip_dir = elem->Attribute("tooltip_dir");
bool selected = bool_attr_is_true(elem, "selected");
bool disabled = bool_attr_is_true(elem, "disabled");
@ -534,13 +531,13 @@ void WidgetLoader::fillWidgetWithXmlElementAttributes(const TiXmlElement* elem,
if (!maxheight) maxheight = height;
}
if (id != NULL)
if (id)
widget->setId(id);
if (text)
widget->setText(text);
if (elem->Attribute("text"))
widget->setText(textAttr(elem, "text"));
if (tooltip && root) {
if (elem->Attribute("tooltip") && root) {
if (!m_tooltipManager) {
m_tooltipManager = new ui::TooltipManager();
root->addChild(m_tooltipManager);
@ -553,7 +550,8 @@ void WidgetLoader::fillWidgetWithXmlElementAttributes(const TiXmlElement* elem,
else if (strcmp(tooltip_dir, "left") == 0) dir = LEFT;
else if (strcmp(tooltip_dir, "right") == 0) dir = RIGHT;
}
m_tooltipManager->addTooltipFor(widget, tooltip, dir);
m_tooltipManager->addTooltipFor(widget, textAttr(elem, "tooltip"), dir);
}
if (selected)
@ -703,4 +701,19 @@ static int int_attr(const TiXmlElement* elem, const char* attribute_name, int de
return (value ? strtol(value, NULL, 10): default_value);
}
std::string WidgetLoader::textAttr(const TiXmlElement* elem, const char* attrName)
{
const char* value = elem->Attribute(attrName);
if (!value)
return std::string();
else if (value[0] == '@') {
if (value[1] == '.')
return Strings::instance()->translate((m_stringIdPrefix + (value+1)).c_str());
else
return Strings::instance()->translate(value+1);
}
else
return std::string(value);
}
} // namespace app

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2001-2015 David Capello
// Copyright (C) 2001-2016 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
@ -64,11 +64,13 @@ namespace app {
ui::Widget* convertXmlElementToWidget(const TiXmlElement* elem, ui::Widget* root, ui::Widget* parent, ui::Widget* widget);
void fillWidgetWithXmlElementAttributes(const TiXmlElement* elem, ui::Widget* root, ui::Widget* widget);
void fillWidgetWithXmlElementAttributesWithChildren(const TiXmlElement* elem, ui::Widget* root, ui::Widget* widget);
std::string textAttr(const TiXmlElement* elem, const char* attrName);
typedef std::map<std::string, IWidgetTypeCreator*> TypeCreatorsMap;
TypeCreatorsMap m_typeCreators;
ui::TooltipManager* m_tooltipManager;
std::string m_stringIdPrefix;
};
} // namespace app

View File

@ -16,6 +16,8 @@
#include <cstdlib>
#include <iostream>
#include <list>
#include "SimpleIni.h"
namespace cfg {
@ -26,6 +28,24 @@ public:
return m_filename;
}
void getAllSections(std::vector<std::string>& sections) const {
std::list<CSimpleIniA::Entry> sectionsList;
m_ini.GetAllSections(sectionsList);
sections.reserve(sectionsList.size());
for (const auto& section : sectionsList)
sections.push_back(section.pItem);
}
void getAllKeys(const char* section, std::vector<std::string>& keys) const {
std::list<CSimpleIniA::Entry> keysList;
if (!m_ini.GetAllKeys(section, keysList))
return;
keys.reserve(keysList.size());
for (const auto& k : keysList)
keys.push_back(k.pItem);
}
const char* getValue(const char* section, const char* name, const char* defaultValue) const {
return m_ini.GetValue(section, name, defaultValue);
}
@ -67,6 +87,7 @@ public:
base::FileHandle file(base::open_file(m_filename, "rb"));
if (file) {
m_ini.SetMultiLine();
SI_Error err = m_ini.LoadFile(file.get());
if (err != SI_OK) {
LOG(ERROR) << "CFG: Error " << err << " loading configuration from " << m_filename << "\n";
@ -104,6 +125,16 @@ const std::string& CfgFile::filename() const
return m_impl->filename();
}
void CfgFile::getAllSections(std::vector<std::string>& sections) const
{
m_impl->getAllSections(sections);
}
void CfgFile::getAllKeys(const char* section, std::vector<std::string>& keys) const
{
m_impl->getAllKeys(section, keys);
}
const char* CfgFile::getValue(const char* section, const char* name, const char* defaultValue) const
{
return m_impl->getValue(section, name, defaultValue);

View File

@ -1,5 +1,5 @@
// Aseprite Config Library
// Copyright (c) 2014 David Capello
// Copyright (c) 2014-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@ -9,6 +9,7 @@
#pragma once
#include <string>
#include <vector>
namespace cfg {
@ -19,6 +20,9 @@ namespace cfg {
const std::string& filename() const;
void getAllSections(std::vector<std::string>& sections) const;
void getAllKeys(const char* section, std::vector<std::string>& keys) const;
const char* getValue(const char* section, const char* name, const char* defaultValue) const;
bool getBoolValue(const char* section, const char* name, bool defaultValue);
int getIntValue(const char* section, const char* name, int defaultValue);

View File

@ -2,9 +2,11 @@
# Copyright (C) 2014-2016 David Capello
add_executable(gen
check_strings.cpp
gen.cpp
pref_types.cpp
skin_class.cpp
strings_class.cpp
ui_class.cpp)
if(MSVC)
@ -15,4 +17,5 @@ endif()
target_link_libraries(gen
laf-base
cfg-lib
${TINYXML_LIBRARY})

180
src/gen/check_strings.cpp Normal file
View File

@ -0,0 +1,180 @@
// Aseprite Code Generator
// Copyright (c) 2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#include "gen/check_strings.h"
#include "base/exception.h"
#include "base/file_handle.h"
#include "base/fs.h"
#include "base/split_string.h"
#include "base/string.h"
#include "base/unique_ptr.h"
#include "cfg/cfg.h"
#include "gen/common.h"
#include "tinyxml.h"
#include <cctype>
#include <iostream>
#include <stdexcept>
#include <vector>
typedef std::vector<TiXmlElement*> XmlElements;
static std::string find_first_id(TiXmlElement* elem)
{
TiXmlElement* child = elem->FirstChildElement();
while (child) {
const char* id = child->Attribute("id");
if (id)
return id;
std::string idStr = find_first_id(child);
if (!idStr.empty())
return idStr;
child = child->NextSiblingElement();
}
return "";
}
static void collect_widgets_with_strings(TiXmlElement* elem, XmlElements& widgets)
{
TiXmlElement* child = elem->FirstChildElement();
while (child) {
const char* text = child->Attribute("text");
const char* tooltip = child->Attribute("tooltip");
if (text || tooltip)
widgets.push_back(child);
collect_widgets_with_strings(child, widgets);
child = child->NextSiblingElement();
}
}
static bool has_alpha_char(const char* p)
{
while (*p) {
if (std::isalpha(*p))
return true;
else
++p;
}
return false;
}
static bool is_email(const char* p)
{
if (!*p || !std::isalpha(*p))
return false;
++p;
while (*p && (std::isalpha(*p) || *p == '.'))
++p;
if (*p != '@')
return false;
++p;
while (*p && (std::isalpha(*p) || *p == '.'))
++p;
// Return true if we are in the end of string
return (*p == 0);
}
class CheckStrings {
public:
void loadStrings(const std::string& dir) {
for (const auto& fn : base::list_files(dir)) {
cfg::CfgFile* f = new cfg::CfgFile;
f->load(base::join_path(dir, fn));
m_stringFiles.push_back(f);
}
}
void checkStringsOnWidgets(const std::string& dir) {
for (const auto& fn : base::list_files(dir)) {
std::string fullFn = base::join_path(dir, fn);
base::FileHandle inputFile(base::open_file(fullFn, "rb"));
base::UniquePtr<TiXmlDocument> doc(new TiXmlDocument());
doc->SetValue(fullFn.c_str());
if (!doc->LoadFile(inputFile.get())) {
std::cerr << doc->Value() << ":"
<< doc->ErrorRow() << ":"
<< doc->ErrorCol() << ": "
<< "error " << doc->ErrorId() << ": "
<< doc->ErrorDesc() << "\n";
throw std::runtime_error("invalid input file");
}
TiXmlHandle handle(doc);
XmlElements widgets;
m_prefixId = find_first_id(doc->RootElement());
collect_widgets_with_strings(doc->RootElement(), widgets);
for (TiXmlElement* elem : widgets) {
checkString(elem, elem->Attribute("text"));
checkString(elem, elem->Attribute("tooltip"));
}
}
}
void checkString(TiXmlElement* elem, const char* text) {
if (!text)
return; // Do nothing
else if (text[0] == '@') {
for (auto cfg : m_stringFiles) {
std::string lang = base::get_file_title(cfg->filename());
std::string section, var;
if (text[1] == '.') {
section = m_prefixId.c_str();
var = text+2;
}
else {
std::vector<std::string> parts;
base::split_string(text, parts, ".");
if (parts.size() >= 1) section = parts[0].c_str()+1;
if (parts.size() >= 2) var = parts[1];
}
const char* translated =
cfg->getValue(section.c_str(), var.c_str(), nullptr);
if (!translated || translated[0] == 0) {
std::cerr << elem->GetDocument()->Value() << ":"
<< elem->Row() << ":"
<< elem->Column() << ": "
<< "warning: <" << lang
<< "> translation for a string ID wasn't found '"
<< text << "' (" << section << "." << var << ")\n";
}
}
}
else if (has_alpha_char(text) &&
!is_email(text)) {
std::cerr << elem->GetDocument()->Value() << ":"
<< elem->Row() << ":"
<< elem->Column() << ": "
<< "warning: raw string found '"
<< text << "'\n";
}
}
private:
std::vector<cfg::CfgFile*> m_stringFiles;
std::string m_prefixId;
};
void check_strings(const std::string& widgetsDir,
const std::string& stringsDir)
{
CheckStrings cs;
cs.loadStrings(stringsDir);
cs.checkStringsOnWidgets(widgetsDir);
}

16
src/gen/check_strings.h Normal file
View File

@ -0,0 +1,16 @@
// Aseprite Code Generator
// Copyright (c) 2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef GEN_CHECK_STRINGS_H_INCLUDED
#define GEN_CHECK_STRINGS_H_INCLUDED
#pragma once
#include <string>
void check_strings(const std::string& widgetsDir,
const std::string& stringsDir);
#endif

View File

@ -8,8 +8,11 @@
#include "base/fs.h"
#include "base/program_options.h"
#include "base/string.h"
#include "gen/check_strings.h"
#include "gen/check_strings.h"
#include "gen/pref_types.h"
#include "gen/skin_class.h"
#include "gen/strings_class.h"
#include "gen/ui_class.h"
#include "tinyxml.h"
@ -21,17 +24,21 @@ static void run(int argc, const char* argv[])
{
PO po;
PO::Option& inputOpt = po.add("input").requiresValue("<filename>");
PO::Option& widgetId = po.add("widgetid").requiresValue("<filename>");
PO::Option& widgetId = po.add("widgetid").requiresValue("<id>");
PO::Option& prefH = po.add("pref-h");
PO::Option& prefCpp = po.add("pref-cpp");
PO::Option& skin = po.add("skin");
PO::Option& strings = po.add("strings");
PO::Option& widgetsDir = po.add("widgets-dir").requiresValue("<dir>");
PO::Option& stringsDir = po.add("strings-dir").requiresValue("<dir>");
po.parse(argc, argv);
// Try to load the XML file
TiXmlDocument* doc = NULL;
TiXmlDocument* doc = nullptr;
std::string inputFilename = po.value_of(inputOpt);
if (!inputFilename.empty()) {
if (!inputFilename.empty() &&
base::get_file_extension(inputFilename) == "xml") {
base::FileHandle inputFile(base::open_file(inputFilename, "rb"));
doc = new TiXmlDocument();
doc->SetValue(inputFilename.c_str());
@ -47,15 +54,29 @@ static void run(int argc, const char* argv[])
}
if (doc) {
// Generate widget class
if (po.enabled(widgetId))
gen_ui_class(doc, inputFilename, po.value_of(widgetId));
// Generate preference header file
else if (po.enabled(prefH))
gen_pref_header(doc, inputFilename);
// Generate preference c++ file
else if (po.enabled(prefCpp))
gen_pref_impl(doc, inputFilename);
// Generate skin class
else if (po.enabled(skin))
gen_skin_class(doc, inputFilename);
}
// Generate strings.ini.h file
else if (po.enabled(strings)) {
gen_strings_class(inputFilename);
}
// Check all translation files (en.ini, es.ini, etc.)
else if (po.enabled(widgetsDir) &&
po.enabled(stringsDir)) {
check_strings(po.value_of(widgetsDir),
po.value_of(stringsDir));
}
}
int main(int argc, const char* argv[])

70
src/gen/strings_class.cpp Normal file
View File

@ -0,0 +1,70 @@
// Aseprite Code Generator
// Copyright (c) 2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#include "gen/strings_class.h"
#include "base/fs.h"
#include "base/replace_string.h"
#include "base/string.h"
#include "cfg/cfg.h"
#include <iostream>
static std::string to_cpp(std::string stringId)
{
base::replace_string(stringId, ".", "_");
return stringId;
}
void gen_strings_class(const std::string& inputFn)
{
cfg::CfgFile cfg;
cfg.load(inputFn);
std::cout
<< "// Don't modify, generated file from " << inputFn << "\n"
<< "\n";
std::string fnUpper = base::string_to_upper(base::get_file_title(inputFn));
std::cout
<< "#ifndef GENERATED_" << fnUpper << "_H_INCLUDED\n"
<< "#define GENERATED_" << fnUpper << "_H_INCLUDED\n"
<< "#pragma once\n"
<< "\n"
<< "namespace app {\n"
<< "namespace gen {\n"
<< "\n"
<< " template<typename T>\n"
<< " class Strings {\n"
<< " public:\n";
std::vector<std::string> sections;
std::vector<std::string> keys;
cfg.getAllSections(sections);
for (const auto& section : sections) {
keys.clear();
cfg.getAllKeys(section.c_str(), keys);
std::string textId = section;
textId.push_back('.');
for (auto key : keys) {
textId.append(key);
std::cout << " const std::string& " << to_cpp(textId) << "() const { return static_cast<T*>(this)->translate(\"" << textId << "\"); }\n";
textId.erase(section.size()+1);
}
}
std::cout
<< " };\n"
<< "\n"
<< "} // namespace gen\n"
<< "} // namespace app\n"
<< "\n"
<< "#endif\n";
}

15
src/gen/strings_class.h Normal file
View File

@ -0,0 +1,15 @@
// Aseprite Code Generator
// Copyright (c) 2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef GEN_STRINGS_CLASS_H_INCLUDED
#define GEN_STRINGS_CLASS_H_INCLUDED
#pragma once
#include <string>
void gen_strings_class(const std::string& iniFile);
#endif

View File

@ -80,7 +80,9 @@ static std::string convert_type(const std::string& name)
throw base::Exception("unknown widget name: " + name);
}
void gen_ui_class(TiXmlDocument* doc, const std::string& inputFn, const std::string& widgetId)
void gen_ui_class(TiXmlDocument* doc,
const std::string& inputFn,
const std::string& widgetId)
{
std::cout
<< "// Don't modify, generated file from " << inputFn << "\n"
@ -133,9 +135,8 @@ void gen_ui_class(TiXmlDocument* doc, const std::string& inputFn, const std::str
<< " app::load_widget(\"" << base::get_file_name(inputFn) << "\", \"" << widgetId << "\", this);\n"
<< " app::finder(this)\n";
for (XmlElements::iterator it=widgets.begin(), end=widgets.end();
it != end; ++it) {
const char* id = (*it)->Attribute("id");
for (TiXmlElement* elem : widgets) {
const char* id = elem->Attribute("id");
std::string cppid = convert_xmlid_to_cppid(id, false);
std::cout
<< " >> \"" << id << "\" >> m_" << cppid << "\n";
@ -146,10 +147,9 @@ void gen_ui_class(TiXmlDocument* doc, const std::string& inputFn, const std::str
<< " }\n"
<< "\n";
for (XmlElements::iterator it=widgets.begin(), end=widgets.end();
it != end; ++it) {
std::string childType = convert_type((*it)->Value());
const char* id = (*it)->Attribute("id");
for (TiXmlElement* elem : widgets) {
std::string childType = convert_type(elem->Value());
const char* id = elem->Attribute("id");
std::string cppid = convert_xmlid_to_cppid(id, false);
std::cout
<< " " << childType << "* " << cppid << "() const { return m_" << cppid << "; }\n";
@ -159,10 +159,9 @@ void gen_ui_class(TiXmlDocument* doc, const std::string& inputFn, const std::str
<< "\n"
<< " private:\n";
for (XmlElements::iterator it=widgets.begin(), end=widgets.end();
it != end; ++it) {
std::string childType = convert_type((*it)->Value());
const char* id = (*it)->Attribute("id");
for (TiXmlElement* elem : widgets) {
std::string childType = convert_type(elem->Value());
const char* id = elem->Attribute("id");
std::string cppid = convert_xmlid_to_cppid(id, false);
std::cout
<< " " << childType << "* m_" << cppid << ";\n";

View File

@ -1,5 +1,5 @@
// Aseprite Code Generator
// Copyright (c) 2014 David Capello
// Copyright (c) 2014-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@ -11,6 +11,8 @@
#include <string>
#include "tinyxml.h"
void gen_ui_class(TiXmlDocument* doc, const std::string& inputFn, const std::string& widgetId);
void gen_ui_class(TiXmlDocument* doc,
const std::string& inputFn,
const std::string& widgetId);
#endif