Home | History | Annotate | Line # | Download | only in tests
xgettext-glade-3 revision 1.1
      1  1.1  christos #!/bin/sh
      2  1.1  christos 
      3  1.1  christos # Test of Glade 2 support.
      4  1.1  christos 
      5  1.1  christos tmpfiles=""
      6  1.1  christos trap 'rm -fr $tmpfiles' 1 2 3 15
      7  1.1  christos 
      8  1.1  christos tmpfiles="$tmpfiles empty.glade"
      9  1.1  christos cat <<EOF > empty.glade
     10  1.1  christos <?xml version="1.0"?>
     11  1.1  christos <GTK-Interface/>
     12  1.1  christos EOF
     13  1.1  christos 
     14  1.1  christos tmpfiles="$tmpfiles xg-gl-3.pot"
     15  1.1  christos : ${XGETTEXT=xgettext}
     16  1.1  christos ${XGETTEXT} -o xg-gl-3.pot empty.glade 2>/dev/null
     17  1.1  christos test $? = 0 || {
     18  1.1  christos   echo "Skipping test: xgettext was built without Glade support"
     19  1.1  christos   rm -fr $tmpfiles; exit 77
     20  1.1  christos }
     21  1.1  christos 
     22  1.1  christos tmpfiles="$tmpfiles asciitable.glade2"
     23  1.1  christos cat <<EOF > asciitable.glade2
     24  1.1  christos <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
     25  1.1  christos <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd" >
     26  1.1  christos 
     27  1.1  christos <glade-interface>
     28  1.1  christos   <widget class="GtkDialog" id="dialog">
     29  1.1  christos     <property name="visible">no</property>
     30  1.1  christos     <property name="title" translatable="yes">gedit: ASCII table</property>
     31  1.1  christos     <property name="type">GTK_WINDOW_TOPLEVEL</property>
     32  1.1  christos     <property name="modal">no</property>
     33  1.1  christos     <property name="allow_shrink">yes</property>
     34  1.1  christos     <property name="allow_grow">yes</property>
     35  1.1  christos     <property name="window-position">GTK_WIN_POS_NONE</property>
     36  1.1  christos 
     37  1.1  christos     <child internal-child="vbox">
     38  1.1  christos       <widget class="GtkVBox" id="dialog-vbox1">
     39  1.1  christos         <property name="homogeneous">no</property>
     40  1.1  christos         <property name="spacing">8</property>
     41  1.1  christos         <property name="visible">yes</property>
     42  1.1  christos 
     43  1.1  christos         <child internal-child="action_area">
     44  1.1  christos           <widget class="GtkHButtonBox" id="dialog-action_area1">
     45  1.1  christos             <property name="layout_style">GTK_BUTTONBOX_END</property>
     46  1.1  christos             <property name="spacing">8</property>
     47  1.1  christos             <property name="visible">yes</property>
     48  1.1  christos 
     49  1.1  christos             <child>
     50  1.1  christos               <widget class="GtkButton" id="insert_char_button">
     51  1.1  christos                 <property name="can_default">yes</property>
     52  1.1  christos                 <property name="can_focus">yes</property>
     53  1.1  christos                 <property name="label" translatable="yes">Insert char</property>
     54  1.1  christos                 <property name="visible">yes</property>
     55  1.1  christos               </widget>
     56  1.1  christos             </child>
     57  1.1  christos 
     58  1.1  christos             <child>
     59  1.1  christos               <widget class="GtkButton" id="close_button">
     60  1.1  christos                 <property name="can_default">yes</property>
     61  1.1  christos                 <property name="can_focus">yes</property>
     62  1.1  christos                 <property name="visible">yes</property>
     63  1.1  christos                 <property name="label">gtk-close</property>
     64  1.1  christos                 <property name="use_stock">yes</property>
     65  1.1  christos                 <property name="use_underline">yes</property>
     66  1.1  christos               </widget>
     67  1.1  christos             </child>
     68  1.1  christos 
     69  1.1  christos             <child>
     70  1.1  christos               <widget class="GtkButton" id="help_button">
     71  1.1  christos                 <property name="can_default">yes</property>
     72  1.1  christos                 <property name="can_focus">yes</property>
     73  1.1  christos                 <property name="visible">yes</property>
     74  1.1  christos                 <property name="label">gtk-help</property>
     75  1.1  christos                 <property name="use_stock">yes</property>
     76  1.1  christos                 <property name="use_underline">yes</property>
     77  1.1  christos               </widget>
     78  1.1  christos             </child>
     79  1.1  christos           </widget>
     80  1.1  christos           <packing>
     81  1.1  christos             <property name="padding">0</property>
     82  1.1  christos             <property name="expand">no</property>
     83  1.1  christos             <property name="fill">yes</property>
     84  1.1  christos             <property name="pack_type">GTK_PACK_END</property>
     85  1.1  christos           </packing>
     86  1.1  christos         </child>
     87  1.1  christos 
     88  1.1  christos         <child>
     89  1.1  christos           <widget class="GtkVBox" id="asciitable_dialog_content">
     90  1.1  christos             <property name="border_width">6</property>
     91  1.1  christos             <property name="homogeneous">no</property>
     92  1.1  christos             <property name="spacing">8</property>
     93  1.1  christos             <property name="visible">yes</property>
     94  1.1  christos 
     95  1.1  christos             <child>
     96  1.1  christos               <widget class="GtkLabel" id="label1">
     97  1.1  christos                 <property name="label" translatable="yes">If you wish to insert any of the characters in to the active 
     98  1.1  christos document, select the character and click the &quot;Insert Char&quot; 
     99  1.1  christos button or double click the character in the table.</property>
    100  1.1  christos                 <property name="justify">GTK_JUSTIFY_LEFT</property>
    101  1.1  christos                 <property name="wrap">no</property>
    102  1.1  christos                 <property name="xalign">0.0</property>
    103  1.1  christos                 <property name="yalign">0.5</property>
    104  1.1  christos                 <property name="xpad">0</property>
    105  1.1  christos                 <property name="ypad">0</property>
    106  1.1  christos                 <property name="visible">yes</property>
    107  1.1  christos               </widget>
    108  1.1  christos               <packing>
    109  1.1  christos                 <property name="padding">0</property>
    110  1.1  christos                 <property name="expand">no</property>
    111  1.1  christos                 <property name="fill">no</property>
    112  1.1  christos               </packing>
    113  1.1  christos             </child>
    114  1.1  christos 
    115  1.1  christos             <child>
    116  1.1  christos               <widget class="GtkScrolledWindow" id="scrolledwindow1">
    117  1.1  christos                 <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
    118  1.1  christos                 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
    119  1.1  christos                 <property name="shadow_type">GTK_SHADOW_IN</property>
    120  1.1  christos                 <property name="height-request">350</property>
    121  1.1  christos                 <property name="visible">yes</property>
    122  1.1  christos 
    123  1.1  christos                 <child>
    124  1.1  christos                   <widget class="GtkTreeView" id="ascii_table">
    125  1.1  christos                     <property name="can_focus">yes</property>
    126  1.1  christos                     <property name="headers-visible">yes</property>
    127  1.1  christos                     <property name="visible">yes</property>
    128  1.1  christos                   </widget>
    129  1.1  christos                 </child>
    130  1.1  christos 
    131  1.1  christos                 <child internal-child="hscrollbar">
    132  1.1  christos                   <widget class="GtkHScrollbar" id="convertwidget1">
    133  1.1  christos                     <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
    134  1.1  christos                     <property name="visible">yes</property>
    135  1.1  christos                   </widget>
    136  1.1  christos                 </child>
    137  1.1  christos 
    138  1.1  christos                 <child internal-child="vscrollbar">
    139  1.1  christos                   <widget class="GtkVScrollbar" id="convertwidget2">
    140  1.1  christos                     <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
    141  1.1  christos                     <property name="visible">yes</property>
    142  1.1  christos                   </widget>
    143  1.1  christos                 </child>
    144  1.1  christos               </widget>
    145  1.1  christos               <packing>
    146  1.1  christos                 <property name="padding">0</property>
    147  1.1  christos                 <property name="expand">yes</property>
    148  1.1  christos                 <property name="fill">yes</property>
    149  1.1  christos               </packing>
    150  1.1  christos             </child>
    151  1.1  christos           </widget>
    152  1.1  christos           <packing>
    153  1.1  christos             <property name="padding">0</property>
    154  1.1  christos             <property name="expand">yes</property>
    155  1.1  christos             <property name="fill">yes</property>
    156  1.1  christos           </packing>
    157  1.1  christos         </child>
    158  1.1  christos       </widget>
    159  1.1  christos       <packing>
    160  1.1  christos         <property name="padding">4</property>
    161  1.1  christos         <property name="expand">yes</property>
    162  1.1  christos         <property name="fill">yes</property>
    163  1.1  christos       </packing>
    164  1.1  christos     </child>
    165  1.1  christos   </widget>
    166  1.1  christos </glade-interface>
    167  1.1  christos EOF
    168  1.1  christos 
    169  1.1  christos tmpfiles="$tmpfiles xg-gl-3.tmp xg-gl-3.pot"
    170  1.1  christos : ${XGETTEXT=xgettext}
    171  1.1  christos ${XGETTEXT} -o xg-gl-3.tmp asciitable.glade2 
    172  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
    173  1.1  christos grep -v 'POT-Creation-Date' < xg-gl-3.tmp > xg-gl-3.pot
    174  1.1  christos 
    175  1.1  christos tmpfiles="$tmpfiles xg-gl-3.ok"
    176  1.1  christos cat <<\EOF > xg-gl-3.ok
    177  1.1  christos # SOME DESCRIPTIVE TITLE.
    178  1.1  christos # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
    179  1.1  christos # This file is distributed under the same license as the PACKAGE package.
    180  1.1  christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
    181  1.1  christos #
    182  1.1  christos #, fuzzy
    183  1.1  christos msgid ""
    184  1.1  christos msgstr ""
    185  1.1  christos "Project-Id-Version: PACKAGE VERSION\n"
    186  1.1  christos "Report-Msgid-Bugs-To: \n"
    187  1.1  christos "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    188  1.1  christos "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    189  1.1  christos "Language-Team: LANGUAGE <LL (at] li.org>\n"
    190  1.1  christos "MIME-Version: 1.0\n"
    191  1.1  christos "Content-Type: text/plain; charset=CHARSET\n"
    192  1.1  christos "Content-Transfer-Encoding: 8bit\n"
    193  1.1  christos 
    194  1.1  christos #: asciitable.glade2:7
    195  1.1  christos msgid "gedit: ASCII table"
    196  1.1  christos msgstr ""
    197  1.1  christos 
    198  1.1  christos #: asciitable.glade2:30
    199  1.1  christos msgid "Insert char"
    200  1.1  christos msgstr ""
    201  1.1  christos 
    202  1.1  christos #: asciitable.glade2:74
    203  1.1  christos msgid ""
    204  1.1  christos "If you wish to insert any of the characters in to the active \n"
    205  1.1  christos "document, select the character and click the \"Insert Char\" \n"
    206  1.1  christos "button or double click the character in the table."
    207  1.1  christos msgstr ""
    208  1.1  christos EOF
    209  1.1  christos 
    210  1.1  christos : ${DIFF=diff}
    211  1.1  christos ${DIFF} xg-gl-3.ok xg-gl-3.pot
    212  1.1  christos result=$?
    213  1.1  christos 
    214  1.1  christos rm -fr $tmpfiles
    215  1.1  christos 
    216  1.1  christos exit $result
    217