summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-01-24 00:23:50 +0000
committerJabiertxof <jtx@jtx>2017-01-24 00:23:50 +0000
commit28cd52b3fac27f932862cb57dd18e5464cf5ba08 (patch)
treeb567cfaa1257eb02177e8b4b4604694ff69f1063 /share
parentAdd multiwidget fixes (diff)
parentfix nodes reverting back during editing (diff)
downloadinkscape-28cd52b3fac27f932862cb57dd18e5464cf5ba08.tar.gz
inkscape-28cd52b3fac27f932862cb57dd18e5464cf5ba08.zip
Update to trunk
(bzr r15356.1.16)
Diffstat (limited to 'share')
-rwxr-xr-xshare/extensions/dxf_outlines.py2
-rwxr-xr-xshare/extensions/hpgl_input.py2
-rwxr-xr-xshare/extensions/measure.py3
-rwxr-xr-xshare/extensions/perspective.py2
-rwxr-xr-xshare/extensions/polyhedron_3d.py3
-rwxr-xr-xshare/extensions/test/run-all-extension-tests27
-rwxr-xr-xshare/extensions/uniconv-ext.py3
-rwxr-xr-xshare/extensions/uniconv_output.py3
8 files changed, 32 insertions, 13 deletions
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py
index 525461bde..a387df4a1 100755
--- a/share/extensions/dxf_outlines.py
+++ b/share/extensions/dxf_outlines.py
@@ -44,6 +44,8 @@ try:
from numpy import *
from numpy.linalg import solve
except:
+ # Initialize gettext for messages outside an inkex derived class
+ inkex.localize()
inkex.errormsg(_("Failed to import the numpy or numpy.linalg modules. These modules are required by this extension. Please install them and try again."))
inkex.sys.exit()
diff --git a/share/extensions/hpgl_input.py b/share/extensions/hpgl_input.py
index 2b275cbf8..13d6d00ec 100755
--- a/share/extensions/hpgl_input.py
+++ b/share/extensions/hpgl_input.py
@@ -26,6 +26,8 @@ import hpgl_decoder
import inkex
import sys
+inkex.localize()
+
# parse options
parser = inkex.optparse.OptionParser(usage='usage: %prog [options] HPGLfile', option_class=inkex.InkOption)
parser.add_option('--resolutionX', action='store', type='float', dest='resolutionX', default=1016.0, help='Resolution X (dpi)')
diff --git a/share/extensions/measure.py b/share/extensions/measure.py
index b605ffe93..d025f142c 100755
--- a/share/extensions/measure.py
+++ b/share/extensions/measure.py
@@ -51,6 +51,9 @@ try:
except locale.Error:
locale.setlocale(locale.LC_ALL, 'C')
+# Initialize gettext for messages outside an inkex derived class
+inkex.localize()
+
# third party
try:
import numpy
diff --git a/share/extensions/perspective.py b/share/extensions/perspective.py
index ea08b98dc..f15deaad5 100755
--- a/share/extensions/perspective.py
+++ b/share/extensions/perspective.py
@@ -39,6 +39,8 @@ try:
from numpy import *
from numpy.linalg import *
except:
+ # Initialize gettext for messages outside an inkex derived class
+ inkex.localize()
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()
diff --git a/share/extensions/polyhedron_3d.py b/share/extensions/polyhedron_3d.py
index 86203d4bc..a74a64e69 100755
--- a/share/extensions/polyhedron_3d.py
+++ b/share/extensions/polyhedron_3d.py
@@ -57,6 +57,9 @@ import inkex
import simplestyle
from simpletransform import computePointInNode
+# Initialize gettext for messages outside an inkex derived class
+inkex.localize()
+
# third party
try:
from numpy import *
diff --git a/share/extensions/test/run-all-extension-tests b/share/extensions/test/run-all-extension-tests
index e7faf672a..ff739c311 100755
--- a/share/extensions/test/run-all-extension-tests
+++ b/share/extensions/test/run-all-extension-tests
@@ -38,20 +38,25 @@ failed_tests=$( $MKTEMP )
if coverage.py erase >/dev/null 2>/dev/null; then
has_py_coverage=true
cover_py_cmd=coverage.py
-else
- if coverage erase >/dev/null 2>/dev/null; then
- has_py_coverage=true
- cover_py_cmd=coverage
- else
- if python-coverage erase >/dev/null 2>/dev/null; then
- has_py_coverage=true
- cover_py_cmd=python-coverage
- fi
- fi
+ else
+ if coverage erase >/dev/null 2>/dev/null; then
+ has_py_coverage=true
+ cover_py_cmd=coverage
+ else
+ if python-coverage erase >/dev/null 2>/dev/null; then
+ has_py_coverage=true
+ cover_py_cmd=python-coverage
+ else
+ if coverage-script.py erase >/dev/null 2>/dev/null; then
+ has_py_coverage=true
+ cover_py_cmd=coverage-script.py
+ fi
+ fi
+ fi
fi
if $has_py_coverage; then
- echo -e "\nRunning tests with coverage"
+ echo -e "\nRunning tests with coverage (${cover_py_cmd})"
fi
#if $has_py_coverage; then
# $cover_py_cmd -e
diff --git a/share/extensions/uniconv-ext.py b/share/extensions/uniconv-ext.py
index c84ee2e0a..6ce0d7fab 100755
--- a/share/extensions/uniconv-ext.py
+++ b/share/extensions/uniconv-ext.py
@@ -51,7 +51,8 @@ if cmd == None:
import imp
imp.find_module("uniconvertor")
except ImportError:
- sys.stderr.write(_('You need to install the UniConvertor software.\n'+\
+ inkex.localize()
+ inkex.errormsg(_('You need to install the UniConvertor software.\n'+\
'For GNU/Linux: install the package python-uniconvertor.\n'+\
'For Windows: download it from\n'+\
'http://sk1project.org/modules.php?name=Products&product=uniconvertor\n'+\
diff --git a/share/extensions/uniconv_output.py b/share/extensions/uniconv_output.py
index 7815137b6..a02a16d95 100755
--- a/share/extensions/uniconv_output.py
+++ b/share/extensions/uniconv_output.py
@@ -118,7 +118,8 @@ def get_command():
import imp
imp.find_module("uniconvertor")
except ImportError:
- sys.stderr.write(_('You need to install the UniConvertor software.\n'+\
+ inkex.localize()
+ inkex.errormsg(_('You need to install the UniConvertor software.\n'+\
'For GNU/Linux: install the package python-uniconvertor.\n'+\
'For Windows: download it from\n'+\
'http://sk1project.org/modules.php?name=Products&product=uniconvertor\n'+\