diff options
-rw-r--r-- | intltool-extract.in | 2 | ||||
-rw-r--r-- | tests/cases/extract8.glade | 14 | ||||
-rw-r--r-- | tests/results/extract8.glade.h | 3 |
3 files changed, 18 insertions, 1 deletions
diff --git a/intltool-extract.in b/intltool-extract.in index c48a9ec..eb6956d 100644 --- a/intltool-extract.in +++ b/intltool-extract.in @@ -847,7 +847,7 @@ sub type_glade { } ## handle new glade files - while ($input =~ /<(property|atkproperty|col)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*context\s*=\s*"([^"]*)")?(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) { + while ($input =~ /<(\w+)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*context\s*=\s*"([^"]*)")?(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) { if (!($4 =~ /^(window|label)[0-9]+$/)) { my $message = entity_decode($4); if (defined($2)) { diff --git a/tests/cases/extract8.glade b/tests/cases/extract8.glade index cf5188c..fc37b1c 100644 --- a/tests/cases/extract8.glade +++ b/tests/cases/extract8.glade @@ -2,6 +2,20 @@ <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" > <glade-interface> + <menu id='app-menu'> + <section> + <item> + <attribute name="label" translatable="yes">_New Window</attribute> + </item> + <item> + <attribute name="label" translatable="yes">_New Tab</attribute> + </item> + </section> + <section> + <attribute name="label" translatable="yes">_Quit</attribute> + </section> + </menu> + <widget class="GtkWindow" id="window1"> <property name="title" translatable="yes">Testing</property> <property name="border_width">10</property> diff --git a/tests/results/extract8.glade.h b/tests/results/extract8.glade.h index fd82e2a..f5d13a8 100644 --- a/tests/results/extract8.glade.h +++ b/tests/results/extract8.glade.h @@ -1,3 +1,6 @@ +char *s = N_("_New Window"); +char *s = N_("_New Tab"); +char *s = N_("_Quit"); char *s = N_("Testing"); /* Comment on <property> tag */ char *s = N_("A label"); |