summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/attributes/css_defaults4
-rw-r--r--share/attributes/cssprops66
-rwxr-xr-xshare/attributes/genMapDataCSS.pl18
-rwxr-xr-xshare/attributes/genMapDataSVG.pl5
-rw-r--r--share/attributes/svgprops74
-rw-r--r--share/extensions/color_HSL_adjust.inx6
-rwxr-xr-xshare/extensions/convert2dashes.py9
-rwxr-xr-xshare/extensions/dimension.py16
-rwxr-xr-xshare/extensions/draw_from_triangle.py13
-rwxr-xr-xshare/extensions/dxf_outlines.py14
-rwxr-xr-xshare/extensions/embedimage.py14
-rwxr-xr-xshare/extensions/export_gimp_palette.py12
-rwxr-xr-xshare/extensions/extractimage.py9
-rwxr-xr-xshare/extensions/extrude.py9
-rwxr-xr-xshare/extensions/funcplot.py10
-rwxr-xr-xshare/extensions/gcodetools.py14
-rwxr-xr-xshare/extensions/generate_voronoi.py14
-rwxr-xr-xshare/extensions/gimp_xcf.py7
-rwxr-xr-xshare/extensions/guides_creator.py14
-rwxr-xr-xshare/extensions/guillotine.py18
-rwxr-xr-xshare/extensions/inkex.py59
-rwxr-xr-xshare/extensions/interp_att_g.py12
-rwxr-xr-xshare/extensions/jessyInk_autoTexts.py3
-rwxr-xr-xshare/extensions/jessyInk_effects.py3
-rwxr-xr-xshare/extensions/jessyInk_export.py4
-rwxr-xr-xshare/extensions/jessyInk_keyBindings.py4
-rwxr-xr-xshare/extensions/jessyInk_masterSlide.py4
-rwxr-xr-xshare/extensions/jessyInk_mouseHandler.py4
-rwxr-xr-xshare/extensions/jessyInk_summary.py6
-rwxr-xr-xshare/extensions/jessyInk_transitions.py4
-rwxr-xr-xshare/extensions/jessyInk_video.py4
-rwxr-xr-xshare/extensions/jessyInk_view.py4
-rwxr-xr-xshare/extensions/launch_webbrowser.py7
-rwxr-xr-xshare/extensions/markers_strokepaint.py11
-rwxr-xr-xshare/extensions/pathalongpath.py19
-rwxr-xr-xshare/extensions/pathmodifier.py16
-rwxr-xr-xshare/extensions/pathscatter.py20
-rwxr-xr-xshare/extensions/perspective.py46
-rwxr-xr-xshare/extensions/polyhedron_3d.py15
-rw-r--r--share/extensions/print_win32_vector.py12
-rwxr-xr-xshare/extensions/render_alphabetsoup.py17
-rwxr-xr-xshare/extensions/render_barcode_datamatrix.py8
-rwxr-xr-xshare/extensions/replace_font.py7
-rwxr-xr-xshare/extensions/summersnight.py7
-rwxr-xr-xshare/extensions/svg_and_media_zip_output.py11
-rwxr-xr-xshare/extensions/uniconv-ext.py15
-rwxr-xr-xshare/extensions/uniconv_output.py6
-rwxr-xr-xshare/extensions/voronoi2svg.py14
-rwxr-xr-xshare/extensions/web-set-att.py6
-rwxr-xr-xshare/extensions/web-transmit-att.py6
-rwxr-xr-xshare/extensions/webslicer_create_group.py5
-rwxr-xr-xshare/extensions/webslicer_create_rect.py5
-rwxr-xr-xshare/extensions/webslicer_export.py10
-rwxr-xr-xshare/extensions/wireframe_sphere.py12
-rw-r--r--share/filters/filters.svg2
55 files changed, 433 insertions, 301 deletions
diff --git a/share/attributes/css_defaults b/share/attributes/css_defaults
index 7308a8f0c..1de1e96c1 100644
--- a/share/attributes/css_defaults
+++ b/share/attributes/css_defaults
@@ -108,12 +108,16 @@
"stroke-width" - "1" - "yes"
+"text-align" - "start" - "yes"
+
"text-anchor" - "start" - "yes"
"text-decoration" - "NO_DEFAULT" - "no"
"text-rendering" - "auto" - "yes"
+"title" - "NO DEFAULT" - "no"
+
"unicode-bidi" - "normal" - "no"
"visibility" - "visible" - "yes"
diff --git a/share/attributes/cssprops b/share/attributes/cssprops
index 7eeb70fe3..1aca8fa43 100644
--- a/share/attributes/cssprops
+++ b/share/attributes/cssprops
@@ -8,7 +8,7 @@
"clip-rule" - "circle","ellipse","image","line","path","polygon","polyline","rect","text","use","clip-path","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"color" - "altGlyph","textPath","text","tref","tspan","path","rect","circle","ellipse","line","polyline","polygon","stop","feFlood","feDiffuseLighting","feSpecularLighting","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"color" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","path","rect","circle","ellipse","line","polyline","polygon","stop","feFlood","feDiffuseLighting","feSpecularLighting","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"color-interpolation" - "a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","animateColor"
@@ -20,19 +20,19 @@
"cursor" - "a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use","circle","ellipse","image","line","path","polygon","polyline","rect","text","use"
-"direction" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"direction" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"display" - "svg","g","switch","a","foreignObject","text","tspan","tref","altGlyph","textPath","circle","ellipse","image","line","path","polygon","polyline","rect","text","use"
-"dominant-baseline" - "altGlyph","textPath","text","tref","tspan"
+"dominant-baseline" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan"
"enable-background" - "a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"fill" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"fill" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"fill-opacity" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"fill-opacity" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"fill-rule" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"fill-rule" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"filter" - "a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use","circle","ellipse","image","line","path","polygon","polyline","rect","text","use"
@@ -40,35 +40,35 @@
"flood-opacity" - "feFlood"
-"font" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-family" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-family" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-size" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-size" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-size-adjust" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-size-adjust" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-stretch" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-stretch" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-style" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-style" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-variant" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-variant" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-weight" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-weight" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"glyph-orientation-horizontal" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"glyph-orientation-horizontal" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"glyph-orientation-vertical" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"glyph-orientation-vertical" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"image-rendering" - "pattern","image","feImage","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"kerning" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"kerning" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"letter-spacing" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"letter-spacing" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"lighting-color" - "feDiffuseLighting","feSpecularLighting"
-"line-height" - "text"
+"line-height" - "text","flowRoot","flowPara"
"marker" - "path","line","polyline","polygon","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
@@ -92,33 +92,37 @@
"stop-opacity" - "stop"
-"stroke" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-dasharray" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-dasharray" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-dashoffset" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-dashoffset" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-linecap" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-linecap" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-linejoin" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-linejoin" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-miterlimit" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-miterlimit" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-opacity" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-opacity" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-width" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-width" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"text-anchor" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"text-align" - "flowRoot","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"text-decoration" - "altGlyph","textPath","text","tref","tspan"
+"text-anchor" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+
+"text-decoration" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan"
"text-rendering" - "text","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"unicode-bidi" - "altGlyph","textPath","text","tref","tspan"
+"title" - "circle","ellipse","image","line","path","polygon","polyline","rect","text","use","g"
+
+"unicode-bidi" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan"
"visibility" - "text","tspan","tref","altGlyph","textPath","a","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"word-spacing" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"word-spacing" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"writing-mode" - "text","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
diff --git a/share/attributes/genMapDataCSS.pl b/share/attributes/genMapDataCSS.pl
index 498ce8bbe..76580c642 100755
--- a/share/attributes/genMapDataCSS.pl
+++ b/share/attributes/genMapDataCSS.pl
@@ -16,12 +16,14 @@ use HTML::TokeParser;
# Groups of elements defined in spec.
# Note "use" is not a container element but it acts like one!
+# Note "flowRoot, flowPara, flowSpan, flowRegion, and flowRect are Inkscape
+# specific (failed SVG1.2 items)
my @container_elements = ("a", "defs", "glyph", "g", "marker", "mask", "missing-glyph", "pattern", "svg", "switch", "symbol", "use");
my @graphics_elements = ("circle", "ellipse", "image", "line", "path", "polygon", "polyline", "rect", "text", "use");
my @filter_primitives = ("feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix",
"feDiffuseLighting", "feDisplacementMap", "feFlood", "feGaussianBlur", "feImage",
"feMerge", "feMorphology", "feOffset", "feSpecularLighting", "feTile", "feTurbulence" );
-my @text_content_elements = ("altGlyph", "textPath", "text", "tref", "tspan");
+my @text_content_elements = ("altGlyph", "textPath", "text", "tref", "tspan", "flowRoot", "flowPara", "flowSpan");
my @shapes = ("path", "rect", "circle", "ellipse", "line", "polyline", "polygon");
my @viewport = ("svg", "symbol", "foreignObject" );
@@ -154,6 +156,11 @@ push @{$properties{ "display" }->{elements}}, @graphics_elements;
push @{$properties{ "image-rendering" }->{elements}}, "pattern", "image", "feImage";
+# "title" isn't in the SVG spec (except for style sheets) but it is commonly supported by browsers
+push @{$properties{ "title" }->{elements}}, @graphics_elements, "g";
+$properties{ "title" }->{default} = "NO DEFAULT";
+$properties{ "title" }->{inherit} = "no";
+
push @{$properties{ "visibility" }->{elements}}, @graphics_elements;
@@ -166,10 +173,17 @@ $properties{ "marker-mid" }->{inherit} = $properties{ "marker-start" }->{inherit
# Inkscape uses CSS property 'line-height' even though this is not part of SVG spec.
-push @{$properties{ "line-height" }->{elements}}, "text";
+push @{$properties{ "line-height" }->{elements}}, "text", "flowRoot", "flowPara";
$properties{ "line-height" }->{default} = "NO DEFAULT";
$properties{ "line-height" }->{inherit} = "no";
+# Inkscape uses CSS property 'text-align' for flowed text. It is not an SVG 1.1 property
+# but is found in SVG 1.2 Tiny.
+push @{$properties{ "text-align" }->{elements}}, "flowRoot";
+$properties{ "text-align" }->{default} = "start";
+$properties{ "text-align" }->{inherit} = "yes";
+
+
# Output
open( DEFAULTS, ">css_defaults_new" ) or die "Couldn't open output";
diff --git a/share/attributes/genMapDataSVG.pl b/share/attributes/genMapDataSVG.pl
index a84ca0d48..1dd9327e3 100755
--- a/share/attributes/genMapDataSVG.pl
+++ b/share/attributes/genMapDataSVG.pl
@@ -78,6 +78,11 @@ while( my $t = $p->get_token ) {
# Adjustments
push @{$attributes{ "in" }->{elements}}, "feMergeNode";
+push @{$attributes{ "class" }->{elements}}, "flowRoot","flowPara","flowSpan","flowRect","flowRegion";
+push @{$attributes{ "id" }->{elements}}, "flowRoot","flowPara","flowSpan","flowRect","flowRegion";
+push @{$attributes{ "style" }->{elements}}, "flowRoot","flowPara","flowSpan","flowRect","flowRegion";
+push @{$attributes{ "xml:space" }->{elements}}, "flowRoot","flowPara","flowSpan";
+
# Output
diff --git a/share/attributes/svgprops b/share/attributes/svgprops
index 83a6b8dc1..1de16b6a5 100644
--- a/share/attributes/svgprops
+++ b/share/attributes/svgprops
@@ -34,7 +34,7 @@
"cap-height" - "font-face"
-"class" - "a","altGlyph","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","font","foreignObject","g","glyph","glyphRef","image","line","linearGradient","marker","mask","missing-glyph","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","title","tref","tspan","use"
+"class" - "a","altGlyph","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","font","foreignObject","g","glyph","glyphRef","image","line","linearGradient","marker","mask","missing-glyph","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","title","tref","tspan","use","flowRoot","flowPara","flowSpan","flowRect","flowRegion"
"clipPathUnits" - "clipPath"
@@ -118,7 +118,7 @@
"horiz-origin-y" - "font"
-"id" - "a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"
+"id" - "a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern","flowRoot","flowPara","flowSpan","flowRect","flowRegion"
"ideographic" - "font-face"
@@ -320,7 +320,7 @@
"string" - "font-face-format"
-"style" - "a","altGlyph","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","font","foreignObject","g","glyph","glyphRef","image","line","linearGradient","marker","mask","missing-glyph","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","title","tref","tspan","use"
+"style" - "a","altGlyph","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","font","foreignObject","g","glyph","glyphRef","image","line","linearGradient","marker","mask","missing-glyph","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","title","tref","tspan","use","flowRoot","flowPara","flowSpan","flowRect","flowRegion"
"surfaceScale" - "feDiffuseLighting","feSpecularLighting"
@@ -412,7 +412,7 @@
"xml:lang" - "a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"
-"xml:space" - "a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"
+"xml:space" - "a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern","flowRoot","flowPara","flowSpan"
"y" - "altGlyph","cursor","fePointLight","feSpotLight","filter","foreignObject","glyphRef","image","pattern","rect","svg","text","use","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","mask","tref","tspan"
@@ -436,7 +436,7 @@
"clip-rule" - "circle","ellipse","image","line","path","polygon","polyline","rect","text","use","clip-path","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"color" - "altGlyph","textPath","text","tref","tspan","path","rect","circle","ellipse","line","polyline","polygon","stop","feFlood","feDiffuseLighting","feSpecularLighting","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"color" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","path","rect","circle","ellipse","line","polyline","polygon","stop","feFlood","feDiffuseLighting","feSpecularLighting","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"color-interpolation" - "a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","animateColor"
@@ -448,19 +448,19 @@
"cursor" - "a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use","circle","ellipse","image","line","path","polygon","polyline","rect","text","use"
-"direction" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"direction" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"display" - "svg","g","switch","a","foreignObject","text","tspan","tref","altGlyph","textPath","circle","ellipse","image","line","path","polygon","polyline","rect","text","use"
-"dominant-baseline" - "altGlyph","textPath","text","tref","tspan"
+"dominant-baseline" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan"
"enable-background" - "a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"fill" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"fill" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"fill-opacity" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"fill-opacity" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"fill-rule" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"fill-rule" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"filter" - "a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use","circle","ellipse","image","line","path","polygon","polyline","rect","text","use"
@@ -468,35 +468,35 @@
"flood-opacity" - "feFlood"
-"font" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-family" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-family" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-size" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-size" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-size-adjust" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-size-adjust" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-stretch" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-stretch" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-style" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-style" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-variant" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-variant" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"font-weight" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"font-weight" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"glyph-orientation-horizontal" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"glyph-orientation-horizontal" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"glyph-orientation-vertical" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"glyph-orientation-vertical" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"image-rendering" - "pattern","image","feImage","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"kerning" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"kerning" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"letter-spacing" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"letter-spacing" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"lighting-color" - "feDiffuseLighting","feSpecularLighting"
-"line-height" - "text"
+"line-height" - "text","flowRoot","flowPara"
"marker" - "path","line","polyline","polygon","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
@@ -520,33 +520,37 @@
"stop-opacity" - "stop"
-"stroke" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-dasharray" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-dasharray" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-dashoffset" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-dashoffset" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-linecap" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-linecap" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-linejoin" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-linejoin" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-miterlimit" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-miterlimit" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-opacity" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-opacity" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"stroke-width" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"stroke-width" - "path","rect","circle","ellipse","line","polyline","polygon","altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"text-anchor" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"text-align" - "flowRoot","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"text-decoration" - "altGlyph","textPath","text","tref","tspan"
+"text-anchor" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+
+"text-decoration" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan"
"text-rendering" - "text","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"unicode-bidi" - "altGlyph","textPath","text","tref","tspan"
+"title" - "circle","ellipse","image","line","path","polygon","polyline","rect","text","use","g"
+
+"unicode-bidi" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan"
"visibility" - "text","tspan","tref","altGlyph","textPath","a","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
-"word-spacing" - "altGlyph","textPath","text","tref","tspan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
+"word-spacing" - "altGlyph","textPath","text","tref","tspan","flowRoot","flowPara","flowSpan","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
"writing-mode" - "text","a","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","use"
diff --git a/share/extensions/color_HSL_adjust.inx b/share/extensions/color_HSL_adjust.inx
index 4c0330f53..b5a18c419 100644
--- a/share/extensions/color_HSL_adjust.inx
+++ b/share/extensions/color_HSL_adjust.inx
@@ -8,11 +8,11 @@
<param name="tab" type="notebook">
<page name="Options" _gui-text="Options">
<param name="hue" type="int" appearance="full" min="-360" max="360" indent="0" _gui-text="Hue (°):">0</param>
- <param name="random_h" type="boolean" _gui-text="Ramdom hue">false</param>
+ <param name="random_h" type="boolean" _gui-text="Random hue">false</param>
<param name="saturation" type="int" appearance="full" min="-100" max="100" indent="0" _gui-text="Saturation (%):">0</param>
- <param name="random_s" type="boolean" _gui-text="Ramdom saturation">false</param>
+ <param name="random_s" type="boolean" _gui-text="Random saturation">false</param>
<param name="lightness" type="int" appearance="full" min="-100" max="100" indent="0" _gui-text="Lightness (%):">0</param>
- <param name="random_l" type="boolean" _gui-text="Ramdom lightness">false</param>
+ <param name="random_l" type="boolean" _gui-text="Random lightness">false</param>
</page>
<page name="Help" _gui-text="Help">
<_param name="instructions" type="description" xml:space="preserve">Adjusts hue, saturation and lightness in the HSL representation of the selected objects's color.
diff --git a/share/extensions/convert2dashes.py b/share/extensions/convert2dashes.py
index cf42a078a..9e7f6d439 100755
--- a/share/extensions/convert2dashes.py
+++ b/share/extensions/convert2dashes.py
@@ -20,10 +20,13 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
+# local library
+import inkex
+import cubicsuperpath
+import bezmisc
+import simplestyle
-import inkex, cubicsuperpath, bezmisc, simplestyle
-import gettext
-_ = gettext.gettext
+inkex.localize()
def tpoint((x1,y1), (x2,y2), t = 0.5):
return [x1+t*(x2-x1),y1+t*(y2-y1)]
diff --git a/share/extensions/dimension.py b/share/extensions/dimension.py
index 9156fdc2c..4285effeb 100755
--- a/share/extensions/dimension.py
+++ b/share/extensions/dimension.py
@@ -32,16 +32,19 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-import sys, inkex, pathmodifier
-from simpletransform import *
-import gettext
-_ = gettext.gettext
-
+# standard library
+import sys
try:
from subprocess import Popen, PIPE
bsubprocess = True
except:
bsubprocess = False
+# local library
+import inkex
+import pathmodifier
+from simpletransform import *
+
+inkex.localize()
class Dimension(pathmodifier.PathModifier):
def __init__(self):
@@ -127,7 +130,8 @@ class Dimension(pathmodifier.PathModifier):
try:
testing_the_water = self.bbox[0]
except TypeError:
- sys.exit(_('Unable to process this object. Try changing it into a path first.'))
+ inkex.errormsg(_('Unable to process this object. Try changing it into a path first.'))
+ exit()
layer = self.current_layer
diff --git a/share/extensions/draw_from_triangle.py b/share/extensions/draw_from_triangle.py
index 124824528..414363e86 100755
--- a/share/extensions/draw_from_triangle.py
+++ b/share/extensions/draw_from_triangle.py
@@ -30,12 +30,15 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-
-import inkex
-import simplestyle, sys, simplepath
+# standard library
+import sys
from math import *
-import gettext
-_ = gettext.gettext
+# local library
+import inkex
+import simplestyle
+import simplepath
+
+inkex.localize()
#DRAWING ROUTINES
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py
index a5ff0f012..fd01e83e9 100755
--- a/share/extensions/dxf_outlines.py
+++ b/share/extensions/dxf_outlines.py
@@ -30,9 +30,17 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-import inkex, simplestyle, simpletransform, cubicsuperpath, coloreffect, dxf_templates, math
-import gettext
-_ = gettext.gettext
+# standard library
+import math
+# local library
+import inkex
+import simplestyle
+import simpletransform
+import cubicsuperpath
+import coloreffect
+import dxf_templates
+
+inkex.localize()
try:
from numpy import *
diff --git a/share/extensions/embedimage.py b/share/extensions/embedimage.py
index 882455cb0..159c3c152 100755
--- a/share/extensions/embedimage.py
+++ b/share/extensions/embedimage.py
@@ -16,10 +16,16 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
+# standard library
+import base64
+import os
+import sys
+import urllib
+import urlparse
+# local library
+import inkex
-import inkex, os, base64, urlparse, urllib
-import gettext
-_ = gettext.gettext
+inkex.localize()
class Embedder(inkex.Effect):
def __init__(self):
@@ -74,7 +80,7 @@ class Embedder(inkex.Effect):
if (not os.path.isfile(path)):
inkex.errormsg(_('No xlink:href or sodipodi:absref attributes found, or they do not point to an existing file! Unable to embed image.'))
if path:
- inkex.errormsg(_("Sorry we could not locate %s") % path)
+ inkex.errormsg(_("Sorry we could not locate %s") % str(path))
if (os.path.isfile(path)):
file = open(path,"rb").read()
diff --git a/share/extensions/export_gimp_palette.py b/share/extensions/export_gimp_palette.py
index b9d6a1059..25856f4b4 100755
--- a/share/extensions/export_gimp_palette.py
+++ b/share/extensions/export_gimp_palette.py
@@ -7,11 +7,19 @@ Warranty: see above
DOCNAME='sodipodi:docname'
-import sys, simplestyle
+# standard library
+import sys
+# third party
try:
from xml.dom.minidom import parse
except:
- sys.exit(_('The export_gpl.py module requires PyXML. Please download the latest version from http://pyxml.sourceforge.net/.'))
+ inkex.errormsg(_('The export_gpl.py module requires PyXML. Please download the latest version from http://pyxml.sourceforge.net/.'))
+ sys.exit()
+# local library
+import inkex
+import simplestyle
+
+inkex.localize()
colortags=(u'fill',u'stroke',u'stop-color',u'flood-color',u'lighting-color')
colors={}
diff --git a/share/extensions/extractimage.py b/share/extensions/extractimage.py
index d5cf285c8..62dc83c87 100755
--- a/share/extensions/extractimage.py
+++ b/share/extensions/extractimage.py
@@ -16,10 +16,13 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
+# standard library
+import base64
+import os
+# local library
+import inkex
-import inkex, base64, os
-import gettext
-_ = gettext.gettext
+inkex.localize()
class MyEffect(inkex.Effect):
def __init__(self):
diff --git a/share/extensions/extrude.py b/share/extensions/extrude.py
index 0720ee24b..c91ea645e 100755
--- a/share/extensions/extrude.py
+++ b/share/extensions/extrude.py
@@ -16,10 +16,13 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
+# local library
+import inkex
+import simplepath
+import simpletransform
+import cubicsuperpath
-import inkex, simplepath, simpletransform, cubicsuperpath
-import gettext
-_ = gettext.gettext
+inkex.localize()
class Extrude(inkex.Effect):
def __init__(self):
diff --git a/share/extensions/funcplot.py b/share/extensions/funcplot.py
index a868e92a4..a3a810028 100755
--- a/share/extensions/funcplot.py
+++ b/share/extensions/funcplot.py
@@ -25,11 +25,15 @@ Changes:
* 21-Jun-2007: Tavmjong: Added polar coordinates
'''
-import inkex, simplepath, simplestyle
+# standard library
from math import *
from random import *
-import gettext
-_ = gettext.gettext
+# local library
+import inkex
+import simplepath
+import simplestyle
+
+inkex.localize()
def drawfunction(xstart, xend, ybottom, ytop, samples, width, height, left, bottom,
fx = "sin(x)", fpx = "cos(x)", fponum = True, times2pi = False, polar = False, isoscale = True, drawaxis = True, endpts = False):
diff --git a/share/extensions/gcodetools.py b/share/extensions/gcodetools.py
index e5f1944b0..ff0454db0 100755
--- a/share/extensions/gcodetools.py
+++ b/share/extensions/gcodetools.py
@@ -68,9 +68,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
gcodetools_current_version = "1.7"
-import inkex, simplestyle, simplepath
-import cubicsuperpath, simpletransform, bezmisc
-
+# standard library
import os
import math
import bezmisc
@@ -82,9 +80,15 @@ import cmath
import numpy
import codecs
import random
-import gettext
-_ = gettext.gettext
+# local library
+import inkex
+import simplestyle
+import simplepath
+import cubicsuperpath
+import simpletransform
+import bezmisc
+inkex.localize()
### Check if inkex has errormsg (0.46 version does not have one.) Could be removed later.
if "errormsg" not in dir(inkex):
diff --git a/share/extensions/generate_voronoi.py b/share/extensions/generate_voronoi.py
index 54400a90a..4ab67dcd6 100755
--- a/share/extensions/generate_voronoi.py
+++ b/share/extensions/generate_voronoi.py
@@ -20,14 +20,20 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
-import random, inkex, simplestyle, gettext, voronoi
-_ = gettext.gettext
+# standard library
+import random
+# local library
+import inkex
+import simplestyle
+import voronoi
+
+inkex.localize()
try:
from subprocess import Popen, PIPE
except:
- inkex.errormsg(_("Failed to import the subprocess module. Please report this as a bug at : https://bugs.launchpad.net/inkscape."))
- inkex.errormsg("Python version is : " + str(inkex.sys.version_info))
+ inkex.errormsg(_("Failed to import the subprocess module. Please report this as a bug at: https://bugs.launchpad.net/inkscape."))
+ inkex.errormsg(_("Python version is: ") + str(inkex.sys.version_info))
exit()
def clip_line(x1, y1, x2, y2, w, h):
diff --git a/share/extensions/gimp_xcf.py b/share/extensions/gimp_xcf.py
index de3d67de6..ff1589cd8 100755
--- a/share/extensions/gimp_xcf.py
+++ b/share/extensions/gimp_xcf.py
@@ -18,17 +18,16 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-
-import gettext
+# standard library
import os
import shutil
from subprocess import Popen, PIPE
import sys
import tempfile
-
+# local library
import inkex
-_ = gettext.gettext
+inkex.localize()
# Define extension exceptions
class GimpXCFError(Exception): pass
diff --git a/share/extensions/guides_creator.py b/share/extensions/guides_creator.py
index 96f2557ee..e7458b81e 100755
--- a/share/extensions/guides_creator.py
+++ b/share/extensions/guides_creator.py
@@ -43,18 +43,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import sys
sys.path.append('/usr/share/inkscape/extensions')
-# We will use the inkex module with the predefined Effect base class.
-import inkex
-from simplestyle import *
-
from xml.etree import ElementTree as ET
-
# for golden number formulae
from math import sqrt
-# for printing debugging output
-import gettext
-_ = gettext.gettext
+# We will use the inkex module with the predefined Effect base class.
+import inkex
+from simplestyle import *
+
+# for localized debugging output
+inkex.localize()
def printDebug(string):
inkex.errormsg(_(string))
diff --git a/share/extensions/guillotine.py b/share/extensions/guillotine.py
index bda56b206..82b1a5441 100755
--- a/share/extensions/guillotine.py
+++ b/share/extensions/guillotine.py
@@ -37,22 +37,22 @@ will export to:
etc.
'''
-
+# standard library
+import locale
import os
import sys
-import inkex
-import simplestyle
-import locale
-import gettext
-_ = gettext.gettext
-
-locale.setlocale(locale.LC_ALL, '')
-
try:
from subprocess import Popen, PIPE
bsubprocess = True
except:
bsubprocess = False
+# local library
+import inkex
+import simplestyle
+
+inkex.localize()
+
+locale.setlocale(locale.LC_ALL, '')
def float_sort(a, b):
'''
diff --git a/share/extensions/inkex.py b/share/extensions/inkex.py
index 6a29e3f64..f78a59a7c 100755
--- a/share/extensions/inkex.py
+++ b/share/extensions/inkex.py
@@ -33,25 +33,8 @@ import os
import random
import re
import sys
-
from math import *
-domain = 'inkscape'
-if sys.platform.startswith('win'):
- import locale
- current_locale, encoding = locale.getdefaultlocale()
- os.environ['LANG'] = current_locale
- try:
- localdir = os.environ['INKSCAPE_LOCALEDIR'];
- #sys.stderr.write(str(localdir) + "\n")
- gettext= gettext.translation(domain, localdir, [current_locale], fallback=True)
- except KeyError:
- gettext= gettext.translation(domain, fallback=True)
-else:
- gettext= gettext.translation(domain, fallback=True)
-
-_ = gettext.gettext
-
#a dictionary of all of the xmlns prefixes in a standard inkscape doc
NSS = {
u'sodipodi' :u'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd',
@@ -65,6 +48,26 @@ u'xlink' :u'http://www.w3.org/1999/xlink',
u'xml' :u'http://www.w3.org/XML/1998/namespace'
}
+def localize():
+ domain = 'inkscape'
+ if sys.platform.startswith('win'):
+ import locale
+ current_locale, encoding = locale.getdefaultlocale()
+ os.environ['LANG'] = current_locale
+ try:
+ localdir = os.environ['INKSCAPE_LOCALEDIR'];
+ trans = gettext.translation(domain, localdir, [current_locale], fallback=True)
+ except KeyError:
+ trans = gettext.translation(domain, fallback=True)
+ else:
+ try:
+ localdir = os.environ['PACKAGE_LOCALE_DIR'];
+ trans = gettext.translation(domain, localdir, fallback=True)
+ except KeyError:
+ trans = gettext.translation(domain, fallback=True)
+ #sys.stderr.write(str(localdir) + "\n")
+ trans.install()
+
#a dictionary of unit to user unit conversion factors
uuconv = {'in':90.0, 'pt':1.25, 'px':1, 'mm':3.5433070866, 'cm':35.433070866, 'm':3543.3070866,
'km':3543307.0866, 'pc':15.0, 'yd':3240 , 'ft':1080}
@@ -89,12 +92,6 @@ def unittouu(string):
def uutounit(val, unit):
return val/uuconv[unit]
-try:
- from lxml import etree
-except Exception, e:
- sys.exit(_("The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension. Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, or install it through your package manager by a command like: sudo apt-get install python-lxml\n\nTechnical details:\n%s" % (e,)))
-
-
def debug(what):
sys.stderr.write(str(what) + "\n")
return what
@@ -108,16 +105,24 @@ def errormsg(msg):
Note that this should always be combined with translation:
- import gettext
- _ = gettext.gettext
+ import inkex
+ inkex.localize()
...
inkex.errormsg(_("This extension requires two selected paths."))
"""
if isinstance(msg, unicode):
- sys.stderr.write(_(msg).encode("UTF-8") + "\n")
+ sys.stderr.write(msg.encode("UTF-8") + "\n")
else:
- sys.stderr.write((unicode(_(msg), "utf-8", errors='replace') + "\n").encode("UTF-8"))
+ sys.stderr.write((unicode(msg, "utf-8", errors='replace') + "\n").encode("UTF-8"))
+# third party library
+try:
+ from lxml import etree
+except Exception, e:
+ localize()
+ errormsg(_("The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension. Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, or install it through your package manager by a command like: sudo apt-get install python-lxml\n\nTechnical details:\n%s" % (e,)))
+ sys.exit()
+
def check_inkbool(option, opt, value):
if str(value).capitalize() == 'True':
return True
diff --git a/share/extensions/interp_att_g.py b/share/extensions/interp_att_g.py
index 5f2b3574a..8ceaf8e34 100755
--- a/share/extensions/interp_att_g.py
+++ b/share/extensions/interp_att_g.py
@@ -16,9 +16,15 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-import inkex, simplestyle, math, re, string
-import gettext
-_ = gettext.gettext
+# standard library
+import math
+import re
+import string
+# local library
+import inkex
+import simplestyle
+
+inkex.localize()
class InterpAttG(inkex.Effect):
diff --git a/share/extensions/jessyInk_autoTexts.py b/share/extensions/jessyInk_autoTexts.py
index cf41ad24f..ed0edb6fa 100755
--- a/share/extensions/jessyInk_autoTexts.py
+++ b/share/extensions/jessyInk_autoTexts.py
@@ -25,8 +25,7 @@ sys.path.append('C:\Program Files\Inkscape\share\extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
-import gettext
-_ = gettext.gettext
+inkex.localize()
class JessyInk_AutoTexts(inkex.Effect):
def __init__(self):
diff --git a/share/extensions/jessyInk_effects.py b/share/extensions/jessyInk_effects.py
index 3af909bb2..e20e9fc2c 100755
--- a/share/extensions/jessyInk_effects.py
+++ b/share/extensions/jessyInk_effects.py
@@ -25,8 +25,7 @@ sys.path.append('C:\Program Files\Inkscape\share\extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
-import gettext
-_ = gettext.gettext
+inkex.localize()
class JessyInk_Effects(inkex.Effect):
def __init__(self):
diff --git a/share/extensions/jessyInk_export.py b/share/extensions/jessyInk_export.py
index 65247ab7e..71907e276 100755
--- a/share/extensions/jessyInk_export.py
+++ b/share/extensions/jessyInk_export.py
@@ -30,8 +30,8 @@ import os
import zipfile
import glob
import re
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
def propStrToDict(inStr):
dictio = {}
diff --git a/share/extensions/jessyInk_keyBindings.py b/share/extensions/jessyInk_keyBindings.py
index 110ca3355..df50f4447 100755
--- a/share/extensions/jessyInk_keyBindings.py
+++ b/share/extensions/jessyInk_keyBindings.py
@@ -25,8 +25,8 @@ sys.path.append('C:\Program Files\Inkscape\share\extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
class JessyInk_CustomKeyBindings(inkex.Effect):
modes = ('slide', 'index', 'drawing')
diff --git a/share/extensions/jessyInk_masterSlide.py b/share/extensions/jessyInk_masterSlide.py
index c29922d94..eca7711ff 100755
--- a/share/extensions/jessyInk_masterSlide.py
+++ b/share/extensions/jessyInk_masterSlide.py
@@ -25,8 +25,8 @@ sys.path.append('C:\Program Files\Inkscape\share\extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
class JessyInk_MasterSlide(inkex.Effect):
def __init__(self):
diff --git a/share/extensions/jessyInk_mouseHandler.py b/share/extensions/jessyInk_mouseHandler.py
index 4eff4c467..fafc8eec3 100755
--- a/share/extensions/jessyInk_mouseHandler.py
+++ b/share/extensions/jessyInk_mouseHandler.py
@@ -27,8 +27,8 @@ sys.path.append('C:\Program Files\Inkscape\share\extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
class JessyInk_CustomMouseHandler(inkex.Effect):
def __init__(self):
diff --git a/share/extensions/jessyInk_summary.py b/share/extensions/jessyInk_summary.py
index 48478c41e..feff79b37 100755
--- a/share/extensions/jessyInk_summary.py
+++ b/share/extensions/jessyInk_summary.py
@@ -25,8 +25,8 @@ sys.path.append('C:\Program Files\Inkscape\share\extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
def propStrToList(str):
list = []
@@ -71,7 +71,7 @@ class JessyInk_Summary(inkex.Effect):
inkex.errormsg(_("JessyInk script installed."))
slides = []
- masterSlide = None
+ masterSlide = None
for node in self.document.xpath("//svg:g[@inkscape:groupmode='layer']", namespaces=inkex.NSS):
if node.get("{" + inkex.NSS["jessyink"] + "}masterSlide"):
diff --git a/share/extensions/jessyInk_transitions.py b/share/extensions/jessyInk_transitions.py
index 18cd3f880..bfd75584c 100755
--- a/share/extensions/jessyInk_transitions.py
+++ b/share/extensions/jessyInk_transitions.py
@@ -25,8 +25,8 @@ sys.path.append('C:\Program Files\Inkscape\share\extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
class JessyInk_Transitions(inkex.Effect):
def __init__(self):
diff --git a/share/extensions/jessyInk_video.py b/share/extensions/jessyInk_video.py
index 51c73494b..bca98e9a7 100755
--- a/share/extensions/jessyInk_video.py
+++ b/share/extensions/jessyInk_video.py
@@ -29,8 +29,8 @@ import os
import re
from lxml import etree
from copy import deepcopy
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
class JessyInk_Effects(inkex.Effect):
def __init__(self):
diff --git a/share/extensions/jessyInk_view.py b/share/extensions/jessyInk_view.py
index 04adc27ae..ee71a1d35 100755
--- a/share/extensions/jessyInk_view.py
+++ b/share/extensions/jessyInk_view.py
@@ -25,8 +25,8 @@ sys.path.append('C:\Program Files\Inkscape\share\extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
def propStrToList(str):
list = []
diff --git a/share/extensions/launch_webbrowser.py b/share/extensions/launch_webbrowser.py
index 387d8b2cb..27a738e38 100755
--- a/share/extensions/launch_webbrowser.py
+++ b/share/extensions/launch_webbrowser.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python
-import gettext
+# standard library
import webbrowser
import threading
from optparse import OptionParser
-
-_ = gettext.gettext
+# local library
+import inkex
+inkex.localize()
class VisitWebSiteWithoutLockingInkscape(threading.Thread):
def __init__(self):
diff --git a/share/extensions/markers_strokepaint.py b/share/extensions/markers_strokepaint.py
index 5c760cd17..d92716939 100755
--- a/share/extensions/markers_strokepaint.py
+++ b/share/extensions/markers_strokepaint.py
@@ -17,9 +17,14 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-import random, inkex, simplestyle, copy
-import gettext
-_ = gettext.gettext
+# standard library
+import random
+import copy
+# local library
+import inkex
+import simplestyle
+
+inkex.localize()
class MyEffect(inkex.Effect):
def __init__(self):
diff --git a/share/extensions/pathalongpath.py b/share/extensions/pathalongpath.py
index 71f389e1c..7da7f1797 100755
--- a/share/extensions/pathalongpath.py
+++ b/share/extensions/pathalongpath.py
@@ -30,12 +30,19 @@ as painted on these lines.
Now move and bend L to make it fit a skeleton, and see what happens to the normals:
they move and rotate, deforming the pattern.
'''
-
-import inkex, cubicsuperpath, bezmisc
-import pathmodifier,simpletransform
-import copy, math, re, random
-import gettext
-_ = gettext.gettext
+# standard library
+import copy
+import math
+import re
+import random
+# local library
+import inkex
+import cubicsuperpath
+import bezmisc
+import pathmodifier
+import simpletransform
+
+inkex.localize()
def flipxy(path):
for pathcomp in path:
diff --git a/share/extensions/pathmodifier.py b/share/extensions/pathmodifier.py
index ceb0994e6..ff2bbfb3a 100755
--- a/share/extensions/pathmodifier.py
+++ b/share/extensions/pathmodifier.py
@@ -27,11 +27,19 @@ to implement deformations of the form X=f(x,y), Y=g(x,y)...
TODO: Several handy functions are defined, that might in fact be of general
interest and that should be shipped out in separate files...
'''
-import inkex, cubicsuperpath, bezmisc, simplestyle
+# standard library
+import copy
+import math
+import re
+import random
+# local library
+import inkex
+import cubicsuperpath
+import bezmisc
+import simplestyle
from simpletransform import *
-import copy, math, re, random
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
####################################################################
##-- zOrder computation...
diff --git a/share/extensions/pathscatter.py b/share/extensions/pathscatter.py
index 6ed3cc8ac..268e31069 100755
--- a/share/extensions/pathscatter.py
+++ b/share/extensions/pathscatter.py
@@ -30,13 +30,21 @@ as painted on these lines.
Now move and bend L to make it fit a skeleton, and see what happens to the normals:
they move and rotate, deforming the pattern.
'''
-
-import inkex, cubicsuperpath, bezmisc
-import pathmodifier, simpletransform
+# standard library
+import copy
+import math
+import re
+import random
+# third party
from lxml import etree
-import copy, math, re, random
-import gettext
-_ = gettext.gettext
+# local library
+import inkex
+import cubicsuperpath
+import bezmisc
+import pathmodifier
+import simpletransform
+
+inkex.localize()
def zSort(inNode,idList):
sortedList=[]
diff --git a/share/extensions/perspective.py b/share/extensions/perspective.py
index 733fb121a..8a0ffeb0b 100755
--- a/share/extensions/perspective.py
+++ b/share/extensions/perspective.py
@@ -18,10 +18,26 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Perspective approach & math by Dmitry Platonov, shadowjack@mail.ru, 2006
"""
-import sys, inkex, os, re, simplepath, cubicsuperpath, simpletransform, voronoi2svg
-import gettext
-_ = gettext.gettext
+# standard library
+import sys
+import os
+import re
+try:
+ from subprocess import Popen, PIPE
+ bsubprocess = True
+except:
+ bsubprocess = False
+# local library
+import inkex
+import simplepath
+import cubicsuperpath
+import simpletransform
+import voronoi2svg
from ffgeom import *
+
+inkex.localize()
+
+# third party
try:
from numpy import *
from numpy.linalg import *
@@ -29,30 +45,6 @@ except:
inkex.errormsg(_("Failed to import the numpy or numpy.linalg modules. These modules are required by this extension. Please install them and try again. On a Debian-like system this can be done with the command, sudo apt-get install python-numpy."))
exit()
-try:
- from subprocess import Popen, PIPE
- bsubprocess = True
-except:
- bsubprocess = False
-
-uuconv = {'in':90.0, 'pt':1.25, 'px':1, 'mm':3.5433070866, 'cm':35.433070866, 'pc':15.0}
-def unittouu(string):
- unit = re.compile('(%s)$' % '|'.join(uuconv.keys()))
- param = re.compile(r'(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)')
-
- p = param.match(string)
- u = unit.search(string)
- if p:
- retval = float(p.string[p.start():p.end()])
- else:
- retval = 0.0
- if u:
- try:
- return retval * uuconv[u.string[u.start():u.end()]]
- except KeyError:
- pass
- return retval
-
class Project(inkex.Effect):
def __init__(self):
inkex.Effect.__init__(self)
diff --git a/share/extensions/polyhedron_3d.py b/share/extensions/polyhedron_3d.py
index 1efce876f..063912cc2 100755
--- a/share/extensions/polyhedron_3d.py
+++ b/share/extensions/polyhedron_3d.py
@@ -48,12 +48,17 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-
-import inkex
-import simplestyle, sys, re
+# standard library
+import sys
+import re
from math import *
-import gettext
-_ = gettext.gettext
+# local library
+import inkex
+import simplestyle
+
+inkex.localize()
+
+# third party
try:
from numpy import *
except:
diff --git a/share/extensions/print_win32_vector.py b/share/extensions/print_win32_vector.py
index 49baec136..e77b49826 100644
--- a/share/extensions/print_win32_vector.py
+++ b/share/extensions/print_win32_vector.py
@@ -27,11 +27,15 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-
+# standard library
from ctypes import *
-import inkex, simplestyle, simpletransform, cubicsuperpath
-import gettext
-_ = gettext.gettext
+# local library
+import inkex
+import simplestyle
+import simpletransform
+import cubicsuperpath
+
+inkex.localize()
if not inkex.sys.platform.startswith('win'):
exit(_("sorry, this will run only on Windows, exiting..."))
diff --git a/share/extensions/render_alphabetsoup.py b/share/extensions/render_alphabetsoup.py
index f682e9b57..ad43163e4 100755
--- a/share/extensions/render_alphabetsoup.py
+++ b/share/extensions/render_alphabetsoup.py
@@ -18,22 +18,23 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-
+# standard library
import copy
-import inkex
-import simplestyle
import math
import cmath
import string
import random
-import render_alphabetsoup_config
-import bezmisc
-import simplepath
import os
import sys
import re
-import gettext
-_ = gettext.gettext
+# local library
+import inkex
+import simplestyle
+import render_alphabetsoup_config
+import bezmisc
+import simplepath
+
+inkex.localize()
syntax = render_alphabetsoup_config.syntax
alphabet = render_alphabetsoup_config.alphabet
diff --git a/share/extensions/render_barcode_datamatrix.py b/share/extensions/render_barcode_datamatrix.py
index 20bcf94dc..2d28bb433 100755
--- a/share/extensions/render_barcode_datamatrix.py
+++ b/share/extensions/render_barcode_datamatrix.py
@@ -51,11 +51,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0.50 2009-10-25 Full functionality, up to 144x144.
ASCII and compressed digit encoding only.
'''
+# local library
+import inkex
+import simplestyle
-import inkex, simplestyle
-
-import gettext
-_ = gettext.gettext
+inkex.localize()
symbols = {
'sq10': (10, 10),
diff --git a/share/extensions/replace_font.py b/share/extensions/replace_font.py
index f0f25ab8e..090920ced 100755
--- a/share/extensions/replace_font.py
+++ b/share/extensions/replace_font.py
@@ -27,13 +27,14 @@ font.
It can also replace all fonts indiscriminately, and list all fonts
currently being used.
'''
-
+# standard library
import os
import sys
+# local library
import inkex
import simplestyle
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
text_tags = ['{http://www.w3.org/2000/svg}tspan',
'{http://www.w3.org/2000/svg}text',
diff --git a/share/extensions/summersnight.py b/share/extensions/summersnight.py
index 3bfa70cbd..aea5cea55 100755
--- a/share/extensions/summersnight.py
+++ b/share/extensions/summersnight.py
@@ -17,18 +17,17 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
-import gettext
+# standard library
import os
-
+# local library
import cubicsuperpath
import inkex
import simplepath
import simpletransform
import voronoi2svg
-
from ffgeom import *
-_ = gettext.gettext
+inkex.localize()
try:
from subprocess import Popen, PIPE
diff --git a/share/extensions/svg_and_media_zip_output.py b/share/extensions/svg_and_media_zip_output.py
index 62e2b2ef5..20a5dac18 100755
--- a/share/extensions/svg_and_media_zip_output.py
+++ b/share/extensions/svg_and_media_zip_output.py
@@ -36,8 +36,7 @@ TODOs
- maybe add better extention
- consider switching to lzma in order to allow cross platform compression with no encoding problem...
'''
-
-import inkex
+# standard library
import urlparse
import urllib
import os, os.path
@@ -46,11 +45,13 @@ import zipfile
import shutil
import sys
import tempfile
-import simplestyle
-import gettext
import locale
+# local library
+import inkex
+import simplestyle
+
locale.setlocale(locale.LC_ALL, '')
-_ = gettext.gettext
+inkex.localize()
class CompressedMediaOutput(inkex.Effect):
def __init__(self):
diff --git a/share/extensions/uniconv-ext.py b/share/extensions/uniconv-ext.py
index 246340e89..5608000c4 100755
--- a/share/extensions/uniconv-ext.py
+++ b/share/extensions/uniconv-ext.py
@@ -20,14 +20,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
-
+# standard library
import sys
-from run_command import run
-import gettext
-_ = gettext.gettext
-
-cmd = None
-
try:
from subprocess import Popen, PIPE
p = Popen('uniconvertor', shell=True, stdout=PIPE, stderr=PIPE).wait()
@@ -43,6 +37,13 @@ except ImportError:
if p!=32512 : cmd = 'uniconv'
p = Popen3('uniconvertor', True).wait()
if p!=32512 : cmd = 'uniconvertor'
+# local library
+from run_command import run
+import inkex
+
+cmd = None
+
+inkex.localize()
if cmd == None:
# there's no succeffully-returning uniconv command; try to get the module directly (on Windows)
diff --git a/share/extensions/uniconv_output.py b/share/extensions/uniconv_output.py
index 30d1c2fe0..93236483d 100755
--- a/share/extensions/uniconv_output.py
+++ b/share/extensions/uniconv_output.py
@@ -28,11 +28,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# On failure, outputs an error message to stderr, and exits with a return
# code of 1.
+# standard library
import os
import sys
import tempfile
-import gettext
-_ = gettext.gettext
+# local library
+import inkex
+inkex.localize()
def run(command_format, prog_name, uniconv_format):
outfile = tempfile.mktemp(uniconv_format)
diff --git a/share/extensions/voronoi2svg.py b/share/extensions/voronoi2svg.py
index 7687bba91..dd693f8bb 100755
--- a/share/extensions/voronoi2svg.py
+++ b/share/extensions/voronoi2svg.py
@@ -27,11 +27,17 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
-import sys, os
-import inkex, simplestyle, simplepath, simpletransform
+# standard library
+import sys
+import os
+# local library
+import inkex
+import simplestyle
+import simplepath
+import simpletransform
import voronoi
-import gettext
-_ = gettext.gettext
+
+inkex.localize()
class Point:
def __init__(self,x,y):
diff --git a/share/extensions/web-set-att.py b/share/extensions/web-set-att.py
index 65dd5a5b4..b224ed9aa 100755
--- a/share/extensions/web-set-att.py
+++ b/share/extensions/web-set-att.py
@@ -16,9 +16,11 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-import inkwebeffect, gettext
+# local library
+import inkwebeffect
+import inkex
-_ = gettext.gettext
+inkex.localize()
class InkWebTransmitAtt(inkwebeffect.InkWebEffect):
diff --git a/share/extensions/web-transmit-att.py b/share/extensions/web-transmit-att.py
index 35f16e145..414eb12ea 100755
--- a/share/extensions/web-transmit-att.py
+++ b/share/extensions/web-transmit-att.py
@@ -16,9 +16,11 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-import inkwebeffect, gettext
+# local library
+import inkwebeffect
+import inkex
-_ = gettext.gettext
+inkex.localize()
class InkWebTransmitAtt(inkwebeffect.InkWebEffect):
diff --git a/share/extensions/webslicer_create_group.py b/share/extensions/webslicer_create_group.py
index 613162850..dd48c3e96 100755
--- a/share/extensions/webslicer_create_group.py
+++ b/share/extensions/webslicer_create_group.py
@@ -16,12 +16,11 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-
+# local library
from webslicer_effect import *
import inkex
-import gettext
-_ = gettext.gettext
+inkex.localize()
class WebSlicer_CreateGroup(WebSlicer_Effect):
diff --git a/share/extensions/webslicer_create_rect.py b/share/extensions/webslicer_create_rect.py
index 9e916532f..7c04e8706 100755
--- a/share/extensions/webslicer_create_rect.py
+++ b/share/extensions/webslicer_create_rect.py
@@ -16,12 +16,11 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-
+# local library
from webslicer_effect import *
import inkex
-import gettext
-_ = gettext.gettext
+inkex.localize()
class WebSlicer_CreateRect(WebSlicer_Effect):
diff --git a/share/extensions/webslicer_export.py b/share/extensions/webslicer_export.py
index c50cbcc32..118dfbeee 100755
--- a/share/extensions/webslicer_export.py
+++ b/share/extensions/webslicer_export.py
@@ -16,15 +16,15 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-
-from webslicer_effect import *
-import inkex
-import gettext
+# standard library
import os
import sys
import tempfile
+# local library
+from webslicer_effect import *
+import inkex
-_ = gettext.gettext
+inkex.localize()
class WebSlicer_Export(WebSlicer_Effect):
diff --git a/share/extensions/wireframe_sphere.py b/share/extensions/wireframe_sphere.py
index 467aa609e..5804a1b45 100755
--- a/share/extensions/wireframe_sphere.py
+++ b/share/extensions/wireframe_sphere.py
@@ -54,13 +54,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Hidden lines of latitude still not properly calculated.
Prolate and oblate spheroids not considered.
'''
-
-import inkex, simplestyle
-
-import gettext
-_ = gettext.gettext
-
+# standard library
from math import *
+# local library
+import inkex
+import simplestyle
+
+inkex.localize()
#SVG OUTPUT FUNCTIONS ================================================
def draw_SVG_ellipse((rx, ry), (cx, cy), parent, start_end=(0,2*pi),transform='' ):
diff --git a/share/filters/filters.svg b/share/filters/filters.svg
index 1ee7b8576..c05c2c1e8 100644
--- a/share/filters/filters.svg
+++ b/share/filters/filters.svg
@@ -2560,7 +2560,7 @@ sodipodi:docname="filters.svg">
<feColorMatrix result="result1" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 -1 1 0 " in="SourceGraphic" />
<feBlend in2="result4" mode="multiply" result="result5" in="result1" />
</filter>
-<filter id="filter581" inkscape:menu="Morphology" inkscape:menu-tooltip="Blurred multiple contour for objects" y="-0.2" x="-0.34" width="1.6" height="1.4" inkscape:label="Contouring table" style="color-interpolation-filters:sRGB">
+<filter id="filter581" inkscape:menu="Morphology" inkscape:menu-tooltip="Blurred multiple contours for objects" y="-0.2" x="-0.34" width="1.6" height="1.4" inkscape:label="Contouring table" style="color-interpolation-filters:sRGB">
<feFlood result="result2" flood-color="rgb(255,255,255)" />
<feGaussianBlur result="result1" in="SourceAlpha" stdDeviation="17" />
<feComposite in2="result1" result="result17" operator="in" />