summaryrefslogtreecommitdiffstats
path: root/share/extensions
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2011-06-05 19:00:51 +0000
committerJazzyNico <nicoduf@yahoo.fr>2011-06-05 19:00:51 +0000
commit1e9b7888739fe8e6ec77b1a3d597017ef3aef2a5 (patch)
tree8050c0aa3fe8c80090fa4c4d49703be5649cc7e8 /share/extensions
parentfix: latex width output to postscript big point 'bp'. (diff)
downloadinkscape-1e9b7888739fe8e6ec77b1a3d597017ef3aef2a5.tar.gz
inkscape-1e9b7888739fe8e6ec77b1a3d597017ef3aef2a5.zip
Extensions. Adding i18n support to voronoi2svg.py and interp_att_g.py. New INX version for the Voronoi extension.
Translations. inkscape.pot and fr.po update. (bzr r10258)
Diffstat (limited to 'share/extensions')
-rwxr-xr-xshare/extensions/interp_att_g.py4
-rw-r--r--share/extensions/voronoi2svg.inx27
-rw-r--r--share/extensions/voronoi2svg.py11
3 files changed, 28 insertions, 14 deletions
diff --git a/share/extensions/interp_att_g.py b/share/extensions/interp_att_g.py
index 9829de3e8..5f2b3574a 100755
--- a/share/extensions/interp_att_g.py
+++ b/share/extensions/interp_att_g.py
@@ -17,6 +17,8 @@ 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
class InterpAttG(inkex.Effect):
@@ -156,7 +158,7 @@ class InterpAttG(inkex.Effect):
self.getNumberValues()
if self.collection is None:
- inkex.errormsg( 'There is no selection to interpolate' )
+ inkex.errormsg( _('There is no selection to interpolate' ))
return False
for node in self.collection:
diff --git a/share/extensions/voronoi2svg.inx b/share/extensions/voronoi2svg.inx
index 4e96c5b48..d86ebd819 100644
--- a/share/extensions/voronoi2svg.inx
+++ b/share/extensions/voronoi2svg.inx
@@ -5,17 +5,24 @@
<dependency type="executable" location="extensions">voronoi2svg.py</dependency>
<dependency type="executable" location="extensions">inkex.py</dependency>
<dependency type="executable" location="extensions">voronoi.py</dependency>
- <param name="diagram-type" type="enum" _gui-text="Type of diagram:">
- <_item value="Voronoi">Voronoi Diagram</_item>
- <_item value="Delaunay">Delaunay Triangulation</_item>
- <_item value="Both">Voronoi and Delaunay</_item>
+ <param name="tab" type="notebook">
+ <page name="options" _gui-text="Options">
+ <param name="diagram-type" type="enum" _gui-text="Type of diagram:">
+ <_item value="Voronoi">Voronoi Diagram</_item>
+ <_item value="Delaunay">Delaunay Triangulation</_item>
+ <_item value="Both">Voronoi and Delaunay</_item>
+ </param>
+ <_param name="Voronoi Options" type="description" appearance="header">Options for Voronoi diagram</_param>
+ <param name="clip-box" type="enum" _gui-text="Bounding box of the diagram:">
+ <_item value="Page">Page</_item>
+ <_item value="Automatic from seeds">Automatic from selected objects</_item>
+ </param>
+ <param name="show-clip-box" type="boolean" _gui-text="Show the bounding box"></param>
+ </page>
+ <page name="help" _gui-text="Help">
+ <_param name="help_text" type="description">Select a set of objects. Their centroids will be used as the sites of the Voronoi diagram. Text objects are not handled.</_param>
+ </page>
</param>
- <_param name="Voronoi Options" type="description" appearance="header">Options for Voronoi diagram</_param>
- <param name="clip-box" type="enum" _gui-text="Area bounding the diagram:">
- <_item value="Page">Page</_item>
- <_item value="Automatic from seeds">Automatic from seeds</_item>
- </param>
- <param name="show-clip-box" type="boolean" _gui-text="Show the bounding area"></param>
<effect>
<object-type>all</object-type>
<effects-menu>
diff --git a/share/extensions/voronoi2svg.py b/share/extensions/voronoi2svg.py
index c69b03d4d..7687bba91 100644
--- a/share/extensions/voronoi2svg.py
+++ b/share/extensions/voronoi2svg.py
@@ -45,6 +45,11 @@ class Voronoi2svg(inkex.Effect):
#{{{ Additional options
self.OptionParser.add_option(
+ "--tab",
+ action="store",
+ type="string",
+ dest="tab")
+ self.OptionParser.add_option(
'--diagram-type',
action = 'store',
type = 'choice', choices=['Voronoi','Delaunay','Both'],
@@ -57,14 +62,14 @@ class Voronoi2svg(inkex.Effect):
type = 'choice', choices=['Page','Automatic from seeds'],
default = 'Page',
dest='clipBox',
- help = 'Defines the area bounding the Voronoi diagram')
+ help = 'Defines the bounding box of the Voronoi diagram')
self.OptionParser.add_option(
'--show-clip-box',
action = 'store',
type = 'inkbool',
default = False,
dest='showClipBox',
- help = 'Set this to true to write the bounding box of the bounding area')
+ help = 'Set this to true to write the bounding box')
#}}}
@@ -201,7 +206,7 @@ class Voronoi2svg(inkex.Effect):
#{{{ Check that elements have been selected
if len(self.options.ids) == 0:
- inkex.errormsg("Please select seed objects!")
+ inkex.errormsg(_("Please select objects!"))
return
#}}}