From c4058f9f1ccd9c3bb2eecbb781cc1fee7001a9ac Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 15 Jan 2017 03:09:19 +0100 Subject: Extensions: run_command.py - inform user about output to stderr even if error code is zero (bzr r15417) --- share/extensions/run_command.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/extensions/run_command.py b/share/extensions/run_command.py index 7012c4274..950e9ed7c 100755 --- a/share/extensions/run_command.py +++ b/share/extensions/run_command.py @@ -61,8 +61,11 @@ def run(command_format, prog_name): except ImportError: # shouldn't happen... msg = "Neither subprocess.Popen nor popen2.Popen3 is available" - if rc and msg is None: - msg = "%s failed:\n%s\n%s\n" % (prog_name, out, err) + if msg is None: + if rc: + msg = "%s failed:\n%s\n%s\n" % (prog_name, out, err) + elif err: + sys.stderr.write("%s executed but logged the following error:\n%s\n%s\n" % (prog_name, out, err)) except Exception, inst: msg = "Error attempting to run %s: %s" % (prog_name, str(inst)) -- cgit v1.2.3 From e8dcb5062f6114a9fb06d496ab5d906aec405c78 Mon Sep 17 00:00:00 2001 From: "alexandru.roman" Date: Sat, 21 Jan 2017 23:28:05 +0100 Subject: Fix "swap fill and stroke" for multiple objects in selection Add verb and shortcut possibility Fixed bugs: - https://launchpad.net/bugs/367360 - https://launchpad.net/bugs/675690 (bzr r15428) --- share/keys/default.xml | 2 ++ share/keys/inkscape.xml | 1 + 2 files changed, 3 insertions(+) (limited to 'share') diff --git a/share/keys/default.xml b/share/keys/default.xml index 581716d12..134251752 100644 --- a/share/keys/default.xml +++ b/share/keys/default.xml @@ -383,6 +383,8 @@ override) the bindings in the main default.xml. + + diff --git a/share/keys/inkscape.xml b/share/keys/inkscape.xml index 581716d12..4461dee69 100644 --- a/share/keys/inkscape.xml +++ b/share/keys/inkscape.xml @@ -382,6 +382,7 @@ override) the bindings in the main default.xml. + -- cgit v1.2.3 From 10141c4f5a78c99811a52ace4ee9b46ad5cbc3b5 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Sun, 22 Jan 2017 16:37:47 +0100 Subject: i18n. Fixing gettext initialization in the Uniconvertor related extensions. (bzr r15430) --- share/extensions/uniconv-ext.py | 3 ++- share/extensions/uniconv_output.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'share') 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'+\ -- cgit v1.2.3 From 2975cae69ee6b1b35dc586e908fc6679ce165938 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Sun, 22 Jan 2017 18:23:34 +0100 Subject: i18n. Fixing gettext initialization in the HPGL related extensions. (bzr r15431) --- share/extensions/hpgl_input.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'share') 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)') -- cgit v1.2.3 From 22f70b86b718287ab031db355f5b0c19e31c9fd7 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Mon, 23 Jan 2017 11:27:07 +0100 Subject: Extensions. Improve run-all-extension-tests script for Windows users. (bzr r15432) --- share/extensions/test/run-all-extension-tests | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'share') 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 -- cgit v1.2.3 From cb1e1ed0e7eab8865a1f3a5925688cea5f63a140 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Mon, 23 Jan 2017 11:32:56 +0100 Subject: i18n. Fixing gettext initialization in some more extensions. (bzr r15433) --- share/extensions/dxf_outlines.py | 2 ++ share/extensions/measure.py | 3 +++ share/extensions/perspective.py | 2 ++ share/extensions/polyhedron_3d.py | 3 +++ 4 files changed, 10 insertions(+) (limited to 'share') 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/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 * -- cgit v1.2.3