1#!/bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test of Glade 2 support. 5 6cat <<EOF > xg-gl-4-empty.glade 7<?xml version="1.0"?> 8<GTK-Interface/> 9EOF 10 11: ${XGETTEXT=xgettext} 12${XGETTEXT} -o xg-gl-4.pot xg-gl-4-empty.glade 2>/dev/null 13test $? = 0 || { 14 echo "Skipping test: xgettext was built without Glade support" 15 Exit 77 16} 17 18cat <<EOF > xg-gl-4.glade 19<?xml version="1.0" encoding="UTF-8" standalone="no"?> 20<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> 21<!--Generated with glade3 3.4.3 on Sat May 16 19:53:48 2009 --> 22<glade-interface> 23 <widget class="GtkWindow" id="mainWindow"> 24 <child> 25 <widget class="GtkButton" id="FormButton"> 26 <property name="visible">True</property> 27 <property name="can_focus">True</property> 28 <property name="receives_default">True</property> 29 <property name="label" translatable="yes" comments="Form means shape here">Form</property> 30 <property name="response_id">0</property> 31 </widget> 32 </child> 33 </widget> 34</glade-interface> 35EOF 36 37: ${XGETTEXT=xgettext} 38${XGETTEXT} -o xg-gl-4.tmp xg-gl-4.glade || Exit 1 39func_filter_POT_Creation_Date xg-gl-4.tmp xg-gl-4.pot 40 41cat <<\EOF > xg-gl-4.ok 42# SOME DESCRIPTIVE TITLE. 43# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 44# This file is distributed under the same license as the PACKAGE package. 45# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 46# 47#, fuzzy 48msgid "" 49msgstr "" 50"Project-Id-Version: PACKAGE VERSION\n" 51"Report-Msgid-Bugs-To: \n" 52"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 53"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 54"Language-Team: LANGUAGE <LL@li.org>\n" 55"Language: \n" 56"MIME-Version: 1.0\n" 57"Content-Type: text/plain; charset=CHARSET\n" 58"Content-Transfer-Encoding: 8bit\n" 59 60#. Form means shape here 61#: xg-gl-4.glade:11 62msgid "Form" 63msgstr "" 64EOF 65 66: ${DIFF=diff} 67${DIFF} xg-gl-4.ok xg-gl-4.pot 68result=$? 69 70test $result = 0 || { 71 rm -fr $tempfiles; exit $result 72} 73 74cat <<EOF > xg-gl-4a.glade 75<?xml version="1.0"?> 76<glade-interface> 77 <!-- interface-requires gtk+ 2.6 --> 78 <!-- interface-naming-policy toplevel-contextual --> 79 <widget class="GtkWindow" id="mainWindow"> 80 <accessibility> 81 <atkproperty name="AtkObject::accessible-name" translatable="yes" comments="Also has comments">This window</atkproperty> 82 </accessibility> 83 <child> 84 <placeholder/> 85 </child> 86 </widget> 87</glade-interface> 88EOF 89 90: ${XGETTEXT=xgettext} 91${XGETTEXT} -o xg-gl-4a.tmp xg-gl-4a.glade || Exit 1 92func_filter_POT_Creation_Date xg-gl-4a.tmp xg-gl-4a.pot 93 94cat <<\EOF > xg-gl-4a.ok 95# SOME DESCRIPTIVE TITLE. 96# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 97# This file is distributed under the same license as the PACKAGE package. 98# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 99# 100#, fuzzy 101msgid "" 102msgstr "" 103"Project-Id-Version: PACKAGE VERSION\n" 104"Report-Msgid-Bugs-To: \n" 105"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 106"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 107"Language-Team: LANGUAGE <LL@li.org>\n" 108"Language: \n" 109"MIME-Version: 1.0\n" 110"Content-Type: text/plain; charset=CHARSET\n" 111"Content-Transfer-Encoding: 8bit\n" 112 113#. Also has comments 114#: xg-gl-4a.glade:7 115msgid "This window" 116msgstr "" 117EOF 118 119: ${DIFF=diff} 120${DIFF} xg-gl-4a.ok xg-gl-4a.pot 121result=$? 122 123exit $result 124