2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test of GtkBuilder support.
5 # Checks that the extracted pot contains the right translatable
6 # content, comments and context.
8 cat <<EOF > xg-gl-6-empty.glade
13 : ${XGETTEXT=xgettext}
14 ${XGETTEXT} -o xg-gl-6.pot xg-gl-6-empty.glade 2>/dev/null
16 echo "Skipping test: xgettext was built without Glade support"
20 cat <<EOF > xg-gl-6.ui
21 <?xml version="1.0" encoding="UTF-8"?>
23 <!-- interface-requires gtk+ 3.0 -->
24 <object class="GtkWindow" id="window">
25 <property name="can_focus">False</property>
26 <property name="title" translatable="yes" context="This is the context for this text" comments="This is a comment for empty window">This is an empty window</property>
34 : ${XGETTEXT=xgettext}
35 ${XGETTEXT} -o - xg-gl-6.ui | grep -v 'POT-Creation-Date' > xg-gl-6.pot || exit 1
37 cat <<EOF > xg-gl-6.ok
38 # SOME DESCRIPTIVE TITLE.
39 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
40 # This file is distributed under the same license as the PACKAGE package.
41 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
46 "Project-Id-Version: PACKAGE VERSION\n"
47 "Report-Msgid-Bugs-To: \n"
48 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
49 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
50 "Language-Team: LANGUAGE <LL@li.org>\n"
53 "Content-Type: text/plain; charset=CHARSET\n"
54 "Content-Transfer-Encoding: 8bit\n"
56 #. This is a comment for empty window
58 msgctxt "This is the context for this text"
59 msgid "This is an empty window"
64 ${DIFF} xg-gl-6.ok xg-gl-6.pot
71 # Check with --extract-all option.
72 ${XGETTEXT} -a -o - xg-gl-6.ui | grep -v 'POT-Creation-Date' > xg-gl-6.pot || exit 1
75 ${DIFF} xg-gl-6.ok xg-gl-6.pot