Finalizing new locale system

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1896 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2011-01-04 20:03:02 +00:00
parent 73a4490b1d
commit f411047b04
2 changed files with 410 additions and 334 deletions

View File

@ -8,236 +8,209 @@
"key_up": "up", "key_up": "up",
"layer": "Layer", "layer": "Layer",
"more_opts": "More Options", "more_opts": "More Options",
"url": "URL" "url": "URL",
"width": "Width",
"height": "Height"
}, },
misc: { misc: {
"copyrightLabel": "Powered by" "powered_by": "Powered by" // "copyrightLabel"
}, },
ui: { ui: {
"toggle_stroke_tools": "Show/hide more stroke tools", "toggle_stroke_tools": "Show/hide more stroke tools", // "toggle_stroke_tools"
"palette": "Click to change fill color, shift-click to change stroke color", "palette_info": "Click to change fill color, shift-click to change stroke color", // "palette"
"zoom_panel": "Change zoom level" "zoom_level": "Change zoom level", // "zoom_panel"
"panel_drag": "Drag left/right to resize side panel"
}, },
properties: { properties: {
"idLabel": "Identify the element", "id": "Identify the element", // "idLabel"
"fill_color": "Change fill color", "fill_color": "Change fill color", // "fill_color"
"stroke_color": "Change stroke color", "stroke_color": "Change stroke color", // "stroke_color"
"stroke_style": "Change stroke dash style", "stroke_style": "Change stroke dash style", // "stroke_style"
"stroke_width": "Change stroke width by 1, shift-click to change by 0.1", "stroke_width": "Change stroke width by 1, shift-click to change by 0.1", // "stroke_width"
"selected_x": "Change X coordinate", "pos_x": "Change X coordinate", // "selected_x"
"selected_y": "Change Y coordinate", "pos_y": "Change Y coordinate", // "selected_y"
"linecap_butt": "Linecap: Butt", "linecap_butt": "Linecap: Butt", // "linecap_butt"
"linecap_round": "Linecap: Round", "linecap_round": "Linecap: Round", // "linecap_round"
"linecap_square": "Linecap: Square", "linecap_square": "Linecap: Square", // "linecap_square"
"linejoin_bevel": "Linejoin: Bevel", "linejoin_bevel": "Linejoin: Bevel", // "linejoin_bevel"
"linejoin_miter": "Linejoin: Miter", "linejoin_miter": "Linejoin: Miter", // "linejoin_miter"
"linejoin_round": "Linejoin: Round", "linejoin_round": "Linejoin: Round", // "linejoin_round"
"tool_angle": "Change rotation angle", "angle": "Change rotation angle", // "tool_angle"
"tool_blur": "Change gaussian blur value", "blur": "Change gaussian blur value", // "tool_blur"
"tool_opacity": "Change selected item opacity", "opacity": "Change selected item opacity", // "tool_opacity"
"circle_cx": "Change circle's cx coordinate", // "circle_cx"
"circle_cx": "Change circle's cx coordinate", "circle_cy": "Change circle's cy coordinate", // "circle_cy"
"circle_cy": "Change circle's cy coordinate", "circle_r": "Change circle's radius", // "circle_r"
"circle_r": "Change circle's radius", "ellipse_cx": "Change ellipse's cx coordinate", // "ellipse_cx"
"ellipse_cy": "Change ellipse's cy coordinate", // "ellipse_cy"
"ellipse_cx": "Change ellipse's cx coordinate", "ellipse_rx": "Change ellipse's x radius", // "ellipse_rx"
"ellipse_cy": "Change ellipse's cy coordinate", "ellipse_ry": "Change ellipse's y radius", // "ellipse_ry"
"ellipse_rx": "Change ellipse's x radius", "line_x1": "Change line's starting x coordinate", // "line_x1"
"ellipse_ry": "Change ellipse's y radius", "line_x2": "Change line's ending x coordinate", // "line_x2"
"line_y1": "Change line's starting y coordinate", // "line_y1"
"line_x1": "Change line's starting x coordinate", "line_y2": "Change line's ending y coordinate", // "line_y2"
"line_x2": "Change line's ending x coordinate", "rect_height": "Change rectangle height", // "rect_height_tool"
"line_y1": "Change line's starting y coordinate", "rect_width": "Change rectangle width", // "rect_width_tool"
"line_y2": "Change line's ending y coordinate", "corner_radius": "Change Rectangle Corner Radius", // "cornerRadiusLabel"
"image_width": "Change image width", // "image_width"
"rect_height_tool": "Change rectangle height", "image_height": "Change image height", // "image_height"
"rect_width_tool": "Change rectangle width", "image_url": "Change URL", // "image_url"
"cornerRadiusLabel": "Change Rectangle Corner Radius", "node_x": "Change node's x coordinate", // "path_node_x"
"node_y": "Change node's y coordinate", // "path_node_y"
"image_width": "Change image width", "seg_type": "Change Segment type", // "seg_type"
"image_height": "Change image height", "straight_segments": "Straight", // "straight_segments"
"image_url": "Change URL", "curve_segments": "Curve", // "curve_segments"
"text_contents": "Change text contents", // "text"
"path_node_x": "Change node's x coordinate", "font_family": "Change Font Family", // "font_family"
"path_node_y": "Change node's y coordinate", "font_size": "Change Font Size", // "tool_font_size"
"seg_type": "Change Segment type", "bold": "Bold Text", // "tool_bold"
"straight_segments": "Straight", "italic": "Italic Text" // "tool_italic"
"curve_segments": "Curve",
"text": "Change text contents",
"font_family": "Change Font Family",
"tool_font_size": "Change Font Size",
"tool_bold": "Bold Text",
"tool_italic": "Italic Text"
}, },
tools: { tools: {
"main_icon": "Main Menu", "main_menu": "Main Menu", // "main_icon"
"bkgnd_color_opac": "Change background color/opacity", // "bkgnd_color"
"bkgnd_color": "Change background color/opacity", "connector_no_arrow": "No arrow", // "connector_no_arrow"
"connector_no_arrow": "No arrow", "fitToContent": "Fit to Content", // "fitToContent"
"fit_to_all": "Fit to all content", // "fit_to_all"
"fitToContent": "Fit to Content", "fit_to_canvas": "Fit to canvas", // "fit_to_canvas"
"fit_to_all": "Fit to all content", "fit_to_layer_content": "Fit to layer content", // "fit_to_layer_content"
"fit_to_canvas": "Fit to canvas", "fit_to_sel": "Fit to selection", // "fit_to_sel"
"fit_to_layer_content": "Fit to layer content", "align_relative_to": "Align relative to ...", // "align_relative_to"
"fit_to_sel": "Fit to selection", "relativeTo": "relative to:", // "relativeToLabel"
"page": "page", // "page"
"align_relative_to": "Align relative to ...", "largest_object": "largest object", // "largest_object"
"relativeToLabel": "relative to:", "selected_objects": "selected objects", // "selected_objects"
"page": "page", "smallest_object": "smallest object", // "smallest_object"
"largest_object": "largest object", "new_doc": "New Image", // "tool_clear"
"selected_objects": "selected objects", "open_doc": "Open Image", // "tool_open"
"smallest_object": "smallest object", "export_png": "Export as PNG", // "tool_export"
"save_doc": "Save Image", // "tool_save"
"tool_clear": "New Image", "import_doc": "Import SVG", // "tool_import"
"tool_open": "Open Image", "align_to_page": "Align Element to Page", // "tool_position"
"tool_export": "Export as PNG", "align_bottom": "Align Bottom", // "tool_alignbottom"
"tool_save": "Save Image", "align_center": "Align Center", // "tool_aligncenter"
"align_left": "Align Left", // "tool_alignleft"
"align_middle": "Align Middle", // "tool_alignmiddle"
"align_right": "Align Right", // "tool_alignright"
"align_top": "Align Top", // "tool_aligntop"
"mode_select": "Select Tool", // "tool_select"
"mode_fhpath": "Pencil Tool", // "tool_fhpath"
"mode_line": "Line Tool", // "tool_line"
"mode_connect": "Connect two objects", // "tool_connect"
"mode_rect": "Rectangle Tool", // "tool_rect"
"mode_square": "Square Tool", // "tool_square"
"mode_fhrect": "Free-Hand Rectangle", // "tool_fhrect"
"mode_ellipse": "Ellipse", // "tool_ellipse"
"mode_circle": "Circle", // "tool_circle"
"mode_fhellipse": "Free-Hand Ellipse", // "tool_fhellipse"
"mode_path": "Path Tool", // "tool_path"
"mode_shapelib": "Shape library", // "tools_shapelib_show"
"mode_text": "Text Tool", // "tool_text"
"mode_image": "Image Tool", // "tool_image"
"mode_zoom": "Zoom Tool", // "tool_zoom"
"mode_eyedropper": "Eye Dropper Tool", // "tool_eyedropper"
"tool_position": "Align Element to Page", "no_embed": "NOTE: This image cannot be embedded. It will depend on this path to be displayed", // "url_notice"
"tool_alignbottom": "Align Bottom",
"tool_aligncenter": "Align Center",
"tool_alignleft": "Align Left",
"tool_alignmiddle": "Align Middle",
"tool_alignright": "Align Right",
"tool_aligntop": "Align Top",
"tool_circle": "Circle",
"tool_ellipse": "Ellipse",
"tool_fhellipse": "Free-Hand Ellipse",
"tool_fhpath": "Pencil Tool",
"tool_fhrect": "Free-Hand Rectangle",
"tool_image": "Image Tool",
"url_notice": "NOTE: This image cannot be embedded. It will depend on this path to be displayed",
"tool_line": "Line Tool",
"tool_path": "Path Tool",
"tool_select": "Select Tool",
"tool_square": "Square",
"tool_rect": "Rectangle",
"tool_text": "Text Tool",
"tool_zoom": "Zoom Tool",
"tool_undo": "Undo", "undo": "Undo", // "tool_undo"
"tool_redo": "Redo", "redo": "Redo", // "tool_redo"
"tool_source": "Edit Source", // "tool_source"
"tool_source": "Edit Source", "wireframe_mode": "Wireframe Mode", // "tool_wireframe"
"tool_wireframe": "Wireframe Mode", "toggle_grid": "Show/Hide Grid", // "view_grid"
"view_grid": "Show/Hide Grid", "clone": "Clone Element(s)", // "tool_clone"
// "tool_clone_multi": "Clone Elements", // "tool_clone_multi"
"del": "Delete Element(s)", // "tool_delete"
"tool_clone": "Clone Element", // "tool_delete_multi": "Delete Selected Elements", // "tool_delete_multi"
"tool_clone_multi": "Clone Elements", "group": "Group Elements", // "tool_group"
"tool_delete": "Delete Element", "make_link": "Make (hyper)link", // "tool_make_link"
"tool_delete_multi": "Delete Selected Elements", "set_link_url": "Set link URL (leave empty to remove)", // "tool_link_url"
"tool_group": "Group Elements", "to_path": "Convert to Path", // "tool_topath"
"tool_make_link": "Make (hyper)link", "reorient_path": "Reorient path", // "tool_reorient"
"tool_link_url": "Set link URL (leave empty to remove)", "ungroup": "Ungroup Elements", // "tool_ungroup"
"tool_topath": "Convert to Path", "docprops": "Document Properties", // "tool_docprops"
"tool_reorient": "Reorient path", "imagelib": "Image Library", // "tool_imagelib"
"tool_ungroup": "Ungroup Elements", "move_bottom": "Move to Bottom", // "tool_move_bottom"
"move_top": "Move to Top", // "tool_move_top"
"tool_docprops": "Document Properties", "node_clone": "Clone Node", // "tool_node_clone"
"tool_import": "Import SVG", "node_delete": "Delete Node", // "tool_node_delete"
"tool_imagelib": "Image Library", "node_link": "Link Control Points", // "tool_node_link"
"tool_move_bottom": "Move to Bottom", "add_subpath": "Add sub-path", // "tool_add_subpath"
"tool_move_top": "Move to Top", "openclose_path": "Open/close sub-path", // "tool_openclose_path"
"source_save": "Apply Changes", // "tool_source_save"
"tool_node_clone": "Clone Node", "cut": "Cut", // "cut"
"tool_node_delete": "Delete Node", "copy": "Copy", // "copy"
"tool_node_link": "Link Control Points", "paste": "Paste", // "paste"
"tool_add_subpath": "Add sub-path", "paste_in_place": "Paste in Place", // "paste_in_place"
"tool_openclose_path": "Open/close sub-path", "delete": "Delete", // "delete"
"group": "Group", // "group"
"tool_source_save": "Apply Changes", "move_front": "Bring to Front", // "move_front"
"move_up": "Bring Forward", // "move_up"
"tool_eyedropper": "Eye Dropper Tool", "move_down": "Send Backward", // "move_down"
"mode_connect": "Connect two objects", "move_back": "Send to Back" // "move_back"
"tools_shapelib_show": "Shape library",
"cut": "Cut",
"copy": "Copy",
"paste": "Paste",
"paste_in_place": "Paste in Place",
"delete": "Delete",
"group": "Group",
"ungroup": "Ungroup",
"move_front": "Bring to Front",
"move_up": "Bring Forward",
"move_down": "Send Backward",
"move_back": "Send to Back"
}, },
layers: { layers: {
"layersLabel": "Layers:", "layers": "Layers", // "layersLabel"
"layer_delete": "Delete Layer", "del": "Delete Layer", // "layer_delete"
"layer_down": "Move Layer Down", "move_down": "Move Layer Down", // "layer_down"
"layer_new": "New Layer", "new": "New Layer", // "layer_new"
"layer_rename": "Rename Layer", "rename": "Rename Layer", // "layer_rename"
"layer_up": "Move Layer Up", "move_up": "Move Layer Up", // "layer_up"
"dupe": "Duplicate Layer", "dupe": "Duplicate Layer", // "dupe"
"merge_down": "Merge Down", "merge_down": "Merge Down", // "merge_down"
"merge_all": "Merge All", "merge_all": "Merge All", // "merge_all"
"selLayerLabel": "Move elements to:", "move_elems_to": "Move elements to:", // "selLayerLabel"
"selLayerNames": "Move selected elements to a different layer", "move_selected": "Move selected elements to a different layer" // "selLayerNames"
"sidepanel_handle": "L a y e r s" // "title": "Drag left/right to resize side panel"},
}, },
config: { config: {
"svginfo_image_props": "Image Properties", "image_props": "Image Properties", // "svginfo_image_props"
"svginfo_title": "Title", "doc_title": "Title", // "svginfo_title"
"svginfo_dim": "Canvas Dimensions", "doc_dims": "Canvas Dimensions", // "svginfo_dim"
"svginfo_width": "Width:", // "svginfo_width": "Width:", // "svginfo_width"
"svginfo_height": "Height:", // "svginfo_height": "Height:", // "svginfo_height"
"included_images": "Included Images", // "includedImages"
"includedImages": "Included Images", "image_opt_embed": "Embed data (local files)", // "image_opt_embed"
"image_opt_embed": "Embed data (local files)", "image_opt_ref": "Use file reference", // "image_opt_ref"
"image_opt_ref": "Use file reference", "editor_prefs": "Editor Preferences", // "svginfo_editor_prefs"
"icon_size": "Icon size", // "svginfo_icons"
"svginfo_editor_prefs": "Editor Preferences", "language": "Language", // "svginfo_lang"
"svginfo_icons": "Icon size", "background": "Editor Background", // "svginfo_change_background"
"svginfo_lang": "Language", "editor_img_url": "Image URL", // "image_url"
"svginfo_change_background": "Editor Background", "editor_bg_note": "Note: Background will not be saved with image.", // "svginfo_bg_note"
"image_url": "Image URL", "icon_large": "Large", // "icon_large"
"svginfo_bg_note": "Note: Background will not be saved with image.", "icon_medium": "Medium", // "icon_medium"
"icon_large": "Large", "icon_small": "Small", // "icon_small"
"icon_medium": "Medium", "icon_xlarge": "Extra Large", // "icon_xlarge"
"icon_small": "Small", "select_predefined": "Select predefined:", // "selectedPredefined"
"icon_xlarge": "Extra Large", units_and_rulers: "Units & Rulers", // units_and_rulers
show_rulers: "Show rulers", // show_rulers
"selectedPredefined": "Select predefined:", base_unit: "Base Unit:", // base_unit
grid: "Grid", // grid
units_and_rulers: "Units & Rulers", snapping_onoff: "Snapping on/off", // snapping_onoff
show_rulers: "Show rulers", snapping_stepsize: "Snapping Step-Size:" // snapping_stepsize
base_unit: "Base Unit:",
grid: "Grid",
snapping_onoff: "Snapping on/off",
snapping_stepsize: "Snapping Step-Size:"
}, },
shape_cats: { shape_cats: {
basic: 'Basic', basic: 'Basic', // basic
object: 'Objects', object: 'Objects', // object
symbol: 'Symbols', symbol: 'Symbols', // symbol
arrow: 'Arrows', arrow: 'Arrows', // arrow
flowchart: 'Flowchart', flowchart: 'Flowchart', // flowchart
animal: 'Animals', animal: 'Animals', // animal
game: 'Cards & Chess', game: 'Cards & Chess', // game
dialog_balloon: 'Dialog balloons', dialog_balloon: 'Dialog balloons', // dialog_balloon
electronics: 'Electronics', electronics: 'Electronics', // electronics
math: 'Mathematical', math: 'Mathematical', // math
music: 'Music', music: 'Music', // music
misc: 'Miscellaneous', misc: 'Miscellaneous', // misc
raphael_1: 'raphaeljs.com set 1', raphael_1: 'raphaeljs.com set 1', // raphael_1
raphael_2: 'raphaeljs.com set 2' raphael_2: 'raphaeljs.com set 2' // raphael_2
}, },
imagelib: { imagelib: {
select_lib: 'Select an image library', select_lib: 'Select an image library', // select_lib
show_list: 'Show library list', show_list: 'Show library list', // show_list
import_single: 'Import single', import_single: 'Import single', // import_single
import_multi: 'Import multiple', import_multi: 'Import multiple', // import_multi
open: 'Open as new document' open: 'Open as new document' // open
}, },
notification: { notification: {
"invalidAttrValGiven":"Invalid value given", "invalidAttrValGiven":"Invalid value given",
@ -270,4 +243,131 @@
"key_backspace":"Backspace", "key_backspace":"Backspace",
"key_del":"Del" "key_del":"Del"
} }
}) })
/*
includedImages
layersLabel
selLayerLabel
selectedPredefined
svginfo_bg_note
svginfo_change_background
svginfo_dim
svginfo_editor_prefs
svginfo_height
svginfo_icons
svginfo_image_props
svginfo_lang
svginfo_title
svginfo_width
tool_docprops
tool_imagelib
#cmenu_layers a[href="#delete"]
Missing: #bkgnd_color
layer_delete
layer_down
layer_new
layer_rename
layer_up
selLayerNames
svginfo_title
tool_add_subpath
tool_clone
tool_clone_multi
tool_delete
tool_delete_multi
tool_group
tool_make_link
tool_link_url
tool_image
tool_line
tool_move_bottom
tool_move_top
tool_node_clone
tool_node_delete
tool_node_link
tool_openclose_path
tool_path
tool_rect
tool_reorient
tool_select
tool_square
tool_text
tool_topath
tool_ungroup
tool_wireframe
view_grid
"powered_by": "Powered by" // "copyrightLabel"
"palette_info": "Click to change fill color, shift-click to change stroke color", // "palette"
"zoom_level": "Change zoom level" // "zoom_panel"
"id": "Identify the element", // "idLabel"
"pos_x": "Change X coordinate", // "selected_x"
"pos_y": "Change Y coordinate", // "selected_y"
"angle": "Change rotation angle", // "tool_angle"
"blur": "Change gaussian blur value", // "tool_blur"
"opacity": "Change selected item opacity", // "tool_opacity"
"rect_height": "Change rectangle height", // "rect_height_tool"
"rect_width": "Change rectangle width", // "rect_width_tool"
"corner_radius": "Change Rectangle Corner Radius", // "cornerRadiusLabel"
"node_x": "Change node's x coordinate", // "path_node_x"
"node_y": "Change node's y coordinate", // "path_node_y"
"text_contents": "Change text contents", // "text"
"font_size": "Change Font Size", // "tool_font_size"
"bold": "Bold Text", // "tool_bold"
"italic": "Italic Text" // "tool_italic"
"main_menu": "Main Menu", // "main_icon"
"bkgnd_color_opac": "Change background color/opacity", // "bkgnd_color"
"relativeTo": "relative to:", // "relativeToLabel"
"new_doc": "New Image", // "tool_clear"
"open_doc": "Open Image", // "tool_open"
"export_png": "Export as PNG", // "tool_export"
"save_doc": "Save Image", // "tool_save"
"import_doc": "Import SVG", // "tool_import"
"align_to_page": "Align Element to Page", // "tool_position"
"align_bottom": "Align Bottom", // "tool_alignbottom"
"align_center": "Align Center", // "tool_aligncenter"
"align_left": "Align Left", // "tool_alignleft"
"align_middle": "Align Middle", // "tool_alignmiddle"
"align_right": "Align Right", // "tool_alignright"
"align_top": "Align Top", // "tool_aligntop"
"mode_select": "Select Tool", // "mode_select"
"mode_fhpath": "Pencil Tool", // "tool_fhpath"
"mode_line": "Line Tool", // "mode_line"
"mode_connect": "Connect two objects", // "mode_connect"
"mode_rect": "Rectangle Tool", // "mode_rect"
"mode_square": "Square Tool", // "mode_square"
"mode_fhrect": "Free-Hand Rectangle", // "tool_fhrect"
"mode_ellipse": "Ellipse", // "tool_ellipse"
"mode_circle": "Circle", // "tool_circle"
"mode_fhellipse": "Free-Hand Ellipse", // "tool_fhellipse"
"mode_path": "Path Tool", // "mode_path"
"mode_shapelib": "Shape library", // "tools_shapelib_show"
"mode_text": "Text Tool", // "mode_text"
"mode_image": "Image Tool", // "tool_image"
"mode_zoom": "Zoom Tool", // "tool_zoom"
"mode_eyedropper": "Eye Dropper Tool", // "tool_eyedropper"
"no_embed": "NOTE: This image cannot be embedded. It will depend on this path to be displayed", // "url_notice"
"undo": "Undo", // "tool_undo"
"redo": "Redo", // "tool_redo"
"included_images": "Included Images", // "includedImages"
"layers": "Layers", // "layersLabel"
"move_elems_to": "Move elements to:", // "selLayerLabel"
"move_selected": "Move selected elements to a different layer", // "selLayerNames"
"select_predefined": "Select predefined:", // "selectedPredefined"
"editor_bg_note": "Note: Background will not be saved with image.", // "svginfo_bg_note"
"background": "Editor Background", // "svginfo_change_background"
"image_props": "Image Properties", // "svginfo_image_props"
"doc_title": "Title", // "svginfo_title"
"doc_dims": "Canvas Dimensions", // "svginfo_dim"
"editor_prefs": "Editor Preferences", // "svginfo_editor_prefs"
"icon_size": "Icon size", // "svginfo_icons"
"language": "Language", // "svginfo_lang"
"editor_img_url": "Image URL", // "image_url"
*/

