summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-appdata-1
blob: ac0ed7e70e6ce233db0acac7170f40567d7e5b00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test of AppData support.

cat <<EOF > xg-gs-1-empty.appdata.xml
<?xml version="1.0"?>
<component type="desktop"/>
EOF

: ${XGETTEXT=xgettext}
${XGETTEXT} -o xg-gs-1.pot xg-gs-1-empty.appdata.xml 2>/dev/null
test $? = 0 || {
  echo "Skipping test: xgettext was built without AppData support"
  Exit 77
}

cat <<EOF > xg-gs-1.appdata.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2013 First Lastname <your@email.com> -->
<component type="desktop">
  <id>gnome-power-statistics.desktop</id>
  <metadata_license>CC0-1.0</metadata_license>
  <project_license>GPL-2.0+ and GFDL-1.3</project_license>
  <name>Power Statistics</name>
  <summary>Observe power management</summary>
  <description>
    <p>
      Power Statistics is a program used to view historical and current battery
      information and will show programs running on your computer using power.
    </p>
    <p>Example list:</p>
    <ul>
      <li>First item</li>
      <li>Second item</li>
    </ul>
    <p>
      You probably only need to install this application if you are having problems
      with your laptop battery, or are trying to work out what programs are using
      significant amounts of power.
    </p>
  </description>
  <screenshots>
    <screenshot type="default">
      <image>http://www.hughsie.com/en_US/main.png</image>
      <caption>The main window showing the application in action</caption>
    </screenshot>
    <screenshot>
      <image>http://www.hughsie.com/en_US/preferences.png</image>
      <caption>The preferences window where you can change the defaults</caption>
    </screenshot>
  </screenshots>
  <url type="homepage">http://www.gnome.org/projects/en_US/gnome-power-manager</url>
  <updatecontact>gnome-power-manager-list@gnome.org</updatecontact>
  <project_group>GNOME</project_group>
</component>
EOF

: ${XGETTEXT=xgettext}
${XGETTEXT} --add-comments -o - xg-gs-1.appdata.xml | grep -v 'POT-Creation-Date' > xg-gs-1.pot || Exit 1

cat <<EOF > xg-gs-1.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: xg-gs-1.appdata.xml:7
msgid "Power Statistics"
msgstr ""

#: xg-gs-1.appdata.xml:8
msgid "Observe power management"
msgstr ""

#: xg-gs-1.appdata.xml:10
msgid ""
"Power Statistics is a program used to view historical and current battery "
"information and will show programs running on your computer using power."
msgstr ""

#: xg-gs-1.appdata.xml:14
msgid "Example list:"
msgstr ""

#: xg-gs-1.appdata.xml:16
msgid "First item"
msgstr ""

#: xg-gs-1.appdata.xml:17
msgid "Second item"
msgstr ""

#: xg-gs-1.appdata.xml:19
msgid ""
"You probably only need to install this application if you are having "
"problems with your laptop battery, or are trying to work out what programs "
"are using significant amounts of power."
msgstr ""

#: xg-gs-1.appdata.xml:28
msgid "The main window showing the application in action"
msgstr ""

#: xg-gs-1.appdata.xml:32
msgid "The preferences window where you can change the defaults"
msgstr ""
EOF

: ${DIFF=diff}
${DIFF} xg-gs-1.ok xg-gs-1.pot
result=$?

exit $result