summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--doc/I18N-HOWTO26
-rw-r--r--intltool-extract.in2
-rw-r--r--tests/cases/extract-gtkbuilder-single.ui29
-rw-r--r--tests/results/extract-gtkbuilder-single.ui.h3
-rwxr-xr-xtests/selftest.pl.in6
6 files changed, 42 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index f4db6bf..494c96e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.53])
-AC_INIT([intltool], [0.50.1])
+AC_INIT([intltool], [0.50.3])
AC_CONFIG_SRCDIR([intltoolize.in])
AM_INIT_AUTOMAKE([foreign])
diff --git a/doc/I18N-HOWTO b/doc/I18N-HOWTO
index 36c14d0..466719e 100644
--- a/doc/I18N-HOWTO
+++ b/doc/I18N-HOWTO
@@ -50,7 +50,7 @@ int main (void) {
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
to configure.in, just after AC_INIT
- Change AC_CONFIG_HEADER to AM_CONFIG_HEADER as well.
+ Change AC_CONFIG_HEADERS to AM_CONFIG_HEADER as well.
If you have an empty AC_CONFIG_FILES macro, then comment that, or automake
will fail in the next step.
@@ -92,13 +92,7 @@ int main (void) {
The gettext macros need to be added after the initial checks.
Putting them after the checks for library functions is a good idea.
- IT_PROG_INTLTOOL(0.26)
-
- AM_GNU_GETTEXT([external]) # Only one of these two macro calls
- AM_GLIB_GNU_GETTEXT # is needed to set up your project
-
- ALL_LINGUAS="da nl" # Internationalization, means there is
- # a .po file for danish and dutch.
+ IT_PROG_INTLTOOL(0.50.0)
AC_OUTPUT(
Makefile
@@ -111,19 +105,6 @@ int main (void) {
Please require the latest intltool that exists. Intltool releases
are pretty stable and often only contains bugfixes.
- AM_GNU_GETTEXT adds native language support to automake, together
- with a compile option.
-
- AM_GNU_GETTEXT will check for additional required functions and
- programs and will finally create po/POTFILES during configure.
-
- Instead of AM_GNU_GETTEXT you can use AM_GLIB_GNU_GETTEXT, which
- will do a few less things than AM_GNU_GETTEXT, but does more than
- enough for what intltool needs to work.
-
- You do NOT need to use both AM_GNU_GETTEXT and AM_GLIB_GNU_GETTEXT
- together though. Only one of them will suffice.
-
The text domain is identified by PACKAGE. We will need to add a few
functions later on to helloworld.c that will use this #define'd variable.
@@ -135,9 +116,6 @@ int main (void) {
da nl
- NOTE: These used to be in configure.{in,ac} in the ALL_LINGUAS
- variable. This is deprecated since gettext 0.11
-
9. Run
aclocal
to make sure that the necessary autoconf and automake macros
diff --git a/intltool-extract.in b/intltool-extract.in
index 5afc292..6e9c3cf 100644
--- a/intltool-extract.in
+++ b/intltool-extract.in
@@ -847,7 +847,7 @@ sub type_glade {
}
## handle new glade files
- while ($input =~ /<(\w+)\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/extract-gtkbuilder-single.ui b/tests/cases/extract-gtkbuilder-single.ui
new file mode 100644
index 0000000..926bb67
--- /dev/null
+++ b/tests/cases/extract-gtkbuilder-single.ui
@@ -0,0 +1,29 @@
+<interface>
+ <object class='GtkDialog' id='dialog1'>
+ <child internal-child='vbox'>
+ <object class='GtkVBox' id='vbox1'>
+ <property name='border-width'>10</property>
+ <child internal-child='action_area'>
+ <object class='GtkHBox' id='hbox1'>
+ <property name='border-width'>20</property>
+ <child>
+ <object class='GtkLabel' id='help'>
+ <property name='label' translatable='yes'>help</property>
+ </object>
+ </child>
+ <child>
+ <object class='GtkLabel' id='user-help'>
+ <property name='label' translatable='yes' context='user'>help</property>
+ </object>
+ </child>
+ <child>
+ <object class='GtkLabel' id='developer-help'>
+ <property name='label' translatable='yes' context='developer'>help</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/tests/results/extract-gtkbuilder-single.ui.h b/tests/results/extract-gtkbuilder-single.ui.h
new file mode 100644
index 0000000..da417c8
--- /dev/null
+++ b/tests/results/extract-gtkbuilder-single.ui.h
@@ -0,0 +1,3 @@
+char *s = N_("help");
+char *s = C_("user", "help");
+char *s = C_("developer", "help");
diff --git a/tests/selftest.pl.in b/tests/selftest.pl.in
index e27d965..8746f9b 100755
--- a/tests/selftest.pl.in
+++ b/tests/selftest.pl.in
@@ -289,6 +289,12 @@ $case = "gsettings.gschema.xml";
system("$INTLTOOL_EXTRACT --type=gettext/gsettings --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
+print "39. Allow single quotes, like translatable='yes': ";
+$case = "extract-gtkbuilder-single.ui";
+system("$INTLTOOL_EXTRACT --type=gettext/glade --quiet --update cases/$case") == 0 or $failed = 1;
+check_extract_result($case);
+
+
system("rm -f cases/*.*") if $srcdir ne ".";
system("rm -rf C az extract9 fr fr_BE fr_FR merge6 schemasmerge1 schemasmerge2 spacepreserve test test-quoted merge6.xml");