View File

@ -61,7 +61,7 @@ var svgEditor = (function($, Editor) {
return; return;
} }
console.log(lang_param) console.log('Lang: ' + lang_param);
// Set to English if language is not in list of good langs // Set to English if language is not in list of good langs
if($.inArray(lang_param, good_langs) == -1 && lang_param !== 'test') { if($.inArray(lang_param, good_langs) == -1 && lang_param !== 'test') {
@ -100,8 +100,7 @@ var svgEditor = (function($, Editor) {
ui = langData.ui; ui = langData.ui;
setStrings('content', { setStrings('content', {
connector_no_arrow: tools.connector_no_arrow, copyrightLabel: misc.powered_by,
copyrightLabel: misc.copyrightLabel,
curve_segments: properties.curve_segments, curve_segments: properties.curve_segments,
fitToContent: tools.fitToContent, fitToContent: tools.fitToContent,
fit_to_all: tools.fit_to_all, fit_to_all: tools.fit_to_all,
@ -115,31 +114,31 @@ var svgEditor = (function($, Editor) {
icon_xlarge: config.icon_xlarge, icon_xlarge: config.icon_xlarge,
image_opt_embed: config.image_opt_embed, image_opt_embed: config.image_opt_embed,
image_opt_ref: config.image_opt_ref, image_opt_ref: config.image_opt_ref,
includedImages: config.includedImages, includedImages: config.included_images,
largest_object: tools.largest_object, largest_object: tools.largest_object,
layersLabel: layers.layersLabel, layersLabel: layers.layers,
page: tools.page, page: tools.page,
relativeToLabel: tools.relativeToLabel, relativeToLabel: tools.relativeTo,
selLayerLabel: layers.selLayerLabel, selLayerLabel: layers.move_elems_to,
selectedPredefined: config.selectedPredefined, selectedPredefined: config.select_predefined,
selected_objects: tools.selected_objects, selected_objects: tools.selected_objects,
smallest_object: tools.smallest_object, smallest_object: tools.smallest_object,
straight_segments: properties.straight_segments, straight_segments: properties.straight_segments,
svginfo_bg_url: config.image_url + ":", svginfo_bg_url: config.editor_img_url + ":",
svginfo_bg_note: config.svginfo_bg_note, svginfo_bg_note: config.editor_bg_note,
svginfo_change_background: config.svginfo_change_background, svginfo_change_background: config.background,
svginfo_dim: config.svginfo_dim, svginfo_dim: config.doc_dims,
svginfo_editor_prefs: config.svginfo_editor_prefs, svginfo_editor_prefs: config.editor_prefs,
svginfo_height: config.svginfo_height, svginfo_height: common.height,
svginfo_icons: config.svginfo_icons, svginfo_icons: config.icon_size,
svginfo_image_props: config.svginfo_image_props, svginfo_image_props: config.image_props,
svginfo_lang: config.svginfo_lang, svginfo_lang: config.language,
svginfo_title: config.svginfo_title, svginfo_title: config.doc_title,
svginfo_width: config.svginfo_width, svginfo_width: common.width,
tool_docprops_cancel: common.cancel, tool_docprops_cancel: common.cancel,
tool_docprops_save: common.ok, tool_docprops_save: common.ok,
@ -150,15 +149,15 @@ var svgEditor = (function($, Editor) {
tool_prefs_cancel: common.cancel, tool_prefs_cancel: common.cancel,
tool_prefs_save: common.ok, tool_prefs_save: common.ok,
sidepanel_handle: layers.sidepanel_handle, sidepanel_handle: layers.layers.split('').join(' '),
tool_clear: tools.tool_clear, tool_clear: tools.new_doc,
tool_docprops: tools.tool_docprops, tool_docprops: tools.docprops,
tool_export: tools.tool_export, tool_export: tools.export_png,
tool_import: tools.tool_import, tool_import: tools.import_doc,
tool_imagelib: tools.tool_imagelib, tool_imagelib: tools.imagelib,
tool_open: tools.tool_open, tool_open: tools.open_doc,
tool_save: tools.tool_save, tool_save: tools.save_doc,
svginfo_units_rulers: config.units_and_rulers, svginfo_units_rulers: config.units_and_rulers,
svginfo_rulers_onoff: config.show_rulers, svginfo_rulers_onoff: config.show_rulers,
@ -188,37 +187,36 @@ var svgEditor = (function($, Editor) {
opts['#cmenu_canvas a[href="#' + this + '"]'] = tools[this]; opts['#cmenu_canvas a[href="#' + this + '"]'] = tools[this];
}); });
$.each(['dupe','delete','merge_down', 'merge_all'], function() { $.each(['dupe','merge_down', 'merge_all'], function() {
opts['#cmenu_layers a[href="#' + this + '"]'] = layers[this]; opts['#cmenu_layers a[href="#' + this + '"]'] = layers[this];
}); });
opts['#cmenu_layers a[href="#delete"]'] = layers.layer_delete; opts['#cmenu_layers a[href="#delete"]'] = layers.del;
setStrings('content', opts); setStrings('content', opts);
setStrings('title', { setStrings('title', {
align_relative_to: tools.align_relative_to, align_relative_to: tools.align_relative_to,
bkgnd_color: tools.bkgnd_color,
circle_cx: properties.circle_cx, circle_cx: properties.circle_cx,
circle_cy: properties.circle_cy, circle_cy: properties.circle_cy,
circle_r: properties.circle_r, circle_r: properties.circle_r,
cornerRadiusLabel: properties.cornerRadiusLabel, cornerRadiusLabel: properties.corner_radius,
ellipse_cx: properties.ellipse_cx, ellipse_cx: properties.ellipse_cx,
ellipse_cy: properties.ellipse_cy, ellipse_cy: properties.ellipse_cy,
ellipse_rx: properties.ellipse_rx, ellipse_rx: properties.ellipse_rx,
ellipse_ry: properties.ellipse_ry, ellipse_ry: properties.ellipse_ry,
fill_color: properties.fill_color, fill_color: properties.fill_color,
font_family: properties.font_family, font_family: properties.font_family,
idLabel: properties.idLabel, idLabel: properties.id,
image_height: properties.image_height, image_height: properties.image_height,
image_url: properties.image_url, image_url: properties.image_url,
image_width: properties.image_width, image_width: properties.image_width,
layer_delete: layers.layer_delete, layer_delete: layers.del,
layer_down: layers.layer_down, layer_down: layers.move_down,
layer_new: layers.layer_new, layer_new: layers['new'],
layer_rename: layers.layer_rename, layer_rename: layers.rename,
layer_moreopts: common.more_opts, layer_moreopts: common.more_opts,
layer_up: layers.layer_up, layer_up: layers.move_up,
line_x1: properties.line_x1, line_x1: properties.line_x1,
line_x2: properties.line_x2, line_x2: properties.line_x2,
line_y1: properties.line_y1, line_y1: properties.line_y1,
@ -229,102 +227,80 @@ var svgEditor = (function($, Editor) {
linejoin_bevel: properties.linejoin_bevel, linejoin_bevel: properties.linejoin_bevel,
linejoin_miter: properties.linejoin_miter, linejoin_miter: properties.linejoin_miter,
linejoin_round: properties.linejoin_round, linejoin_round: properties.linejoin_round,
main_icon: tools.main_icon, main_icon: tools.main_menu,
mode_connect: tools.mode_connect, mode_connect: tools.mode_connect,
tools_shapelib_show: tools.tools_shapelib_show, tools_shapelib_show: tools.mode_shapelib,
palette: ui.palette, palette: ui.palette_info,
zoom_panel: ui.zoom_panel, zoom_panel: ui.zoom_level,
path_node_x: properties.path_node_x, path_node_x: properties.node_x,
path_node_y: properties.path_node_y, path_node_y: properties.node_y,
rect_height_tool: properties.rect_height_tool, rect_height_tool: properties.rect_height,
rect_width_tool: properties.rect_width_tool, rect_width_tool: properties.rect_width,
seg_type: properties.seg_type, seg_type: properties.seg_type,
selLayerNames: layers.selLayerNames, selLayerNames: layers.move_selected,
selected_x: properties.selected_x, selected_x: properties.pos_x,
selected_y: properties.selected_y, selected_y: properties.pos_y,
stroke_color: properties.stroke_color, stroke_color: properties.stroke_color,
stroke_style: properties.stroke_style, stroke_style: properties.stroke_style,
stroke_width: properties.stroke_width, stroke_width: properties.stroke_width,
svginfo_title: config.svginfo_title, svginfo_title: config.doc_title,
text: properties.text, text: properties.text_contents,
toggle_stroke_tools: ui.toggle_stroke_tools, toggle_stroke_tools: ui.toggle_stroke_tools,
tool_add_subpath: tools.tool_add_subpath, tool_add_subpath: tools.add_subpath,
tool_alignbottom: tools.tool_alignbottom, tool_alignbottom: tools.align_bottom,
tool_aligncenter: tools.tool_aligncenter, tool_aligncenter: tools.align_center,
tool_alignleft: tools.tool_alignleft, tool_alignleft: tools.align_left,
tool_alignmiddle: tools.tool_alignmiddle, tool_alignmiddle: tools.align_middle,
tool_alignright: tools.tool_alignright, tool_alignright: tools.align_right,
tool_aligntop: tools.tool_aligntop, tool_aligntop: tools.align_top,
tool_angle: properties.tool_angle, tool_angle: properties.angle,
tool_blur: properties.tool_blur, tool_blur: properties.blur,
tool_bold: properties.tool_bold, tool_bold: properties.bold,
tool_circle: tools.tool_circle, tool_circle: tools.mode_circle,
tool_clone: tools.tool_clone, tool_clone: tools.clone,
tool_clone_multi: tools.tool_clone_multi, tool_clone_multi: tools.clone,
tool_delete: tools.tool_delete, tool_delete: tools.del,
tool_delete_multi: tools.tool_delete_multi, tool_delete_multi: tools.del,
tool_ellipse: tools.tool_ellipse, tool_ellipse: tools.mode_ellipse,
tool_eyedropper: tools.tool_eyedropper, tool_eyedropper: tools.mode_eyedropper,
tool_fhellipse: tools.tool_fhellipse, tool_fhellipse: tools.mode_fhellipse,
tool_fhpath: tools.tool_fhpath, tool_fhpath: tools.mode_fhpath,
tool_fhrect: tools.tool_fhrect, tool_fhrect: tools.mode_fhrect,
tool_font_size: properties.tool_font_size, tool_font_size: properties.font_size,
tool_group: tools.tool_group, tool_group: tools.group,
tool_make_link: tools.tool_make_link, tool_make_link: tools.make_link,
tool_link_url: tools.tool_link_url, tool_link_url: tools.set_link_url,
tool_image: tools.tool_image, tool_image: tools.mode_image,
tool_italic: properties.tool_italic, tool_italic: properties.italic,
tool_line: tools.tool_line, tool_line: tools.mode_line,
tool_move_bottom: tools.tool_move_bottom, tool_move_bottom: tools.move_bottom,
tool_move_top: tools.tool_move_top, tool_move_top: tools.move_top,
tool_node_clone: tools.tool_node_clone, tool_node_clone: tools.node_clone,
tool_node_delete: tools.tool_node_delete, tool_node_delete: tools.node_delete,
tool_node_link: tools.tool_node_link, tool_node_link: tools.node_link,
tool_opacity: properties.tool_opacity, tool_opacity: properties.opacity,
tool_openclose_path: tools.tool_openclose_path, tool_openclose_path: tools.openclose_path,
tool_path: tools.tool_path, tool_path: tools.mode_path,
tool_position: tools.tool_position, tool_position: tools.align_to_page,
tool_rect: tools.tool_rect, tool_rect: tools.mode_rect,
tool_redo: tools.tool_redo, tool_redo: tools.redo,
tool_reorient: tools.tool_reorient, tool_reorient: tools.reorient_path,
tool_select: tools.tool_select, tool_select: tools.mode_select,
tool_source: tools.tool_source, tool_source: tools.source_save,
tool_square: tools.tool_square, tool_square: tools.mode_square,
tool_text: tools.tool_text, tool_text: tools.mode_text,
tool_topath: tools.tool_topath, tool_topath: tools.to_path,
tool_undo: tools.tool_undo, tool_undo: tools.undo,
tool_ungroup: tools.tool_ungroup, tool_ungroup: tools.ungroup,
tool_wireframe: tools.tool_wireframe, tool_wireframe: tools.wireframe_mode,
view_grid: tools.view_grid, view_grid: tools.toggle_grid,
tool_zoom: tools.tool_zoom, tool_zoom: tools.mode_zoom,
url_notice: tools.url_notice url_notice: tools.no_embed
} }
, true); , true);
Editor.setLang(lang_param, langData); Editor.setLang(lang_param, langData);
// $.each(langData, function(i, data) {
// if(data.id) {
// var elem = $('#svg_editor').parent().find('#'+data.id)[0];
// if(elem) {
// if(data.title)
// elem.title = data.title;
// if(data.textContent) {
// // Only replace non-empty text nodes, not elements
// $.each(elem.childNodes, function(j, node) {
// if(node.nodeType == 3 && $.trim(node.textContent)) {
// node.textContent = data.textContent;
// }
// });
// }
// }
// } else if(data.js_strings) {
// js_strings = data.js_strings;
// }
// });
} }
$.ajax({ $.ajax({