Symbol set names are not translatable

Bug #1261198 reported by Kris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
jazzynico

Bug Description

The names of symbol sets (AIGA symbol signs, Word balloons, etc.) in the symbol dialog (shift+ctrl+Y) can not be translated.

Revision history for this message
jazzynico (jazzynico) wrote :

I'm going to take a look.

Changed in inkscape:
assignee: nobody → jazzynico (jazzynico)
milestone: none → 0.49
status: New → Triaged
tags: added: translation
jazzynico (jazzynico)
Changed in inkscape:
status: Triaged → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Fix committed revision 12946.

Changed in inkscape:
status: In Progress → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :
Download full text (3.5 KiB)

JFYI - r12946 seems to break out-of-source builds on OS X. I vaguely recall from bug #1170803 that syntax based on $(wildcard …) is not full portable, though the issue could be unrelated... seems that the paths get mangled with out-of-source build:

In-src-tree build:
=============
(…)
Making all in symbols
 cd ../.. && /bin/sh /Volumes/magenta/mp-trunk/src/inkscape-repo/mptrunk-x11-check/build-aux/missing automake-1.14 --foreign share/symbols/Makefile
configure.ac:213: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
configure.ac:213: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
configure.ac:213: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
share/symbols/Makefile.am:5: warning: wildcard $(srcdir: non-POSIX variable name
share/symbols/Makefile.am:5: (probably a GNU make extension)
share/symbols/Makefile.am:10: warning: wildcard $(srcdir: non-POSIX variable name
share/symbols/Makefile.am:10: (probably a GNU make extension)
share/symbols/Makefile.am:13: warning: foreach i,$(symbols_i18n: non-POSIX variable name
share/symbols/Makefile.am:13: (probably a GNU make extension)
 cd ../.. && /bin/sh ./config.status share/symbols/Makefile
config.status: creating share/symbols/Makefile
./i18n.py ././AigaSymbols.svg ././BalloonSymbols.svg ././FlowSymbols.svg ././LogicSymbols.svg ././MapSymbols.svg > ./symbols.h
Making all in templates
(…)

out-of-src-tree build:
=================
(…)
Making all in symbols
 cd ../../.. && /bin/sh /Volumes/magenta/mp-trunk/src/inkscape-repo/bugfix/build-aux/missing automake-1.14 --foreign share/symbols/Makefile
configure.ac:213: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
configure.ac:213: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
configure.ac:213: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
share/symbols/Makefile.am:5: warning: wildcard $(srcdir: non-POSIX variable name
share/symbols/Makefile.am:5: (probably a GNU make extension)
share/symbols/Makefile.am:10: warning: wildcard $(srcdir: non-POSIX variable name
share/symbols/Makefile.am:10: (probably a GNU make extension)
share/symbols/Makefile.am:13: warning: foreach i,$(symbols_i18n: non-POSIX variable name
share/symbols/Makefile.am:13: (probably a GNU make extension)
 cd ../.. && /bin/sh ./config.status share/symbols/Makefile
config.status: creating share/symbols/Makefile
../../../share/symbols/i18n.py ../../../share/symbols/../../../share/symbols/AigaSymbols.svg ../../../share/symbols/../../../share/symbols/BalloonSymbols.svg ../../../share/symbols/../../../share/symbols/FlowSymbols.svg ../../../share/symbols/../../../share/symbols/LogicSymbols.svg ../../../share/symbols/../../../share/symbols/MapSymbols.svg > ../../../share/symbols/symbols.h
Traceback (most recent call last):
  File "../../../share/symbols/i18n.py", line 9, in <module>
    doc = minidom.parse(filename)
  File "/Volumes/magenta/mp-trunk/quartz/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/Volumes/magenta/mp-trunk/quartz/Library/F...

Read more...

Revision history for this message
su_v (suv-lp) wrote :

Could you review & test proposed fix as attached?

Revision history for this message
su_v (suv-lp) wrote :

SImplified patch (tested successfully with in-src and out-of-src build).

Revision history for this message
jazzynico (jazzynico) wrote :

> Could you review & test proposed fix as attached?

Works perfectly with in-src-tree build.
Out-src-tree build test in progress...

Revision history for this message
jazzynico (jazzynico) wrote :

Out-src-tree build test successful too!
Fixed in the trunk revision 12947.

Thanks for the patch, ~suv!

Revision history for this message
su_v (suv-lp) wrote :

Fix typo in ignore list (r12946)

Revision history for this message
jazzynico (jazzynico) wrote :

Simplified patch and typo fix committed revision 12948.
Thanks again!

Revision history for this message
Martin Owens (doctormo) wrote :

So the fix takes translations for the symbols from inkscape's internal pot file? I was hoping we could find a solution that could extract the translations from the svg files themselves, but I guess that would be hard to do right.

Revision history for this message
su_v (suv-lp) wrote :

r12946 breaks GTK3 builds - build error:

  CXX ui/dialog/symbols.o
../../src/ui/dialog/symbols.cpp: In member function ‘void Inkscape::UI::Dialog::SymbolsDialog::get_symbols()’:
../../src/ui/dialog/symbols.cpp:542: error: ‘str_has_suffix’ is not a member of ‘Glib’
../../src/ui/dialog/symbols.cpp:542: error: ‘str_has_suffix’ is not a member of ‘Glib’
make[3]: *** [ui/dialog/symbols.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Revision history for this message
su_v (suv-lp) wrote :

Proposed fix for GTK3 builds - please test.

Revision history for this message
jazzynico (jazzynico) wrote :

str_has_suffix error fixed revision 12949.

@Martin - All the translatable content in the share folder (filters, patterns, palettes, templates and symbols) is extracted to a header file with a Python script, and then the .h file is used to populate the inkscape.pot template.

Revision history for this message
jazzynico (jazzynico) wrote :

Revision 12950 replaces my far too stupid patch in 12949 with ~suv's patch (I must take a rest...).

jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.