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 615141 - yelp TOC title is not localized
yelp TOC title is not localized
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-08 05:26 UTC by Takao Fujiwara
Modified: 2010-05-18 02:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for yelp-toc.c (850 bytes, patch)
2010-04-08 05:31 UTC, Takao Fujiwara
none Details | Review

Description Takao Fujiwara 2010-04-08 05:26:43 UTC
When you run yelp without arguments, the yelp window shows toc title names on the left and all title names are not localized even thought /usr/share/yelp/toc.xml has the translations. E.g. "Accessibility", "Sound & Video"...
Comment 1 Takao Fujiwara 2010-04-08 05:31:00 UTC
Created attachment 158174 [details] [review]
Patch for yelp-toc.c

The /usr/share/yelp/toc.xml format is below.

  <title>Desktop</title>
  <title xml:lang="af">Tafelblad</title>
...

The first tag doesn't have the lang attribute and the value "Desktop" is English.
Yelp xml_trim_titles() uses xmlNodeGetLang() to get the language but it's returns the parent node's language if the current node's language is NULL.
Then the first tag returns the current locale so the English value is always matched 100%.

The suggestion is to use xmlGetNsProp() to get the current node's language.
I'm attaching the patch.
Comment 2 Takao Fujiwara 2010-05-17 13:18:57 UTC
Is it OK to commit the patch?
Comment 3 Shaun McCance 2010-05-17 14:17:01 UTC
Looks good. Please commit. Thanks.
Comment 4 Takao Fujiwara 2010-05-18 02:23:24 UTC
Thanks for your review.
Committed the patch.