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 72219 - intltool should support new format glade files
intltool should support new format glade files
Status: RESOLVED FIXED
Product: intltool
Classification: Deprecated
Component: general
unspecified
Other All
: Normal major
: ---
Assigned To: intltool maintainers
intltool maintainers
: 69017 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-02-22 07:34 UTC by James Henstridge
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add support for new style glade files to intltool (2.03 KB, patch)
2002-02-22 07:35 UTC, James Henstridge
none Details | Review

Description James Henstridge 2002-02-22 07:34:36 UTC
I just wrote a quick hack to get intltool to handle new style glade files.
 This is needed to handle translations in the interface files of various
gnome 2.0 programs.

It also makes intltool treat files with the extension glade2 like glade
files (once everything settles down with the new glade, most people will
just be calling them .glade files.  But for now with people running
libglade-convert as part of the build process, this is necessary).

It just tacks on an extra check to the current glade file handling in
intltool-extract.  This seemed like the easiest way to fix things, and
shouldn't cause any breakage.
Comment 1 James Henstridge 2002-02-22 07:35:23 UTC
Created attachment 6820 [details] [review]
Add support for new style glade files to intltool
Comment 2 Darin Adler 2002-02-22 17:34:04 UTC
Looks fine to me. You have my OK to commit to intltool.

You can tweak it by using the regex glade2?(\.in)* instead of making
two separate cases for the glade 1 and glade 2 files.

Also, this code:

/<(property|atkproperty)\s+[^>]*translatable="yes"[^>]*>([^<]+)<\/(property|atkproperty)>/

has a number of weaknesses. First, you should use \1 instead of
(property|atkproperty) the 2nd time -- that way it will work only if
the tags match, and the regex will be shorter. But also, the use of
[^>] means you'll have big problems if anyone puts a ">" character in
double quotes. You can probably make a regex that will handle that
better, but it's not necessary.
Comment 3 Darin Adler 2002-02-22 17:34:59 UTC
Oh darn, forgot the most important thing!

If you add this support to intltool, you should also add a test for
this type of file to the intltool test directory. Let me know if you
need help figuring out how to do that.
Comment 4 Christian Rose 2002-02-23 02:05:07 UTC
This seems to be a duplicate of bug 69017.
Comment 5 James Henstridge 2002-02-23 02:40:16 UTC
*** Bug 69017 has been marked as a duplicate of this bug. ***
Comment 6 James Henstridge 2002-02-23 02:46:39 UTC
Checked in with Darin's change recommendations, and a test case (the
simple.glade example from libglade).  Marking fixed.  Anyone want to
verify?