DXF output, Python script error: No translation file found for domain: 'inkscape'

Bug #1024325 reported by Yann Papouin on 2012-07-13
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
High
jazzynico

Bug Description

Windows 7 - 64-bits
Rev 11547

Traceback (most recent call last):
  File "dxf_outlines.py", line 33, in <module>
    import inkex, simplestyle, simpletransform, cubicsuperpath, coloreffect, dxf_templates, math
  File "C:\inkscape\inkscape\share\extensions\inkex.py", line 43, in <module>
    gettext= gettext.translation('inkscape', "C:\Program Files\Inkscape\locale", [current_locale])
  File "C:\inkscape\inkscape\python\Lib\gettext.py", line 469, in translation
    raise IOError(ENOENT, 'No translation file found for domain', domain)
IOError: [Errno 2] No translation file found for domain: 'inkscape'

It's not related to this specific extension, the problem comes from somewhere else

jazzynico (jazzynico) wrote :

My fault. Forgot to activate fallback in the python translation code...

Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
importance: Undecided → Low
status: New → In Progress
jazzynico (jazzynico) wrote :

Fixed revision 11548.

Changed in inkscape:
status: In Progress → Fix Released
tags: added: extensions-plugins translation
Yann Papouin (yann-papouin) wrote :

Thank you :)

su_v (suv-lp) wrote :

On OS X, with Inkscape 0.48+devel r11548, running any python-based extension fails with this error:

Traceback (most recent call last):
  File "debug.py", line 7, in <module>
    import inkex
  File "/Volumes/cyan/src/inkscape/inkscape-repo/mp-test/inst/share/inkscape/extensions/inkex.py", line 45, in <module>
    gettext= gettext.translation('inkscape')
  File "/Volumes/cyan/mp-test/with-a-long-long-long-directory-name/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py", line 469, in translation
    raise IOError(ENOENT, 'No translation file found for domain', domain)
IOError: [Errno 2] No translation file found for domain: 'inkscape'

su_v (suv-lp) wrote :

Above error on OS X is with the default command line version (I currently don't build one configured for packaging on OS X).

Changed in inkscape:
status: Fix Released → Confirmed
su_v (suv-lp) wrote :

@JazzyNico - do you happen to know which command/package would be responsible to register such a translation domain?
(I wonder whether that would work with the osx-packaged app in case this requires to have some config or settings demon process running)

su_v (suv-lp) wrote :

Raising bug importance: script-based extension system essentially broken.

Changed in inkscape:
importance: Low → Medium
su_v (suv-lp) wrote :

AFAIU the location of the locale files depends on prefix used for configure on linux/osx, and might be a relative path if packaged (osxapp). The current workaround for win32 will likely fail for the portable version and for users who didn't installed Inkscape into the default location.

Could 'PACKAGE_LOCALE_DIR' (defined via configure.ac) or 'INKSCAPE_LOCALE' be added to 'set_extensions_env()' in 'src/main.cpp' (similar to PYTHONPATH), so that the externally spawned python script 'inkex.py' does inherit an environment variable containing the path to the currently configured locale dir?

su_v (suv-lp) wrote :

Raising bug importance to 'High' - based on new duplicate, this also affects major linux distros.

Changed in inkscape:
importance: Medium → High
jazzynico (jazzynico) on 2012-07-16
Changed in inkscape:
status: Confirmed → In Progress
jazzynico (jazzynico) wrote :

New patch committed revision 11551.
Tested on Windows XP, Seven and Ubuntu 11.04.

Changed in inkscape:
status: In Progress → Fix Released
Roberto Delgado (rodeloli) wrote :

Tested on Ubuntu 12.04, fix working great.

su_v (suv-lp) wrote :

> Tested on Ubuntu 12.04, fix working great.

Do you get translated error messages returned from extensions, or is this referring to extensions generally working again without that error messages?

Roberto Delgado (rodeloli) wrote :

I'm referring to extensions generally working again without that error messages.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers