summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--configure.in19
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gettext.texi18
-rw-r--r--src/ChangeLog12
-rw-r--r--src/Makefile.am6
-rw-r--r--src/x-glade.c451
-rw-r--r--src/x-glade.h35
-rw-r--r--src/xgettext.c5
-rw-r--r--tests/ChangeLog6
-rwxr-xr-xtests/xgettext-191569
-rwxr-xr-xtests/xgettext-20103
12 files changed, 2228 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 89e6415..4eadda7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-01-14 Bruno Haible <bruno@clisp.org>
+
+ * configure.in: Add check for libexpat.
+
2002-02-02 Bruno Haible <bruno@clisp.org>
* Makefile.am (SUBDIRS): Add libuniname.
diff --git a/configure.in b/configure.in
index fecd952..4550876 100644
--- a/configure.in
+++ b/configure.in
@@ -93,6 +93,25 @@ dnl These are the only lines required to internationalize the package.
dnl (OK, not quite, the AC_OUTPUT has also some parts.)
AM_GNU_GETTEXT(use-libtool, need-ngettext)
+dnl Check for the expat XML parser.
+dnl On operating systems where binary distribution vendors are likely to
+dnl ship both gettext and expat, we use dynamic loading to avoid a hard
+dnl dependency from gettext to expat.
+case "$host_os" in
+ linux*)
+ AC_DEFINE([DYNLOAD_LIBEXPAT], 1,
+ [Define to 1 if libexpat shall be dynamically loaded via dlopen().])
+ LIBEXPAT="-ldl"
+ LTLIBEXPAT="-ldl"
+ AC_SUBST(LIBEXPAT)
+ AC_SUBST(LTLIBEXPAT)
+ ;;
+ *)
+ AC_LIB_HAVE_LINKFLAGS([expat], [],
+ [#include <expat.h>], [XML_ExpatVersion();])
+ ;;
+esac
+
dnl Check for Emacs and where to install .elc files.
AM_PATH_LISPDIR
diff --git a/doc/ChangeLog b/doc/ChangeLog
index b8f8079..91801f4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2002-01-14 Bruno Haible <bruno@clisp.org>
+
+ * gettext.texi (Glade): New node.
+
2002-01-27 Bruno Haible <bruno@clisp.org>
* gettext.texi (gawk): Update.
diff --git a/doc/gettext.texi b/doc/gettext.texi
index 6edc36d..1a4ccbe 100644
--- a/doc/gettext.texi
+++ b/doc/gettext.texi
@@ -315,6 +315,7 @@ Internationalizable Data
* POT:: POT - Portable Object Template
* RST:: Resource String Table
+* Glade:: Glade - GNOME user interface description
Concluding Remarks
@@ -7320,6 +7321,7 @@ using GNU gettext.
@menu
* POT:: POT - Portable Object Template
* RST:: Resource String Table
+* Glade:: Glade - GNOME user interface description
@end menu
@node POT, RST, List of Data Formats, List of Data Formats
@@ -7336,7 +7338,7 @@ gettext
@code{xgettext}
@end table
-@node RST, , POT, List of Data Formats
+@node RST, Glade, POT, List of Data Formats
@subsection Resource String Table
@cindex RST
@@ -7351,6 +7353,20 @@ fpk
@code{xgettext}, @code{rstconv}
@end table
+@node Glade, , RST, List of Data Formats
+@subsection Glade - GNOME user interface description
+
+@table @asis
+@item RPMs
+glade, libglade, xml-i18n-tools
+
+@item File extension
+@code{glade}
+
+@item Extractor
+@code{xgettext}, @code{libglade-xgettext}
+@end table
+
@c This is the template for new data formats.
@ignore
diff --git a/src/ChangeLog b/src/ChangeLog
index ef6eb4c..dea45cd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
+2002-01-14 Bruno Haible <bruno@clisp.org>
+
+ * x-glade.h: New file.
+ * x-glade.c: New file.
+ * xgettext.c: Include x-glade.h.
+ (main): Call x_glade_extract_all, x_glade_keyword.
+ (language_to_scanner): Add glade rule.
+ (extension_to_language): Add glade rule.
+ * Makefile.am (noinst_HEADERS): Add x-glade.h.
+ (xgettext_SOURCES): Add x-glade.c.
+ (xgettext_LDADD): Add @LTLIBEXPAT@.
+
2002-01-27 Bruno Haible <bruno@clisp.org>
* message.h (format_type): New enum value 'format_awk'.
diff --git a/src/Makefile.am b/src/Makefile.am
index 1b5ed1f..9eeaca9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,7 +33,7 @@ po-gram-gen.h po-hash-gen.h msgl-charset.h msgl-equal.h msgl-iconv.h \
msgl-ascii.h msgl-cat.h msgl-english.h msgfmt.h msgunfmt.h read-mo.h \
write-mo.h read-java.h write-java.h po-time.h plural-table.h format.h \
xgettext.h x-c.h x-po.h x-python.h x-lisp.h x-elisp.h x-librep.h x-java.h \
-x-awk.h x-ycp.h x-rst.h
+x-awk.h x-ycp.h x-rst.h x-glade.h
EXTRA_DIST = FILES project-id \
gnu/gettext/DumpResource.java gnu/gettext/GetURL.java
@@ -88,7 +88,7 @@ msgmerge_SOURCES = msgmerge.c
msgunfmt_SOURCES = msgunfmt.c read-mo.c read-java.c
xgettext_SOURCES = xgettext.c \
x-c.c x-po.c x-python.c x-lisp.c x-elisp.c x-librep.c x-java.l x-awk.c \
- x-ycp.c x-rst.c
+ x-ycp.c x-rst.c x-glade.c
msgattrib_SOURCES = msgattrib.c
msgcat_SOURCES = msgcat.c
msgcomm_SOURCES = msgcomm.c
@@ -118,7 +118,7 @@ msgcmp_LDADD = libgettextsrc.la
msgfmt_LDADD = libgettextsrc.la
msgmerge_LDADD = libgettextsrc.la
msgunfmt_LDADD = libgettextsrc.la
-xgettext_LDADD = libgettextsrc.la $(LIBUNINAME)
+xgettext_LDADD = libgettextsrc.la $(LIBUNINAME) @LTLIBEXPAT@
msgattrib_LDADD = libgettextsrc.la
msgcat_LDADD = libgettextsrc.la
msgcomm_LDADD = libgettextsrc.la
diff --git a/src/x-glade.c b/src/x-glade.c
new file mode 100644
index 0000000..10d1f2f
--- /dev/null
+++ b/src/x-glade.c
@@ -0,0 +1,451 @@
+/* xgettext glade backend.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+ This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#if DYNLOAD_LIBEXPAT
+# include <dlfcn.h>
+#else
+# if HAVE_LIBEXPAT
+# include <expat.h>
+# endif
+#endif
+
+#include "message.h"
+#include "x-glade.h"
+#include "xgettext.h"
+#include "error.h"
+#include "xerror.h"
+#include "basename.h"
+#include "progname.h"
+#include "xmalloc.h"
+#include "exit.h"
+#include "hash.h"
+#include "po-charset.h"
+#include "msgl-ascii.h"
+#include "msgl-iconv.h"
+#include "gettext.h"
+
+#define _(s) gettext(s)
+
+
+/* glade is an XML based format. Some example files are contained in
+ libglade-0.16. */
+
+
+/* Prototypes for local functions. Needed to ensure compiler checking of
+ function argument counts despite of K&R C function definition syntax. */
+static void init_keywords PARAMS ((void));
+
+
+/* ====================== Keyword set customization. ====================== */
+
+/* If true extract all strings. */
+static bool extract_all = false;
+
+static hash_table keywords;
+static bool default_keywords = true;
+
+
+void
+x_glade_extract_all ()
+{
+ extract_all = true;
+}
+
+
+void
+x_glade_keyword (name)
+ const char *name;
+{
+ if (name == NULL)
+ default_keywords = false;
+ else
+ {
+ if (keywords.table == NULL)
+ init_hash (&keywords, 100);
+
+ insert_entry (&keywords, name, strlen (name), NULL);
+ }
+}
+
+/* Finish initializing the keywords hash table.
+ Called after argument processing, before each file is processed. */
+static void
+init_keywords ()
+{
+ if (default_keywords)
+ {
+ x_glade_keyword ("label");
+ x_glade_keyword ("title");
+ x_glade_keyword ("text");
+ x_glade_keyword ("format");
+ x_glade_keyword ("copyright");
+ x_glade_keyword ("comments");
+ x_glade_keyword ("preview_text");
+ x_glade_keyword ("tooltip");
+ default_keywords = false;
+ }
+}
+
+
+/* ===================== Dynamic loading of libexpat. ===================== */
+
+#if DYNLOAD_LIBEXPAT
+
+/* Prototypes for local functions. Needed to ensure compiler checking of
+ function argument counts despite of K&R C function definition syntax. */
+static bool load_libexpat PARAMS ((void));
+
+typedef void *XML_Parser;
+typedef char XML_Char;
+typedef char XML_LChar;
+enum XML_Error { XML_ERROR_NONE };
+typedef void (*XML_StartElementHandler) PARAMS ((void *userData, const XML_Char *name, const XML_Char **atts));
+typedef void (*XML_EndElementHandler) PARAMS ((void *userData, const XML_Char *name));
+typedef void (*XML_CharacterDataHandler) PARAMS ((void *userData, const XML_Char *s, int len));
+typedef void (*XML_CommentHandler) PARAMS ((void *userData, const XML_Char *data));
+
+static XML_Parser (*p_XML_ParserCreate) PARAMS ((const XML_Char *encoding));
+static void (*p_XML_SetElementHandler) PARAMS ((XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end));
+static void (*p_XML_SetCharacterDataHandler) PARAMS ((XML_Parser parser, XML_CharacterDataHandler handler));
+static void (*p_XML_SetCommentHandler) PARAMS ((XML_Parser parser, XML_CommentHandler handler));
+static int (*p_XML_Parse) PARAMS ((XML_Parser parser, const char *s, int len, int isFinal));
+static enum XML_Error (*p_XML_GetErrorCode) PARAMS ((XML_Parser parser));
+static int (*p_XML_GetCurrentLineNumber) PARAMS ((XML_Parser parser));
+static int (*p_XML_GetCurrentColumnNumber) PARAMS ((XML_Parser parser));
+static void (*p_XML_ParserFree) PARAMS ((XML_Parser parser));
+static const XML_LChar * (*p_XML_ErrorString) PARAMS ((int code));
+
+#define XML_ParserCreate (*p_XML_ParserCreate)
+#define XML_SetElementHandler (*p_XML_SetElementHandler)
+#define XML_SetCharacterDataHandler (*p_XML_SetCharacterDataHandler)
+#define XML_SetCommentHandler (*p_XML_SetCommentHandler)
+#define XML_Parse (*p_XML_Parse)
+#define XML_GetErrorCode (*p_XML_GetErrorCode)
+#define XML_GetCurrentLineNumber (*p_XML_GetCurrentLineNumber)
+#define XML_GetCurrentColumnNumber (*p_XML_GetCurrentColumnNumber)
+#define XML_ParserFree (*p_XML_ParserFree)
+#define XML_ErrorString (*p_XML_ErrorString)
+
+static int libexpat_loaded = 0;
+
+static bool
+load_libexpat ()
+{
+ if (libexpat_loaded == 0)
+ {
+ void *handle = dlopen ("libexpat.so.0", RTLD_LAZY);
+ if (handle != NULL
+ && (p_XML_ParserCreate = dlsym (handle, "XML_ParserCreate")) != NULL
+ && (p_XML_SetElementHandler = dlsym (handle, "XML_SetElementHandler")) != NULL
+ && (p_XML_SetCharacterDataHandler = dlsym (handle, "XML_SetCharacterDataHandler")) != NULL
+ && (p_XML_SetCommentHandler = dlsym (handle, "XML_SetCommentHandler")) != NULL
+ && (p_XML_Parse = dlsym (handle, "XML_Parse")) != NULL
+ && (p_XML_GetErrorCode = dlsym (handle, "XML_GetErrorCode")) != NULL
+ && (p_XML_GetCurrentLineNumber = dlsym (handle, "XML_GetCurrentLineNumber")) != NULL
+ && (p_XML_GetCurrentColumnNumber = dlsym (handle, "XML_GetCurrentColumnNumber")) != NULL
+ && (p_XML_ParserFree = dlsym (handle, "XML_ParserFree")) != NULL
+ && (p_XML_ErrorString = dlsym (handle, "XML_ErrorString")) != NULL)
+ libexpat_loaded = 1;
+ else
+ libexpat_loaded = -1;
+ }
+ return libexpat_loaded >= 0;
+}
+
+#define LIBEXPAT_AVAILABLE() (load_libexpat ())
+
+#elif HAVE_LIBEXPAT
+
+#define LIBEXPAT_AVAILABLE() true
+
+#endif
+
+/* ============================= XML parsing. ============================= */
+
+#if DYNLOAD_LIBEXPAT || HAVE_LIBEXPAT
+
+/* Prototypes for local functions. Needed to ensure compiler checking of
+ function argument counts despite of K&R C function definition syntax. */
+static void ensure_stack_size PARAMS ((size_t size));
+static void start_element_handler PARAMS ((void *userData, const char *name,
+ const char **attributes));
+static void end_element_handler PARAMS ((void *userData, const char *name));
+static void character_data_handler PARAMS ((void *userData, const char *s,
+ int len));
+static void comment_handler PARAMS ((void *userData, const char *data));
+static void do_extract_glade PARAMS ((FILE *fp, const char *real_filename,
+ const char *logical_filename,
+ msgdomain_list_ty *mdlp));
+
+
+/* Accumulator for the extracted messages. */
+static message_list_ty *mlp;
+
+/* Logical filename, used to label the extracted messages. */
+static char *logical_file_name;
+
+/* XML parser. */
+static XML_Parser parser;
+
+struct element_state
+{
+ bool extract_string;
+ int lineno;
+ char *buffer;
+ size_t bufmax;
+ size_t buflen;
+};
+static struct element_state *stack;
+static size_t stack_size;
+
+/* Ensures stack_size >= size. */
+static void
+ensure_stack_size (size)
+ size_t size;
+{
+ if (size > stack_size)
+ {
+ stack_size = 2 * stack_size;
+ if (stack_size < size)
+ stack_size = size;
+ stack =
+ (struct element_state *)
+ xrealloc (stack, stack_size * sizeof (struct element_state));
+ }
+}
+
+static size_t stack_depth;
+
+/* Callback called when <element> is seen. */
+static void
+start_element_handler (userData, name, attributes)
+ void *userData;
+ const char *name;
+ const char **attributes;
+{
+ struct element_state *p;
+ void *hash_result;
+
+ /* Increase stack depth. */
+ stack_depth++;
+ ensure_stack_size (stack_depth + 1);
+
+ /* Don't extract a string for the containing element. */
+ stack[stack_depth - 1].extract_string = false;
+
+ p = &stack[stack_depth];
+ p->extract_string =
+ (find_entry (&keywords, name, strlen (name), &hash_result) == 0);
+ p->lineno = XML_GetCurrentLineNumber (parser);
+ p->buffer = NULL;
+ p->bufmax = 0;
+ p->buflen = 0;
+ if (!p->extract_string)
+ xgettext_comment_reset ();
+}
+
+/* Callback called when </element> is seen. */
+static void
+end_element_handler (userData, name)
+ void *userData;
+ const char *name;
+{
+ struct element_state *p = &stack[stack_depth];
+
+ /* Actually extract string. */
+ if (p->extract_string)
+ {
+ /* Don't extract the empty string. */
+ if (p->buflen > 0)
+ {
+ lex_pos_ty pos;
+
+ if (p->buflen == p->bufmax)
+ p->buffer = (char *) xrealloc (p->buffer, p->buflen + 1);
+ p->buffer[p->buflen] = '\0';
+
+ pos.file_name = logical_file_name;
+ pos.line_number = p->lineno;
+
+ remember_a_message (mlp, p->buffer, &pos);
+ p->buffer = NULL;
+ }
+ }
+
+ /* Free memory for this stack level. */
+ if (p->buffer != NULL)
+ free (p->buffer);
+
+ /* Decrease stack depth. */
+ stack_depth--;
+
+ xgettext_comment_reset ();
+}
+
+/* Callback called when some text is seen. */
+static void
+character_data_handler (userData, s, len)
+ void *userData;
+ const char *s;
+ int len;
+{
+ struct element_state *p = &stack[stack_depth];
+
+ /* Accumulate character data. */
+ if (len > 0)
+ {
+ if (p->buflen + len > p->bufmax)
+ {
+ p->bufmax = 2 * p->bufmax;
+ if (p->bufmax < p->buflen + len)
+ p->bufmax = p->buflen + len;
+ p->buffer = (char *) xrealloc (p->buffer, p->bufmax);
+ }
+ memcpy (p->buffer + p->buflen, s, len);
+ p->buflen += len;
+ }
+}
+
+/* Callback called when some comment text is seen. */
+static void
+comment_handler (userData, data)
+ void *userData;
+ const char *data;
+{
+ /* Split multiline comment into lines, and remove leading and trailing
+ whitespace. */
+ char *copy = xstrdup (data);
+ char *p = copy;
+ char *q;
+
+ for (p = copy; (q = strchr (p, '\n')) != NULL; p = q + 1)
+ {
+ while (p[0] == ' ' || p[0] == '\t')
+ p++;
+ while (q > p && (q[-1] == ' ' || q[-1] == '\t'))
+ q--;
+ *q = '\0';
+ xgettext_comment_add (p);
+ }
+ q = p + strlen (p);
+ while (p[0] == ' ' || p[0] == '\t')
+ p++;
+ while (q > p && (q[-1] == ' ' || q[-1] == '\t'))
+ q--;
+ *q = '\0';
+ xgettext_comment_add (p);
+ free (copy);
+}
+
+
+static void
+do_extract_glade (fp, real_filename, logical_filename, mdlp)
+ FILE *fp;
+ const char *real_filename;
+ const char *logical_filename;
+ msgdomain_list_ty *mdlp;
+{
+ mlp = mdlp->item[0]->messages;
+
+ logical_file_name = xstrdup (logical_filename);
+
+ init_keywords ();
+
+ parser = XML_ParserCreate (NULL);
+ if (parser == NULL)
+ error (EXIT_FAILURE, 0, _("memory exhausted"));
+
+ XML_SetElementHandler (parser, start_element_handler, end_element_handler);
+ XML_SetCharacterDataHandler (parser, character_data_handler);
+ XML_SetCommentHandler (parser, comment_handler);
+
+ while (!feof (fp))
+ {
+ char buf[4096];
+ int count = fread (buf, 1, sizeof buf, fp);
+
+ if (count == 0)
+ {
+ if (ferror (fp))
+ error (EXIT_FAILURE, errno, _("\
+error while reading \"%s\""), real_filename);
+ /* EOF reached. */
+ break;
+ }
+
+ if (XML_Parse (parser, buf, count, 0) == 0)
+ error (EXIT_FAILURE, 0, _("%s:%d:%d: %s"), logical_filename,
+ XML_GetCurrentLineNumber (parser),
+ XML_GetCurrentColumnNumber (parser) + 1,
+ XML_ErrorString (XML_GetErrorCode (parser)));
+ }
+
+ if (XML_Parse (parser, NULL, 0, 1) == 0)
+ error (EXIT_FAILURE, 0, _("%s:%d:%d: %s"), logical_filename,
+ XML_GetCurrentLineNumber (parser),
+ XML_GetCurrentColumnNumber (parser) + 1,
+ XML_ErrorString (XML_GetErrorCode (parser)));
+
+ XML_ParserFree (parser);
+
+ /* expat feeds us strings in UTF-8 encoding. If not all the strings
+ were plain ASCII, set the charset in the header to UTF-8. */
+ if (!is_ascii_message_list (mlp))
+ {
+ const char *canon_utf_8 = po_charset_canonicalize ("UTF-8");
+ iconv_message_list (mlp, canon_utf_8, canon_utf_8);
+ }
+
+ /* Close scanner. */
+ logical_file_name = NULL;
+ parser = NULL;
+}
+
+#endif
+
+void
+extract_glade (fp, real_filename, logical_filename, mdlp)
+ FILE *fp;
+ const char *real_filename;
+ const char *logical_filename;
+ msgdomain_list_ty *mdlp;
+{
+#if DYNLOAD_LIBEXPAT || HAVE_LIBEXPAT
+ if (LIBEXPAT_AVAILABLE ())
+ do_extract_glade (fp, real_filename, logical_filename, mdlp);
+ else
+#endif
+ {
+ multiline_error (xstrdup (""),
+ xasprintf (_("\
+Language \"glade\" is not supported. %s relies on expat.\n\
+This version was built without expat.\n"),
+ basename (program_name)));
+ exit (EXIT_FAILURE);
+ }
+}
diff --git a/src/x-glade.h b/src/x-glade.h
new file mode 100644
index 0000000..3d9672a
--- /dev/null
+++ b/src/x-glade.h
@@ -0,0 +1,35 @@
+/* xgettext glade backend.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2002.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+#define EXTENSIONS_GLADE \
+ { "glade", "glade" }, \
+
+#define SCANNERS_GLADE \
+ { "glade", extract_glade, NULL }, \
+
+/* Scan a glade XML file and add its translatable strings to mdlp. */
+extern void extract_glade PARAMS ((FILE *fp, const char *real_filename,
+ const char *logical_filename,
+ msgdomain_list_ty *mdlp));
+
+
+/* Handling of options specific to this language. */
+
+extern void x_glade_extract_all PARAMS ((void));
+extern void x_glade_keyword PARAMS ((const char *name));
diff --git a/src/xgettext.c b/src/xgettext.c
index 11f174d..c9381be 100644
--- a/src/xgettext.c
+++ b/src/xgettext.c
@@ -67,6 +67,7 @@
#include "x-awk.h"
#include "x-ycp.h"
#include "x-rst.h"
+#include "x-glade.h"
/* If nonzero add all comments immediately preceding one of the keywords. */
@@ -231,6 +232,7 @@ main (argc, argv)
x_librep_extract_all ();
x_java_extract_all ();
x_awk_extract_all ();
+ x_glade_extract_all ();
break;
case 'c':
if (optarg == NULL)
@@ -287,6 +289,7 @@ main (argc, argv)
x_librep_keyword (optarg);
x_java_keyword (optarg);
x_awk_keyword (optarg);
+ x_glade_keyword (optarg);
}
break;
case 'K':
@@ -1258,6 +1261,7 @@ language_to_extractor (name)
SCANNERS_AWK
SCANNERS_YCP
SCANNERS_RST
+ SCANNERS_GLADE
/* Here will follow more languages and their scanners: perl, etc...
Make sure new scanners honor the --exclude-file option. */
};
@@ -1302,6 +1306,7 @@ extension_to_language (extension)
EXTENSIONS_AWK
EXTENSIONS_YCP
EXTENSIONS_RST
+ EXTENSIONS_GLADE
/* Here will follow more file extensions: sh, pl, tcl ... */
};
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 762397c..90422d5a 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-28 Bruno Haible <bruno@clisp.org>
+
+ * xgettext-19: New file.
+ * xgettext-20: New file.
+ * Makefile.am (TESTS): Add them.
+
2002-01-27 Bruno Haible <bruno@clisp.org>
* format-awk-1: New file.
diff --git a/tests/xgettext-19 b/tests/xgettext-19
new file mode 100755
index 0000000..eb575d6
--- /dev/null
+++ b/tests/xgettext-19
@@ -0,0 +1,1569 @@
+#!/bin/sh
+
+# Test of Glade support.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles empty.glade"
+cat <<EOF > empty.glade
+<?xml version="1.0"?>
+<GTK-Interface/>
+EOF
+
+tmpfiles="$tmpfiles xg-test19.pot"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} -o xg-test19.pot empty.glade 2>/dev/null
+test $? = 0 || { echo "SKIP: xgettext-19"; rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles widgets.glade"
+cat <<EOF > widgets.glade
+<?xml version="1.0"?>
+<GTK-Interface>
+
+<project>
+ <name>project1</name>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory></pixmaps_directory>
+ <language>C</language>
+ <gnome_support>True</gnome_support>
+ <gettext_support>True</gettext_support>
+ <use_widget_names>False</use_widget_names>
+ <output_main_file>True</output_main_file>
+ <output_support_files>True</output_support_files>
+ <output_build_files>True</output_build_files>
+ <backup_source_files>True</backup_source_files>
+ <main_source_file>interface.c</main_source_file>
+ <main_header_file>interface.h</main_header_file>
+ <handler_source_file>callbacks.c</handler_source_file>
+ <handler_header_file>callbacks.h</handler_header_file>
+ <support_source_file>support.c</support_source_file>
+ <support_header_file>support.h</support_header_file>
+</project>
+
+<widget>
+ <class>GnomeApp</class>
+ <name>appwin</name>
+ <signal>
+ <name>destroy</name>
+ <handler>gtk_main_quit</handler>
+ <last_modification_time>Thu, 17 Jun 1999 15:06:07 GMT</last_modification_time>
+ </signal>
+ <title>Libglade-GNOME Test</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <enable_layout_config>True</enable_layout_config>
+
+ <widget>
+ <class>GnomeDock</class>
+ <child_name>GnomeApp:dock</child_name>
+ <name>dock1</name>
+ <allow_floating>True</allow_floating>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GnomeDockItem</class>
+ <name>dockitem1</name>
+ <border_width>2</border_width>
+ <placement>GNOME_DOCK_TOP</placement>
+ <band>0</band>
+ <position>0</position>
+ <offset>0</offset>
+ <locked>False</locked>
+ <exclusive>False</exclusive>
+ <never_floating>False</never_floating>
+ <never_vertical>True</never_vertical>
+ <never_horizontal>False</never_horizontal>
+ <shadow_type>GTK_SHADOW_OUT</shadow_type>
+
+ <widget>
+ <class>GtkMenuBar</class>
+ <name>menubar1</name>
+ <shadow_type>GTK_SHADOW_NONE</shadow_type>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>file1</name>
+ <stock_item>GNOMEUIINFO_MENU_FILE_TREE</stock_item>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>file1_menu</name>
+
+ <widget>
+ <class>GtkPixmapMenuItem</class>
+ <name>open2</name>
+ <signal>
+ <name>activate</name>
+ <handler>gtk_widget_show</handler>
+ <object>filesel</object>
+ <last_modification_time>Thu, 17 Jun 1999 15:03:18 GMT</last_modification_time>
+ </signal>
+ <stock_item>GNOMEUIINFO_MENU_OPEN_ITEM</stock_item>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>show_tests1</name>
+ <signal>
+ <name>activate</name>
+ <handler>gtk_widget_show</handler>
+ <object>testwin</object>
+ <last_modification_time>Thu, 17 Jun 1999 14:52:01 GMT</last_modification_time>
+ </signal>
+ <label>Show _Tests</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>druid_test1</name>
+ <signal>
+ <name>activate</name>
+ <handler>gtk_widget_show</handler>
+ <object>druidwin</object>
+ <last_modification_time>Thu, 28 Oct 1999 15:53:37 GMT</last_modification_time>
+ </signal>
+ <label>Druid Test</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>separator2</name>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkPixmapMenuItem</class>
+ <name>exit1</name>
+ <signal>
+ <name>activate</name>
+ <handler>gtk_widget_show</handler>
+ <object>closebox</object>
+ <last_modification_time>Thu, 17 Jun 1999 07:44:23 GMT</last_modification_time>
+ </signal>
+ <stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>edit1</name>
+ <stock_item>GNOMEUIINFO_MENU_EDIT_TREE</stock_item>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>edit1_menu</name>
+
+ <widget>
+ <class>GtkPixmapMenuItem</class>
+ <name>undo1</name>
+ <stock_item>GNOMEUIINFO_MENU_UNDO_ITEM</stock_item>
+ </widget>
+
+ <widget>
+ <class>GtkPixmapMenuItem</class>
+ <name>redo1</name>
+ <stock_item>GNOMEUIINFO_MENU_REDO_ITEM</stock_item>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>separator3</name>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkPixmapMenuItem</class>
+ <name>cut1</name>
+ <signal>
+ <name>activate</name>
+ <handler>gtk_editable_cut_clipboard</handler>
+ <object>textbox</object>
+ <last_modification_time>Thu, 17 Jun 1999 07:34:00 GMT</last_modification_time>
+ </signal>
+ <stock_item>GNOMEUIINFO_MENU_CUT_ITEM</stock_item>
+ </widget>
+
+ <widget>
+ <class>GtkPixmapMenuItem</class>
+ <name>copy1</name>
+ <signal>
+ <name>activate</name>
+ <handler>gtk_editable_copy_clipboard</handler>
+ <object>textbox</object>
+ <last_modification_time>Thu, 17 Jun 1999 07:34:21 GMT</last_modification_time>
+ </signal>
+ <stock_item>GNOMEUIINFO_MENU_COPY_ITEM</stock_item>
+ </widget>
+
+ <widget>
+ <class>GtkPixmapMenuItem</class>
+ <name>paste1</name>
+ <signal>
+ <name>activate</name>
+ <handler>gtk_editable_paste_clipboard</handler>
+ <object>textbox</object>
+ <last_modification_time>Thu, 17 Jun 1999 07:34:47 GMT</last_modification_time>
+ </signal>
+ <stock_item>GNOMEUIINFO_MENU_PASTE_ITEM</stock_item>
+ </widget>
+
+ <widget>
+ <class>GtkPixmapMenuItem</class>
+ <name>clear1</name>
+ <signal>
+ <name>activate</name>
+ <handler>gtk_editable_delete_selection</handler>
+ <object>textbox</object>
+ <last_modification_time>Thu, 17 Jun 1999 07:35:04 GMT</last_modification_time>
+ </signal>
+ <stock_item>GNOMEUIINFO_MENU_CLEAR_ITEM</stock_item>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>settings1</name>
+ <stock_item>GNOMEUIINFO_MENU_SETTINGS_TREE</stock_item>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>settings1_menu</name>
+
+ <widget>
+ <class>GtkPixmapMenuItem</class>
+ <name>preferences1</name>
+ <signal>
+ <name>activate</name>
+ <handler>gtk_widget_show</handler>
+ <object>propbox</object>
+ <last_modification_time>Tue, 28 Sep 1999 04:29:36 GMT</last_modification_time>
+ </signal>
+ <stock_item>GNOMEUIINFO_MENU_PREFERENCES_ITEM</stock_item>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>help1</name>
+ <stock_item>GNOMEUIINFO_MENU_HELP_TREE</stock_item>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>help1_menu</name>
+
+ <widget>
+ <class>GtkPixmapMenuItem</class>
+ <name>about1</name>
+ <signal>
+ <name>activate</name>
+ <handler>gtk_widget_show</handler>
+ <object>aboutwin</object>
+ <last_modification_time>Thu, 17 Jun 1999 07:38:13 GMT</last_modification_time>
+ </signal>
+ <stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GnomeDockItem</class>
+ <name>dockitem2</name>
+ <border_width>1</border_width>
+ <placement>GNOME_DOCK_TOP</placement>
+ <band>1</band>
+ <position>0</position>
+ <offset>0</offset>
+ <locked>False</locked>
+ <exclusive>False</exclusive>
+ <never_floating>False</never_floating>
+ <never_vertical>False</never_vertical>
+ <never_horizontal>False</never_horizontal>
+ <shadow_type>GTK_SHADOW_OUT</shadow_type>
+
+ <widget>
+ <class>GtkToolbar</class>
+ <name>toolbar1</name>
+ <border_width>1</border_width>
+ <orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
+ <type>GTK_TOOLBAR_BOTH</type>
+ <space_size>16</space_size>
+ <space_style>GTK_TOOLBAR_SPACE_LINE</space_style>
+ <relief>GTK_RELIEF_NONE</relief>
+ <tooltips>True</tooltips>
+
+ <widget>
+ <class>GtkButton</class>
+ <child_name>Toolbar:button</child_name>
+ <name>button1</name>
+ <label>New</label>
+ <stock_pixmap>GNOME_STOCK_PIXMAP_NEW</stock_pixmap>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <child_name>Toolbar:button</child_name>
+ <name>button2</name>
+ <label>Open</label>
+ <stock_pixmap>GNOME_STOCK_PIXMAP_OPEN</stock_pixmap>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <child_name>Toolbar:button</child_name>
+ <name>button3</name>
+ <label>Save</label>
+ <stock_pixmap>GNOME_STOCK_PIXMAP_SAVE</stock_pixmap>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <child_name>Toolbar:button</child_name>
+ <name>button4</name>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_editable_cut_clipboard</handler>
+ <object>textbox</object>
+ <last_modification_time>Thu, 17 Jun 1999 07:31:19 GMT</last_modification_time>
+ </signal>
+ <label>Cut</label>
+ <stock_pixmap>GNOME_STOCK_PIXMAP_CUT</stock_pixmap>
+ <child>
+ <new_group>True</new_group>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <child_name>Toolbar:button</child_name>
+ <name>button5</name>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_editable_copy_clipboard</handler>
+ <object>textbox</object>
+ <last_modification_time>Thu, 17 Jun 1999 07:32:16 GMT</last_modification_time>
+ </signal>
+ <label>Copy</label>
+ <stock_pixmap>GNOME_STOCK_PIXMAP_COPY</stock_pixmap>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <child_name>Toolbar:button</child_name>
+ <name>button6</name>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_editable_paste_clipboard</handler>
+ <object>textbox</object>
+ <last_modification_time>Thu, 17 Jun 1999 07:33:13 GMT</last_modification_time>
+ </signal>
+ <label>Paste</label>
+ <stock_pixmap>GNOME_STOCK_PIXMAP_PASTE</stock_pixmap>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <child_name>Toolbar:button</child_name>
+ <name>button7</name>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_editable_delete_selection</handler>
+ <object>textbox</object>
+ <last_modification_time>Thu, 17 Jun 1999 07:33:30 GMT</last_modification_time>
+ </signal>
+ <label>Clear</label>
+ <stock_pixmap>GNOME_STOCK_PIXMAP_CLEAR</stock_pixmap>
+ </widget>
+
+ <widget>
+ <class>GtkToggleButton</class>
+ <child_name>Toolbar:button</child_name>
+ <name>togglebutton1</name>
+ <label>Tog</label>
+ <stock_pixmap>GNOME_STOCK_PIXMAP_ATTACH</stock_pixmap>
+ <active>False</active>
+ <child>
+ <new_group>True</new_group>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkText</class>
+ <child_name>GnomeDock:contents</child_name>
+ <name>textbox</name>
+ <can_focus>True</can_focus>
+ <has_focus>True</has_focus>
+ <editable>True</editable>
+ <text>The cut copy paste and clear buttons should work correctly.</text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GnomeAppBar</class>
+ <child_name>GnomeApp:appbar</child_name>
+ <name>appbar1</name>
+ <has_progress>False</has_progress>
+ <has_status>True</has_status>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+</widget>
+
+<widget>
+ <class>GnomeAbout</class>
+ <name>aboutwin</name>
+ <visible>False</visible>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_widget_hide</handler>
+ <last_modification_time>Thu, 17 Jun 1999 07:37:41 GMT</last_modification_time>
+ </signal>
+ <modal>True</modal>
+ <copyright>Copyright (C) 1999</copyright>
+ <authors>James Henstridge &lt;james@daa.com.au&gt;
+</authors>
+ <comments>A simple program demonstrating what is possible with GNOME and
+libglade. This interface has been coded entirely with GLADE, and
+no C code specific to this interface has been written.</comments>
+</widget>
+
+<widget>
+ <class>GnomeMessageBox</class>
+ <name>closebox</name>
+ <visible>False</visible>
+ <message_box_type>GNOME_MESSAGE_BOX_QUESTION</message_box_type>
+ <message>Are you sure you want to quit
+the application?</message>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>False</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <auto_close>True</auto_close>
+ <hide_on_close>False</hide_on_close>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDialog:vbox</child_name>
+ <name>dialog-vbox1</name>
+ <homogeneous>False</homogeneous>
+ <spacing>8</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>dialog-action_area1</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>8</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button8</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_main_quit</handler>
+ <last_modification_time>Sat, 19 Jun 1999 13:56:42 GMT</last_modification_time>
+ </signal>
+ <stock_button>GNOME_STOCK_BUTTON_YES</stock_button>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button9</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_widget_hide</handler>
+ <object>closebox</object>
+ <last_modification_time>Sat, 19 Jun 1999 13:56:56 GMT</last_modification_time>
+ </signal>
+ <stock_button>GNOME_STOCK_BUTTON_NO</stock_button>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button11</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>X</label>
+ <stock_pixmap>GNOME_STOCK_PIXMAP_OPEN</stock_pixmap>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>testwin</name>
+ <visible>False</visible>
+ <signal>
+ <name>delete_event</name>
+ <handler>gtk_widget_hide</handler>
+ <last_modification_time>Thu, 17 Jun 1999 14:53:15 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>delete_event</name>
+ <handler>gtk_true</handler>
+ <last_modification_time>Thu, 17 Jun 1999 14:53:29 GMT</last_modification_time>
+ </signal>
+ <title>Widget Tests</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>notebook1</name>
+ <can_focus>True</can_focus>
+ <show_tabs>True</show_tabs>
+ <show_border>True</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>True</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+
+ <widget>
+ <class>GnomeColorPicker</class>
+ <name>colorpicker1</name>
+ <border_width>100</border_width>
+ <can_focus>True</can_focus>
+ <dither>True</dither>
+ <use_alpha>False</use_alpha>
+ <title>Pick a colour</title>
+ <tooltip>Pick a colour</tooltip>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label1</name>
+ <label>Colour Picker</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GnomeFontPicker</class>
+ <name>fontpicker1</name>
+ <border_width>75</border_width>
+ <can_focus>True</can_focus>
+ <title>Pick a Font</title>
+ <preview_text>AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz</preview_text>
+ <mode>GNOME_FONT_PICKER_MODE_FONT_INFO</mode>
+ <show_size>True</show_size>
+ <use_font>True</use_font>
+ <use_font_size>14</use_font_size>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label2</name>
+ <label>Font Picker</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GnomeIconEntry</class>
+ <name>iconentry1</name>
+ <!-- The welcome greeting -->
+ <title>Hello</title>
+ <history_id>iconent_hist</history_id>
+ <max_saved>10</max_saved>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label3</name>
+ <label>Icon Sel</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GnomeHRef</class>
+ <name>href1</name>
+ <border_width>150</border_width>
+ <can_focus>True</can_focus>
+ <url>http://www.daa.com.au/~james/gnome/</url>
+ <label>My Gnome Site</label>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label4</name>
+ <label>HRef</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GnomeEntry</class>
+ <name>entry1</name>
+ <history_id>EntTest</history_id>
+ <max_saved>10</max_saved>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GnomeEntry:entry</child_name>
+ <name>entry2</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label5</name>
+ <label>Entry</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GnomeFileEntry</class>
+ <name>fileentry1</name>
+ <border_width>50</border_width>
+ <history_id>FileEntTest</history_id>
+ <max_saved>10</max_saved>
+ <directory>False</directory>
+ <modal>False</modal>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GnomeEntry:entry</child_name>
+ <name>entry3</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label6</name>
+ <label>File Entry</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkDial</class>
+ <name>dial1</name>
+ <view_only>False</view_only>
+ <update_policy>GTK_UPDATE_CONTINUOUS</update_policy>
+ <value>0</value>
+ <lower>0</lower>
+ <upper>100</upper>
+ <step>0</step>
+ <page>0</page>
+ <page_size>0</page_size>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label7</name>
+ <label>Dial</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkClock</class>
+ <name>clock1</name>
+ <!-- This comment is ignored. -->
+ <type>GTK_CLOCK_REALTIME</type>
+ <!-- This is a comment for the translators. -->
+ <!-- This should be an strftime format,
+ as described in the strftime(3) manual page. -->
+ <format>%H:%M</format>
+ <seconds>0</seconds>
+ <interval>60</interval>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label8</name>
+ <label>Clock</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GnomeAnimator</class>
+ <name>animator1</name>
+ <width>0</width>
+ <height>0</height>
+ <loop_type>GNOME_ANIMATOR_LOOP_NONE</loop_type>
+ <playback_direction>False</playback_direction>
+ <playback_speed>1</playback_speed>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label9</name>
+ <label>Animator</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GnomeCalculator</class>
+ <name>calculator1</name>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label10</name>
+ <label>Calculator</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GnomeLess</class>
+ <name>less1</name>
+ <font>-b&amp;h-lucidatypewriter-bold-r-normal-*-*-140-*-*-m-*-iso8859-1</font>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label11</name>
+ <label>Less</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GnomePaperSelector</class>
+ <name>paperselector1</name>
+ <border_width>50</border_width>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label12</name>
+ <label>PaperSel</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GnomeSpell</class>
+ <name>spell1</name>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label13</name>
+ <label>GnomeSpell</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GtkFileSelection</class>
+ <name>filesel</name>
+ <border_width>10</border_width>
+ <visible>False</visible>
+ <signal>
+ <name>delete_event</name>
+ <handler>gtk_widget_hide</handler>
+ <last_modification_time>Thu, 17 Jun 1999 14:58:58 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>delete_event</name>
+ <handler>gtk_true</handler>
+ <last_modification_time>Thu, 17 Jun 1999 14:59:07 GMT</last_modification_time>
+ </signal>
+ <title>Select File</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <show_file_op_buttons>True</show_file_op_buttons>
+
+ <widget>
+ <class>GtkButton</class>
+ <child_name>FileSel:ok_button</child_name>
+ <name>ok_button1</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_widget_hide</handler>
+ <object>filesel</object>
+ <last_modification_time>Thu, 17 Jun 1999 15:02:33 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_widget_show</handler>
+ <object>msgdialog</object>
+ <last_modification_time>Thu, 17 Jun 1999 15:02:51 GMT</last_modification_time>
+ </signal>
+ <label>OK</label>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <child_name>FileSel:cancel_button</child_name>
+ <name>cancel_button1</name>
+ <can_default>True</can_default>
+ <has_default>True</has_default>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_widget_hide</handler>
+ <object>filesel</object>
+ <last_modification_time>Thu, 17 Jun 1999 14:59:25 GMT</last_modification_time>
+ </signal>
+ <label>Cancel</label>
+ </widget>
+</widget>
+
+<widget>
+ <class>GnomeDialog</class>
+ <name>msgdialog</name>
+ <visible>False</visible>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>False</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <auto_close>True</auto_close>
+ <hide_on_close>True</hide_on_close>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDialog:vbox</child_name>
+ <name>dialog-vbox2</name>
+ <homogeneous>False</homogeneous>
+ <spacing>8</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label14</name>
+ <label>If this was a real application, clicking on the
+OK button would probably have done something
+useful, rather than just displaying this dialog.</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>dialog-action_area2</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>8</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button10</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button10</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>Nothing</label>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GnomePropertyBox</class>
+ <name>propbox</name>
+ <visible>False</visible>
+ <signal>
+ <name>delete_event</name>
+ <handler>gtk_widget_hide</handler>
+ <last_modification_time>Tue, 28 Sep 1999 04:29:52 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>delete_event</name>
+ <handler>gtk_true</handler>
+ <last_modification_time>Tue, 28 Sep 1999 04:30:00 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>clicked</name>
+ <handler>gtk_widget_hide</handler>
+ <last_modification_time>Tue, 28 Sep 1999 04:30:37 GMT</last_modification_time>
+ </signal>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <child_name>GnomePropertyBox:notebook</child_name>
+ <name>notebook2</name>
+ <can_focus>True</can_focus>
+ <show_tabs>True</show_tabs>
+ <show_border>True</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame1</name>
+ <border_width>5</border_width>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox1</name>
+ <border_width>5</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkCombo</class>
+ <name>combo1</name>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items></items>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>combo-entry1</name>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>changed</name>
+ <handler>gnome_property_box_changed</handler>
+ <object>propbox</object>
+ <last_modification_time>Tue, 28 Sep 1999 04:25:07 GMT</last_modification_time>
+ </signal>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GnomeFileEntry</class>
+ <name>fileentry2</name>
+ <max_saved>10</max_saved>
+ <directory>False</directory>
+ <modal>False</modal>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GnomeEntry:entry</child_name>
+ <name>combo-entry3</name>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>changed</name>
+ <handler>gnome_property_box_changed</handler>
+ <object>propbox</object>
+ <last_modification_time>Tue, 28 Sep 1999 04:25:19 GMT</last_modification_time>
+ </signal>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GnomePixmapEntry</class>
+ <name>pixmapentry1</name>
+ <preview>True</preview>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GnomeFileEntry</class>
+ <child_name>GnomePixmapEntry:file-entry</child_name>
+ <name>entry4</name>
+ <max_saved>10</max_saved>
+ <directory>False</directory>
+ <modal>False</modal>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GnomeEntry:entry</child_name>
+ <name>combo-entry2</name>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>changed</name>
+ <handler>gnome_property_box_changed</handler>
+ <object>propbox</object>
+ <last_modification_time>Tue, 28 Sep 1999 04:25:38 GMT</last_modification_time>
+ </signal>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label15</name>
+ <label>_Entry</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame2</name>
+ <border_width>5</border_width>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_OUT</shadow_type>
+
+ <widget>
+ <class>GtkDial</class>
+ <name>dial2</name>
+ <view_only>False</view_only>
+ <update_policy>GTK_UPDATE_CONTINUOUS</update_policy>
+ <value>0</value>
+ <lower>0</lower>
+ <upper>100</upper>
+ <step>0</step>
+ <page>0</page>
+ <page_size>0</page_size>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label16</name>
+ <label>_Dial</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>druidwin</name>
+ <visible>False</visible>
+ <signal>
+ <name>delete_event</name>
+ <handler>gtk_widget_hide</handler>
+ <last_modification_time>Thu, 28 Oct 1999 15:52:59 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>delete_event</name>
+ <handler>gtk_true</handler>
+ <last_modification_time>Thu, 28 Oct 1999 15:53:09 GMT</last_modification_time>
+ </signal>
+ <title>GnomeDruid</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GnomeDruid</class>
+ <name>druid1</name>
+ <signal>
+ <name>cancel</name>
+ <handler>gtk_widget_hide</handler>
+ <object>druidwin</object>
+ <last_modification_time>Thu, 28 Oct 1999 15:55:01 GMT</last_modification_time>
+ </signal>
+
+ <widget>
+ <class>GnomeDruidPageStart</class>
+ <name>druidpagestart1</name>
+ <title>Test GnomeDruid</title>
+ <text>This is a simple test of the GnomeDruid
+code in gnome-libs and the wrapper
+for said code in libglade.</text>
+ <title_color>255,255,255</title_color>
+ <text_color>0,0,0</text_color>
+ <background_color>254,226,40</background_color>
+ <logo_background_color>255,0,20</logo_background_color>
+ <textbox_color>95,254,235</textbox_color>
+ </widget>
+
+ <widget>
+ <class>GnomeDruidPageStandard</class>
+ <name>druidpagestandard1</name>
+ <title>A dial in a druid</title>
+ <title_color>255,255,255</title_color>
+ <background_color>55,190,93</background_color>
+ <logo_background_color>255,5,234</logo_background_color>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDruidPageStandard:vbox</child_name>
+ <name>druid-vbox1</name>
+ <border_width>50</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkDial</class>
+ <name>dial3</name>
+ <view_only>False</view_only>
+ <update_policy>GTK_UPDATE_CONTINUOUS</update_policy>
+ <value>0</value>
+ <lower>0</lower>
+ <upper>100</upper>
+ <step>0</step>
+ <page>0</page>
+ <page_size>0</page_size>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GnomeDruidPageFinish</class>
+ <name>druidpagefinish1</name>
+ <signal>
+ <name>finish</name>
+ <handler>gtk_widget_hide</handler>
+ <object>druidwin</object>
+ <last_modification_time>Thu, 28 Oct 1999 15:55:24 GMT</last_modification_time>
+ </signal>
+ <title>Last Page</title>
+ <text>This is the end of the druid example</text>
+ <background_color>25,25,112</background_color>
+ <logo_background_color>255,147,6</logo_background_color>
+ <textbox_color>190,190,190</textbox_color>
+ <text_color>0,0,0</text_color>
+ <title_color>255,255,255</title_color>
+ </widget>
+ </widget>
+</widget>
+
+</GTK-Interface>
+EOF
+
+tmpfiles="$tmpfiles xg-test19.pot"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --add-comments -o - widgets.glade | grep -v 'POT-Creation-Date' > xg-test19.pot
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles xg-test19.ok"
+cat <<EOF > xg-test19.ok
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: widgets.glade:33
+msgid "Libglade-GNOME Test"
+msgstr ""
+
+#: widgets.glade:103
+msgid "Show _Tests"
+msgstr ""
+
+#: widgets.glade:116
+msgid "Druid Test"
+msgstr ""
+
+#: widgets.glade:295
+msgid "New"
+msgstr ""
+
+#: widgets.glade:303
+msgid "Open"
+msgstr ""
+
+#: widgets.glade:311
+msgid "Save"
+msgstr ""
+
+#: widgets.glade:325
+msgid "Cut"
+msgstr ""
+
+#: widgets.glade:342
+msgid "Copy"
+msgstr ""
+
+#: widgets.glade:356
+msgid "Paste"
+msgstr ""
+
+#: widgets.glade:370
+msgid "Clear"
+msgstr ""
+
+#: widgets.glade:378
+msgid "Tog"
+msgstr ""
+
+#: widgets.glade:395
+msgid "The cut copy paste and clear buttons should work correctly."
+msgstr ""
+
+#: widgets.glade:423
+msgid "Copyright (C) 1999"
+msgstr ""
+
+#: widgets.glade:426
+msgid ""
+"A simple program demonstrating what is possible with GNOME and\n"
+"libglade. This interface has been coded entirely with GLADE, and\n"
+"no C code specific to this interface has been written."
+msgstr ""
+
+#: widgets.glade:508
+msgid "X"
+msgstr ""
+
+#: widgets.glade:529
+msgid "Widget Tests"
+msgstr ""
+
+#: widgets.glade:556 widgets.glade:557
+msgid "Pick a colour"
+msgstr ""
+
+#: widgets.glade:564
+msgid "Colour Picker"
+msgstr ""
+
+#: widgets.glade:578
+msgid "Pick a Font"
+msgstr ""
+
+#: widgets.glade:579
+msgid "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"
+msgstr ""
+
+#: widgets.glade:590
+msgid "Font Picker"
+msgstr ""
+
+#. The welcome greeting
+#: widgets.glade:603
+msgid "Hello"
+msgstr ""
+
+#: widgets.glade:612
+msgid "Icon Sel"
+msgstr ""
+
+#: widgets.glade:627
+msgid "My Gnome Site"
+msgstr ""
+
+#: widgets.glade:634
+msgid "HRef"
+msgstr ""
+
+#: widgets.glade:665
+msgid "Entry"
+msgstr ""
+
+#: widgets.glade:699
+msgid "File Entry"
+msgstr ""
+
+#: widgets.glade:725
+msgid "Dial"
+msgstr ""
+
+#. This is a comment for the translators.
+#. This should be an strftime format,
+#. as described in the strftime(3) manual page.
+#: widgets.glade:742
+msgid "%H:%M"
+msgstr ""
+
+#: widgets.glade:751
+msgid "Clock"
+msgstr ""
+
+#: widgets.glade:774
+msgid "Animator"
+msgstr ""
+
+#: widgets.glade:792
+msgid "Calculator"
+msgstr ""
+
+#: widgets.glade:811
+msgid "Less"
+msgstr ""
+
+#: widgets.glade:830
+msgid "PaperSel"
+msgstr ""
+
+#: widgets.glade:848
+msgid "GnomeSpell"
+msgstr ""
+
+#: widgets.glade:874
+msgid "Select File"
+msgstr ""
+
+#: widgets.glade:901
+msgid "OK"
+msgstr ""
+
+#: widgets.glade:917
+msgid "Cancel"
+msgstr ""
+
+#: widgets.glade:949
+msgid ""
+"If this was a real application, clicking on the\n"
+"OK button would probably have done something\n"
+"useful, rather than just displaying this dialog."
+msgstr ""
+
+#: widgets.glade:995
+msgid "Nothing"
+msgstr ""
+
+#: widgets.glade:1159
+msgid "_Entry"
+msgstr ""
+
+#: widgets.glade:1193
+msgid "_Dial"
+msgstr ""
+
+#: widgets.glade:1218
+msgid "GnomeDruid"
+msgstr ""
+
+#: widgets.glade:1239
+msgid "Test GnomeDruid"
+msgstr ""
+
+#: widgets.glade:1240
+msgid ""
+"This is a simple test of the GnomeDruid\n"
+"code in gnome-libs and the wrapper\n"
+"for said code in libglade."
+msgstr ""
+
+#: widgets.glade:1253
+msgid "A dial in a druid"
+msgstr ""
+
+#: widgets.glade:1300
+msgid "Last Page"
+msgstr ""
+
+#: widgets.glade:1301
+msgid "This is the end of the druid example"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test19.ok xg-test19.pot
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/xgettext-20 b/tests/xgettext-20
new file mode 100755
index 0000000..0483a44
--- /dev/null
+++ b/tests/xgettext-20
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+# Test of Glade support, in particular ISO-8859-1 to UTF-8 conversion
+# and ASCII entities (&lt; &gt; &quot;).
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles empty.glade"
+cat <<EOF > empty.glade
+<?xml version="1.0"?>
+<GTK-Interface/>
+EOF
+
+tmpfiles="$tmpfiles xg-test20.pot"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} -o xg-test20.pot empty.glade 2>/dev/null
+test $? = 0 || { echo "SKIP: xgettext-20"; rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles simple.glade"
+cat <<\EOF > simple.glade
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<GTK-Interface>
+
+
+<widget>
+ <class>GtkWindow</class>
+ <name>HelloWindow</name>
+ <border_width>5</border_width>
+ <Signal>
+ <name>destroy</name>
+ <handler>gtk_main_quit</handler>
+ </Signal>
+ <title>Hello</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <allow_shrink>True</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>Hello World</name>
+ <can_focus>True</can_focus>
+ <Signal>
+ <name>clicked</name>
+ <handler>gtk_widget_destroy</handler>
+ <object>HelloWindow</object>
+ </Signal>
+ <!-- Der übliche Programm-Gruß -->
+ <label>Hello World</label>
+ <comments>This &lt;button&gt; diplays &quot;Hello World&quot;.</comments>
+ </widget>
+</widget>
+
+</GTK-Interface>
+EOF
+
+tmpfiles="$tmpfiles xg-test20.tmp xg-test20.pot"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --add-comments -o xg-test20.tmp simple.glade
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+grep -v 'POT-Creation-Date' < xg-test20.tmp > xg-test20.pot
+
+tmpfiles="$tmpfiles xg-test20.ok"
+cat <<EOF > xg-test20.ok
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: simple.glade:13
+msgid "Hello"
+msgstr ""
+
+#. Der übliche Programm-Gruß
+#: simple.glade:30
+msgid "Hello World"
+msgstr ""
+
+#: simple.glade:31
+msgid "This <button> diplays \"Hello World\"."
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test20.ok xg-test20.pot
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result