#!/bin/sh . "${srcdir=.}/init.sh"; path_prepend_ . ../src # Test of GtkBuilder support. # Checks that the extracted pot contains the right translatable # content, comments and context. cat < xg-gl-6-empty.glade EOF : ${XGETTEXT=xgettext} ${XGETTEXT} -o xg-gl-6.pot xg-gl-6-empty.glade 2>/dev/null test $? = 0 || { echo "Skipping test: xgettext was built without Glade support" Exit 77 } cat < xg-gl-6.ui False This is an empty window EOF : ${XGETTEXT=xgettext} ${XGETTEXT} -o - xg-gl-6.ui | grep -v 'POT-Creation-Date' > xg-gl-6.pot || Exit 1 cat < xg-gl-6.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" #. This is a comment for empty window #: xg-gl-6.ui:6 msgctxt "This is the context for this text" msgid "This is an empty window" msgstr "" EOF : ${DIFF=diff} ${DIFF} xg-gl-6.ok xg-gl-6.pot result=$? test $result = 0 || { exit $result } # Check with --extract-all option. ${XGETTEXT} -a -o - xg-gl-6.ui | grep -v 'POT-Creation-Date' > xg-gl-6.pot || Exit 1 # Must be ignored. ${DIFF} xg-gl-6.ok xg-gl-6.pot result=$? exit $result