1#!/bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test of AppData support. 5 6cat <<EOF > xg-gs-1-empty.appdata.xml 7<?xml version="1.0"?> 8<component type="desktop"/> 9EOF 10 11: ${XGETTEXT=xgettext} 12${XGETTEXT} -o xg-gs-1.pot xg-gs-1-empty.appdata.xml 2>/dev/null 13test $? = 0 || { 14 echo "Skipping test: xgettext was built without AppData support" 15 Exit 77 16} 17 18cat <<EOF > xg-gs-1.appdata.xml 19<?xml version="1.0" encoding="UTF-8"?> 20<!-- Copyright 2013 First Lastname <your@email.com> --> 21<component type="desktop"> 22 <id>gnome-power-statistics.desktop</id> 23 <metadata_license>CC0-1.0</metadata_license> 24 <project_license>GPL-2.0+ and GFDL-1.3</project_license> 25 <name>Power Statistics</name> 26 <summary>Observe power management</summary> 27 <description> 28 <p> 29 Power Statistics is a program used to view historical and current battery 30 information and will show programs running on your computer using power. 31 </p> 32 <p>Example list:</p> 33 <ul> 34 <li>First item</li> 35 <li>Second item</li> 36 </ul> 37 <p> 38 You probably only need to install this application if you are having problems 39 with your laptop battery, or are trying to work out what programs are using 40 significant amounts of power. 41 </p> 42 </description> 43 <screenshots> 44 <screenshot type="default"> 45 <image>http://www.hughsie.com/en_US/main.png</image> 46 <caption>The main window showing the application in action</caption> 47 </screenshot> 48 <screenshot> 49 <image>http://www.hughsie.com/en_US/preferences.png</image> 50 <caption>The preferences window where you can change the defaults</caption> 51 </screenshot> 52 </screenshots> 53 <url type="homepage">http://www.gnome.org/projects/en_US/gnome-power-manager</url> 54 <updatecontact>gnome-power-manager-list@gnome.org</updatecontact> 55 <project_group>GNOME</project_group> 56</component> 57EOF 58 59: ${XGETTEXT=xgettext} 60${XGETTEXT} --add-comments -o xg-gs-1.tmp xg-gs-1.appdata.xml || Exit 1 61func_filter_POT_Creation_Date xg-gs-1.tmp xg-gs-1.pot 62 63cat <<EOF > xg-gs-1.ok 64# SOME DESCRIPTIVE TITLE. 65# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 66# This file is distributed under the same license as the PACKAGE package. 67# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 68# 69#, fuzzy 70msgid "" 71msgstr "" 72"Project-Id-Version: PACKAGE VERSION\n" 73"Report-Msgid-Bugs-To: \n" 74"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 75"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 76"Language-Team: LANGUAGE <LL@li.org>\n" 77"Language: \n" 78"MIME-Version: 1.0\n" 79"Content-Type: text/plain; charset=CHARSET\n" 80"Content-Transfer-Encoding: 8bit\n" 81 82#: xg-gs-1.appdata.xml:7 83msgid "Power Statistics" 84msgstr "" 85 86#: xg-gs-1.appdata.xml:8 87msgid "Observe power management" 88msgstr "" 89 90#: xg-gs-1.appdata.xml:10 91msgid "" 92"Power Statistics is a program used to view historical and current battery " 93"information and will show programs running on your computer using power." 94msgstr "" 95 96#: xg-gs-1.appdata.xml:14 97msgid "Example list:" 98msgstr "" 99 100#: xg-gs-1.appdata.xml:16 101msgid "First item" 102msgstr "" 103 104#: xg-gs-1.appdata.xml:17 105msgid "Second item" 106msgstr "" 107 108#: xg-gs-1.appdata.xml:19 109msgid "" 110"You probably only need to install this application if you are having " 111"problems with your laptop battery, or are trying to work out what programs " 112"are using significant amounts of power." 113msgstr "" 114 115#: xg-gs-1.appdata.xml:28 116msgid "The main window showing the application in action" 117msgstr "" 118 119#: xg-gs-1.appdata.xml:32 120msgid "The preferences window where you can change the defaults" 121msgstr "" 122EOF 123 124: ${DIFF=diff} 125${DIFF} xg-gs-1.ok xg-gs-1.pot 126result=$? 127 128exit $result 129