After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 155843 - Recent versions are not merging translations back in to .xml
Recent versions are not merging translations back in to .xml
Status: RESOLVED FIXED
Product: intltool
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: intltool maintainers
intltool maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-19 14:36 UTC by Jody Goldberg
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Misc fixes for handling translation of attributes (2.84 KB, patch)
2004-10-19 19:31 UTC, Danilo Segan
none Details | Review
Updated patch for handling translation of attributes (3.31 KB, patch)
2004-10-19 20:20 UTC, Danilo Segan
committed Details | Review

Description Jody Goldberg 2004-10-19 14:36:41 UTC
gnumeric head recently added translations for the names of the various toolbars
to display in the View -> Toolbars menu for showing/hiding the toolbars.

The src text is in gnumeric/src/GNOME_Gnumeric-gtk.xml.in with a _name field for
each of the three toolbars.  There are translations for the names in a few
locales now (eg ja).  Strangely, the generated .xml does not contain the
transations for people running 0.31.x, earlier versions (0.29) merge things. 
This is actually exactly the behaviour we want, but is probably a bug.
Comment 1 Danilo Segan 2004-10-19 18:53:18 UTC
This is indeed the case. Thanks for spotting it.

I'm looking into it right now (btw, it seems to work with "-m"/"--multi" option,
which is even more strange).
Comment 2 Danilo Segan 2004-10-19 19:31:49 UTC
Created attachment 32785 [details] [review]
Misc fixes for handling translation of attributes

This revealed a bunch of other bugs in attributes handling inside nested
strings. I fixed these, and everything seems to work. I should also probably
work on a testcase, since this is easily borked, and it appears it's rare in
practice (which explains why it took so long to notice it, and why we don't
have any testcases which expose this).

2004-10-19  Danilo Šegan  <dsegan@gmx.net>

	* intltool-merge (getXMLstring): Use @{$content}[0] instead of
	top-level $attrs for each tag.
	(getAttributeString): Set $translation if attributes need translation.
	(traverse): Add \$translate to getAttributeString calls. Use
	untranslated text if only attributes need translation.
Comment 3 Danilo Segan 2004-10-19 19:40:28 UTC
I need to work on this a bit more, since it currently causes problems with "-m"
(not really problems, but it outputs the same stuff twice: once without
"xml:lang" set, and then with it). Since the change of "-m", we want only the
variant with "xml:lang" set.
Comment 4 Danilo Segan 2004-10-19 20:20:59 UTC
Created attachment 32791 [details] [review]
Updated patch for handling translation of attributes

2004-10-19  Danilo Šegan  <dsegan@gmx.net>

	Fixes #155843.
	
	* intltool-merge (getXMLstring): Use @{$content}[0] instead of
	top-level $attrs for each tag.
	(traverse): Add \$translate to getAttributeString calls. Use
	untranslated text for tag content if only attributes need
	translation.
	(getAttributeString): Set $translate = 2 if some attribute is
	translated, otherwise $translate = 1 if translation might be
	needed.