#!/bin/sh . "${srcdir=.}/init.sh"; path_prepend_ . ../src # Test of GtkBuilder support. # Checks the extraction of a medium size GtkBuilder file, with # comments, context and translatable and not translatable content. cat < xg-gl-7-empty.glade EOF : ${XGETTEXT=xgettext} ${XGETTEXT} -o xg-gl-7.pot xg-gl-7-empty.glade 2>/dev/null test $? = 0 || { echo "Skipping test: xgettext was built without Glade support" Exit 77 } cat < xg-gl-7.ui True False gtk-about True False gtk-help True False gtk-connect Hi Comment 999 Hello Translatable comment. 88 Oi Please... 86855555 Hi Comment 999 False True False vertical True False False True False One thing True True False One thing False True False image1 False False True False H_elp True True False One thing False True False image2 False Greetings False True False image3 False False True 0 True True liststore True True 1 One thing False True True True False False True 2 EOF : ${XGETTEXT=xgettext} ${XGETTEXT} -o - xg-gl-7.ui | grep -v 'POT-Creation-Date' > xg-gl-7.pot || Exit 1 cat <<\EOF > xg-gl-7.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 , 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 \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: xg-gl-7.ui:30 xg-gl-7.ui:45 msgctxt "First row" msgid "Hi" msgstr "" #. A comment. #. A multiline #. comment. #: xg-gl-7.ui:31 xg-gl-7.ui:46 msgid "Comment" msgstr "" #: xg-gl-7.ui:35 msgctxt "First row" msgid "Hello" msgstr "" #. This is no translatable. #: xg-gl-7.ui:36 msgid "Translatable comment." msgstr "" #: xg-gl-7.ui:41 msgctxt "This is not translatable" msgid "Please..." msgstr "" #. This thing is the menu label #: xg-gl-7.ui:67 msgctxt "Menu" msgid "One thing" msgstr "" #. This thing is the label in the inner menu. #: xg-gl-7.ui:75 msgctxt "One thing" msgid "One thing" msgstr "" #. This is easy. #: xg-gl-7.ui:92 msgctxt "Menu" msgid "H_elp" msgstr "" #. This one thing is for the second menu. #: xg-gl-7.ui:100 msgctxt "Second menu" msgid "One thing" msgstr "" #. To you too. #: xg-gl-7.ui:110 msgctxt "Second menu" msgid "Greetings" msgstr "" #. This one thing is the button. #: xg-gl-7.ui:147 msgctxt "Button" msgid "One thing" msgstr "" EOF : ${DIFF=diff} ${DIFF} xg-gl-7.ok xg-gl-7.pot result=$? exit $result