GNOME Bugzilla – Bug 155843
Recent versions are not merging translations back in to .xml
Last modified: 2004-12-22 21:47:04 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.
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).
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.
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.
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.