~h-e-6/inkscape/connector-wip

« back to all changes in this revision

Viewing changes to share/extensions/markers_strokepaint.py

  • Committer: pjrm
  • Date: 2008-05-23 12:49:19 UTC
  • Revision ID: pjrm@users.sourceforge.net-20080523124919-bfrcgaggp79uviuy
share/extensions/*.py: Use gettext for (many) error messages.
share/extensions/inkex.py: (errormsg): New function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
'''
19
19
import random, inkex, simplestyle, copy
 
20
import gettext
 
21
_ = gettext.gettext
20
22
 
21
23
class MyEffect(inkex.Effect):
22
24
    def __init__(self):
36
38
            try:
37
39
                style = simplestyle.parseStyle(node.get('style'))
38
40
            except:
39
 
                inkex.debug("No style attribute found for id: %s" % id)
 
41
                inkex.errormsg(_("No style attribute found for id: %s") % id)
40
42
                continue
41
43
            
42
44
            stroke = style.get('stroke', '#000000')
51
53
                        else:
52
54
                            mnode = old_mnode
53
55
                    except:
54
 
                        inkex.debug("unable to locate marker: %s" % marker_id)
 
56
                        inkex.errormsg(_("unable to locate marker: %s") % marker_id)
55
57
                        continue
56
58
                        
57
59
                    new_id = self.uniqueId(marker_id, not self.options.modify)