Activity log for bug #1538277

Date Who What changed Old value New value Message
2016-01-26 20:02:35 su_v bug added bug
2016-01-26 20:03:30 su_v attachment added 1538277-trigger_extensions_i18n_failure-v1.diff https://bugs.launchpad.net/inkscape/+bug/1538277/+attachment/4557043/+files/1538277-trigger_extensions_i18n_failure-v1.diff
2016-01-26 20:04:10 su_v description Messages in inkex.py marked for translation (with '_()') cause the script / extension to abort with 'NameError' unless the extension which imports inkex does run 'inkex.localize()' (currently, only extensions which themselves need gettext for translated messages do this). Steps to reproduce: 1) apply attached diff to $PREFIX/share/inkscape/extensions/inkex.py 2) launch Inkscape 0.91 or trunk 3) apply an extension which runs 'inkex.localize()': Extensions > Render > Alphabet Soup --> success: renders and returns "This is a test" as expected 4) apply an extension which does not run 'inkex.localize()': Extensions > Render > Gear > Gear --> failure: Traceback (most recent call last): File "render_gears.py", line 184, in <module> e.affect() File "$PREFIX/share/inkscape_96ppi/extensions/inkex.py", line 267, in affect self.parse() File "$PREFIX/share/inkscape_96ppi/extensions/inkex.py", line 165, in parse errormsg(_("This is a test")) NameError: global name '_' is not defined Possible workaround / fix: Run 'localize()' early on in the definition of 'affect()' instead of delegating this to individual extensions? Reproduced with Inkscape 0.91 and 0.91+devel r14615 on OS X 10.7.5. Messages in inkex.py marked for translation (with '_()') cause the script / extension to abort with 'NameError' unless the extension which imports inkex does run 'inkex.localize()' (currently, only extensions which themselves need gettext for translated messages do this). Steps to reproduce: 1) apply attached diff to $PREFIX/share/inkscape/extensions/inkex.py 2) launch Inkscape 0.91 or trunk 3) apply an extension which runs 'inkex.localize()': Extensions > Render > Alphabet Soup --> success: renders and returns "This is a test" as expected 4) apply an extension which does not run 'inkex.localize()': Extensions > Render > Gear > Gear --> failure: Traceback (most recent call last):   File "render_gears.py", line 184, in <module>     e.affect()   File "$PREFIX/share/inkscape/extensions/inkex.py", line 267, in affect     self.parse()   File "$PREFIX/share/inkscape/extensions/inkex.py", line 165, in parse     errormsg(_("This is a test")) NameError: global name '_' is not defined Possible workaround / fix: Run 'localize()' early on in the definition of 'affect()' instead of delegating this to individual extensions? Reproduced with Inkscape 0.91 and 0.91+devel r14615 on OS X 10.7.5.
2016-01-26 20:04:45 su_v bug added subscriber jazzynico
2016-01-27 06:51:59 jazzynico inkscape: importance Undecided Medium
2016-01-27 06:51:59 jazzynico inkscape: status New Triaged
2016-01-27 06:51:59 jazzynico inkscape: assignee jazzynico (jazzynico)
2016-05-26 09:28:30 Launchpad Janitor branch linked lp:inkscape
2016-05-26 09:32:06 jazzynico inkscape: status Triaged Fix Committed
2017-01-10 19:09:47 Bryce Harrington inkscape: status Fix Committed Fix Released