3 # Test of Glade support, in particular ISO-8859-1 to UTF-8 conversion
4 # and ASCII entities (< > ").
7 trap 'rm -fr $tmpfiles' 1 2 3 15
9 tmpfiles
="$tmpfiles empty.glade"
10 cat <<EOF > empty.glade
15 tmpfiles
="$tmpfiles xg-gl-2.pot"
16 : ${XGETTEXT=xgettext}
17 ${XGETTEXT} -o xg-gl-2.pot empty.glade
2>/dev
/null
18 test $?
= 0 ||
{ rm -fr $tmpfiles; exit 77; }
20 tmpfiles
="$tmpfiles simple.glade"
21 cat <<\EOF
> simple.glade
22 <?xml version
="1.0" encoding
="ISO-8859-1"?
>
27 <class
>GtkWindow
</class
>
28 <name
>HelloWindow
</name
>
29 <border_width
>5</border_width
>
32 <handler
>gtk_main_quit
</handler
>
35 <type>GTK_WINDOW_TOPLEVEL
</type>
36 <position
>GTK_WIN_POS_NONE
</position
>
37 <allow_shrink
>True
</allow_shrink
>
38 <allow_grow
>True
</allow_grow
>
39 <auto_shrink
>False
</auto_shrink
>
42 <class
>GtkButton
</class
>
43 <name
>Hello World
</name
>
44 <can_focus
>True
</can_focus
>
47 <handler
>gtk_widget_destroy
</handler
>
48 <object
>HelloWindow
</object
>
50 <!-- Der übliche Programm-Gruß
-->
51 <label
>Hello World
</label
>
52 <comments
>This
<
;button
>
; displays
"
;Hello World
"
;.
</comments
>
59 tmpfiles
="$tmpfiles xg-gl-2.tmp xg-gl-2.pot"
60 : ${XGETTEXT=xgettext}
61 ${XGETTEXT} --add-comments -o xg-gl-2.tmp simple.glade
62 test $?
= 0 ||
{ rm -fr $tmpfiles; exit 1; }
63 grep -v 'POT-Creation-Date' < xg-gl-2.tmp
> xg-gl-2.pot
65 tmpfiles
="$tmpfiles xg-gl-2.ok"
66 cat <<\EOF
> xg-gl-2.ok
67 # SOME DESCRIPTIVE TITLE.
68 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
69 # This file is distributed under the same license as the PACKAGE package.
70 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
75 "Project-Id-Version: PACKAGE VERSION\n"
76 "Report-Msgid-Bugs-To: \n"
77 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
78 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
79 "Language-Team: LANGUAGE <LL@li.org>\n"
81 "Content-Type: text/plain; charset=UTF-8\n"
82 "Content-Transfer-Encoding: 8bit\n"
88 #. Der übliche Programm-Gruß
94 msgid
"This <button> displays \"Hello World\"."
99 ${DIFF} xg-gl-2.ok xg-gl-2.pot