2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test of GSettings support.
6 cat <<EOF > xg-gs-1-empty.gschema.xml
11 : ${XGETTEXT=xgettext}
12 ${XGETTEXT} -o xg-gs-1.pot xg-gs-1-empty.gschema.xml 2>/dev/null
14 echo "Skipping test: xgettext was built without GSettings support"
18 cat <<EOF > xg-gs-1.gschema.xml
21 <schema id="org.gnome.example" path="/org/gnome/example/">
22 <key name="foo" type="i">
24 <!-- This is the first line.
25 This is the second line. -->
26 <summary>Example Integer Key</summary>
28 The example integer key to test that the default value is not
32 <key name="bar" type="s">
33 <default l10n="messages" context="Foo">
37 <key name="baz" type="s">
38 <default l10n="messages" context="Baz"></default>
39 <summary context="Baz"></summary>
45 : ${XGETTEXT=xgettext}
46 ${XGETTEXT} --add-comments -o - xg-gs-1.gschema.xml | grep -v 'POT-Creation-Date' > xg-gs-1.pot || exit 1
48 cat <<EOF > xg-gs-1.ok
49 # SOME DESCRIPTIVE TITLE.
50 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
51 # This file is distributed under the same license as the PACKAGE package.
52 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
57 "Project-Id-Version: PACKAGE VERSION\n"
58 "Report-Msgid-Bugs-To: \n"
59 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
60 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
61 "Language-Team: LANGUAGE <LL@li.org>\n"
64 "Content-Type: text/plain; charset=CHARSET\n"
65 "Content-Transfer-Encoding: 8bit\n"
67 #. This is the first line.
68 #. This is the second line.
69 #: xg-gs-1.gschema.xml:8
70 msgid "Example Integer Key"
73 #: xg-gs-1.gschema.xml:9
75 "The example integer key to test that the default value is not translated."
78 #: xg-gs-1.gschema.xml:15
80 msgid "' foo bar baz'"
85 ${DIFF} xg-gs-1.ok xg-gs-1.pot