3 # Test of Glade 2 support.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-gl-4-empty.glade"
9 cat <<EOF > xg-gl-4-empty.glade
14 tmpfiles="$tmpfiles xg-gl-4.pot"
15 : ${XGETTEXT=xgettext}
16 ${XGETTEXT} -o xg-gl-4.pot xg-gl-4-empty.glade 2>/dev/null
18 echo "Skipping test: xgettext was built without Glade support"
19 rm -fr $tmpfiles; exit 77
22 tmpfiles="$tmpfiles xg-gl-4.glade"
23 cat <<EOF > xg-gl-4.glade
24 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
25 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
26 <!--Generated with glade3 3.4.3 on Sat May 16 19:53:48 2009 -->
28 <widget class="GtkWindow" id="mainWindow">
30 <widget class="GtkButton" id="FormButton">
31 <property name="visible">True</property>
32 <property name="can_focus">True</property>
33 <property name="receives_default">True</property>
34 <property name="label" translatable="yes" comments="Form means shape here">Form</property>
35 <property name="response_id">0</property>
42 tmpfiles="$tmpfiles xg-gl-4.tmp xg-gl-4.pot"
43 : ${XGETTEXT=xgettext}
44 ${XGETTEXT} -o xg-gl-4.tmp xg-gl-4.glade
45 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
46 # Don't simplify this to "grep ... < xg-gl-4.tmp", otherwise OpenBSD 4.0 grep
47 # only outputs "Binary file (standard input) matches".
48 cat xg-gl-4.tmp | grep -v 'POT-Creation-Date' > xg-gl-4.pot
50 tmpfiles="$tmpfiles xg-gl-4.ok"
51 cat <<\EOF > xg-gl-4.ok
52 # SOME DESCRIPTIVE TITLE.
53 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
54 # This file is distributed under the same license as the PACKAGE package.
55 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
60 "Project-Id-Version: PACKAGE VERSION\n"
61 "Report-Msgid-Bugs-To: \n"
62 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
63 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
64 "Language-Team: LANGUAGE <LL@li.org>\n"
67 "Content-Type: text/plain; charset=CHARSET\n"
68 "Content-Transfer-Encoding: 8bit\n"
70 #. Form means shape here
77 ${DIFF} xg-gl-4.ok xg-gl-4.pot
81 rm -fr $tempfiles; exit $result
84 tmpfiles="$tmpfiles xg-gl-4a.glade"
85 cat <<EOF > xg-gl-4a.glade
88 <!-- interface-requires gtk+ 2.6 -->
89 <!-- interface-naming-policy toplevel-contextual -->
90 <widget class="GtkWindow" id="mainWindow">
92 <atkproperty name="AtkObject::accessible-name" translatable="yes" comments="Also has comments">This window</atkproperty>
101 tmpfiles="$tmpfiles xg-gl-4a.tmp xg-gl-4a.pot"
102 : ${XGETTEXT=xgettext}
103 ${XGETTEXT} -o xg-gl-4a.tmp xg-gl-4a.glade
104 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
106 cat xg-gl-4a.tmp | grep -v 'POT-Creation-Date' > xg-gl-4a.pot
108 tmpfiles="$tmpfiles xg-gl-4a.ok"
109 cat <<\EOF > xg-gl-4a.ok
110 # SOME DESCRIPTIVE TITLE.
111 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
112 # This file is distributed under the same license as the PACKAGE package.
113 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
118 "Project-Id-Version: PACKAGE VERSION\n"
119 "Report-Msgid-Bugs-To: \n"
120 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
121 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
122 "Language-Team: LANGUAGE <LL@li.org>\n"
124 "MIME-Version: 1.0\n"
125 "Content-Type: text/plain; charset=CHARSET\n"
126 "Content-Transfer-Encoding: 8bit\n"
135 ${DIFF} xg-gl-4a.ok xg-gl-4a.pot