X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=share%2Fextensions%2Fextractimage.py;h=38f9298465d66191fd3eb9718dd08fb5f8a0c21c;hb=25efa04a2042b95ec9c327d41aa2673a39b18104;hp=c85456c88bda1ad7640dffe032c68593cab4cb81;hpb=77d65c763568495a6ffc7c15a81964448139f47a;p=inkscape.git diff --git a/share/extensions/extractimage.py b/share/extensions/extractimage.py index c85456c88..38f929846 100644 --- a/share/extensions/extractimage.py +++ b/share/extensions/extractimage.py @@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ''' import inkex, base64, os +import gettext +_ = gettext.gettext class MyEffect(inkex.Effect): def __init__(self): @@ -61,11 +63,12 @@ class MyEffect(inkex.Effect): open(path,'wb').write(data) node.set(inkex.addNS('href','xlink'),os.path.realpath(path)) #absolute for making in-mem cycles work else: - inkex.debug('Difficulty finding the image data.') + inkex.errormsg(_('Difficulty finding the image data.')) break -e = MyEffect() -e.affect() +if __name__ == '__main__': + e = MyEffect() + e.affect() # vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 encoding=utf-8 textwidth=99