2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test of Glade support, in particular ISO-8859-1 to UTF-8 conversion
5 # and ASCII entities (< > ").
7 cat <<EOF > xg-gl-2-empty.glade
12 : ${XGETTEXT=xgettext}
13 ${XGETTEXT} -o xg-gl-2.pot xg-gl-2-empty.glade 2>/dev/null
15 echo "Skipping test: xgettext was built without Glade support"
19 cat <<\EOF > xg-gl-2-simple.glade
20 <?xml version="1.0" encoding="ISO-8859-1"?>
25 <class>GtkWindow</class>
26 <name>HelloWindow</name>
27 <border_width>5</border_width>
30 <handler>gtk_main_quit</handler>
33 <type>GTK_WINDOW_TOPLEVEL</type>
34 <position>GTK_WIN_POS_NONE</position>
35 <allow_shrink>True</allow_shrink>
36 <allow_grow>True</allow_grow>
37 <auto_shrink>False</auto_shrink>
40 <class>GtkButton</class>
41 <name>Hello World</name>
42 <can_focus>True</can_focus>
45 <handler>gtk_widget_destroy</handler>
46 <object>HelloWindow</object>
48 <!-- Der übliche Programm-Gruß -->
49 <label>Hello World</label>
50 <comments>This <button> displays "Hello World".</comments>
57 : ${XGETTEXT=xgettext}
58 ${XGETTEXT} --add-comments -o xg-gl-2.tmp xg-gl-2-simple.glade || exit 1
59 # Don't simplify this to "grep ... < xg-gl-2.tmp", otherwise OpenBSD 4.0 grep
60 # only outputs "Binary file (standard input) matches".
61 cat xg-gl-2.tmp | grep -v 'POT-Creation-Date' > xg-gl-2.pot
63 cat <<\EOF > xg-gl-2.ok
64 # SOME DESCRIPTIVE TITLE.
65 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
66 # This file is distributed under the same license as the PACKAGE package.
67 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
72 "Project-Id-Version: PACKAGE VERSION\n"
73 "Report-Msgid-Bugs-To: \n"
74 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
75 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
76 "Language-Team: LANGUAGE <LL@li.org>\n"
79 "Content-Type: text/plain; charset=UTF-8\n"
80 "Content-Transfer-Encoding: 8bit\n"
82 #: xg-gl-2-simple.glade:13
86 #. Der übliche Programm-Gruß
87 #: xg-gl-2-simple.glade:30
91 #: xg-gl-2-simple.glade:31
92 msgid "This <button> displays \"Hello World\"."
97 ${DIFF} xg-gl-2.ok xg-gl-2.pot