GNOME Bugzilla – Bug 630053
Does not use localized values from xslt/gettext/l10n.xml
Last modified: 2011-01-10 16:13:11 UTC
Reported downstream: https://bugs.launchpad.net/ubuntu/+source/yelp/+bug/556683 Yelp does not use the localized values from the /usr/share/xml/gnome/xslt/gettext/l10n.xml file (part of gnome-doc-utils). To reproduce: Open Empathy help, on the bottom of the page, you should see "Further Reading" and "See Also" localized. http://people.ubuntu.com/~milo/yelp-problem.png (on Ubuntu) http://people.ubuntu.com/~kelemeng/pix/yelp.png (on Fedora 13) For another example start: yelp ghelp:user-guide#gosnautilus-28 The Opening Files section of the Gnome User Guide opens, hover over the "file extensions" link, and it will show the tooltip "Read the definition of ´file extension´" - unlocalized. Strangely, this works only on Ubuntu, on Fedora it is not a link, just italic text. http://people.ubuntu.com/~kelemeng/pix/Opening%20Files.png Also, I have to note that localization of <quote> tags seems to work, despite what I said in the Ubuntu bug.
It looks like our translated Mallard files don't have the xml:lang attribute set, so I guess it's xml2po's fault.
(In reply to comment #1) > It looks like our translated Mallard files don't have the xml:lang attribute > set, so I guess it's xml2po's fault. Indeed, changing the second line of a translated .page file to <page xmlns="http://projectmallard.org/1.0/" type="topic" id="introduction" lang="hu"> solves the problem, strings get translated.
Created attachment 176991 [details] [review] Add language attribute to the page element I stole some code from the DocBook processing class of xml2po. Also, I noticed that after generating the help of Orca with this applied, the Previous and Next navigational links on the top of the pages are not translated, while the Further Reading and See Also static texts at the bottom are. Probably another bug.
Thanks for the patch. You can drop the DocBook-specific comment. And the while loop for root is almost certainly unnecessary, because there's only one root element that getRootElement could possibly get. Finally, for Mallard you should really use the attribute name 'xml:lang' instead of 'lang'.
(In reply to comment #4) > Finally, for Mallard you should > really use the attribute name 'xml:lang' instead of 'lang'. I'm sorry, I have no idea how to do this - I'm more of a translator than anything else, I just wanted to submit a proof of concept patch.