1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# When a header entry is provided by xgettext, it overrides any msgid "" 5# present in the input. 6 7cat <<EOF > xg-test3.in.c 8This is a test of the xgettext functionality. 9/* xgettext:no-c-format */ 10_("extract me") 11Sometimes keywords can be spread apart 12xgettext:no-c-format 13_ ( "what about me" ) 14And even further on accasion 15_ 16( 17"hello" 18) 19 20/* no additional empty strings */ 21_("") 22EOF 23 24: ${XGETTEXT=xgettext} 25# delete POT-Creation-Date: line because the date depends on local time. 26${XGETTEXT} --output xg-test3.tmp --no-location -k_ xg-test3.in.c 2>/dev/null || Exit 1 27sed -e '/\"POT-Creation-Date:.*/d' < xg-test3.tmp | LC_ALL=C tr -d '\r' > xg-test3.po 28 29cat <<EOF > xg-test3.ok 30# SOME DESCRIPTIVE TITLE. 31# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 32# This file is distributed under the same license as the PACKAGE package. 33# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 34# 35#, fuzzy 36msgid "" 37msgstr "" 38"Project-Id-Version: PACKAGE VERSION\n" 39"Report-Msgid-Bugs-To: \n" 40"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 41"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 42"Language-Team: LANGUAGE <LL@li.org>\n" 43"Language: \n" 44"MIME-Version: 1.0\n" 45"Content-Type: text/plain; charset=CHARSET\n" 46"Content-Transfer-Encoding: 8bit\n" 47 48#, no-c-format 49msgid "extract me" 50msgstr "" 51 52msgid "what about me" 53msgstr "" 54 55msgid "hello" 56msgstr "" 57EOF 58 59: ${DIFF=diff} 60${DIFF} xg-test3.ok xg-test3.po 61result=$? 62 63exit $result 64