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 596205 - Strings with unicode chars in gtkbuilder ui file (like ߪ ) can not get translated
Strings with unicode chars in gtkbuilder ui file (like ߪ ) can not get ...
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-24 16:32 UTC by Michael Vogt
Modified: 2010-05-29 02:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (847 bytes, patch)
2010-03-17 15:16 UTC, Christian Persch
committed Details | Review

Description Michael Vogt 2009-09-24 16:32:37 UTC
When there is a string with a special utf-8 char (like …) glade-3 escapes that in the ui file it generates. When intltool extracts the strings, it gets added as "ߪ" to the pot. When the app is using gtk then to load the file again, it looks like the string is first unescaped and then passed to gettext(). This means that gettext() does not find it (it has "stringߪ" but not "string…").

To reproduce:
- create a gtkbuilder ui file with "…"
- create a translation
- verify that the translation is not applied

- change the .ui file to have "…" in it instead of ߪ
- verify that it works then
Comment 1 Michael Vogt 2009-09-24 16:37:02 UTC
The Description summry
Comment 2 Robert Ancell 2010-01-11 06:15:08 UTC
Is there a reason why the files generated with Glade can have the header:
<?xml version="1.0" encoding="UTF-8"?>
and not escape the characters?

Note I was attempting to patch intltool but unfortunately it appears that .pot files do not have a defined encoding:
https://code.edge.launchpad.net/~robert-ancell/intltool/xml_numeric_charrefs/+merge/16111
Comment 3 Christian Persch 2010-03-17 15:16:29 UTC
Created attachment 156364 [details] [review]
fix

Well, that turned out to be really simple :)
Comment 4 Tristan Van Berkom 2010-03-17 15:42:05 UTC
Review of attachment 156364 [details] [review]:

Thanks a lot ! please commit.

(and please include a ChangeLog entry... I know... not everybody is using one these days)
Comment 5 Christian Persch 2010-03-17 17:05:36 UTC
Fixed on master.
Comment 6 Diego Escalante Urrelo (not reading bugmail) 2010-05-29 02:45:32 UTC
Committed. Thanks Gabor!
Comment 7 Diego Escalante Urrelo (not reading bugmail) 2010-05-29 02:46:46 UTC
Oh well. I guess git-bz doesn't play well with references to other bugs in the log. The comment was for bug #613119.