1#! /bin/sh 2 3# Test extractor of NeXTstep/GNUstep .strings files. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles xg-st-1.strings" 9cat <<\EOF > xg-st-1.strings 10/*** 11German.lproj/Localizable.strings 12updated by make_strings 2003-10-12 15:31:50 +0200 13add comments above this one 14***/ 15 16 17/*** Strings from Hello.m ***/ 18/* File: Hello.m:57 */ 19/* File: Hello.m:56 */ 20"Hello, world!" = "Hallo Welt!"; 21/* File: Hello.m:67 */ 22"This program is running as process number %d." 23= "Dieses Programm l�uft mit der Prozess-Nummer %d."; 24EOF 25 26tmpfiles="$tmpfiles xg-st-1.tmp xg-st-1.po" 27: ${XGETTEXT=xgettext} 28${XGETTEXT} -o xg-st-1.tmp xg-st-1.strings 29test $? = 0 || { rm -fr $tmpfiles; exit 1; } 30grep -v 'POT-Creation-Date' < xg-st-1.tmp > xg-st-1.po 31 32tmpfiles="$tmpfiles xg-st-1.ok" 33cat <<\EOF > xg-st-1.ok 34# SOME DESCRIPTIVE TITLE. 35# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 36# This file is distributed under the same license as the PACKAGE package. 37# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 38# 39#, fuzzy 40msgid "" 41msgstr "" 42"Project-Id-Version: PACKAGE VERSION\n" 43"Report-Msgid-Bugs-To: \n" 44"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 45"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 46"Language-Team: LANGUAGE <LL@li.org>\n" 47"MIME-Version: 1.0\n" 48"Content-Type: text/plain; charset=UTF-8\n" 49"Content-Transfer-Encoding: 8bit\n" 50 51# 52# German.lproj/Localizable.strings 53# updated by make_strings 2003-10-12 15:31:50 +0200 54# add comments above this one 55# 56# Strings from Hello.m 57#: Hello.m:57 Hello.m:56 58msgid "Hello, world!" 59msgstr "Hallo Welt!" 60 61#: Hello.m:67 62msgid "This program is running as process number %d." 63msgstr "Dieses Programm l��uft mit der Prozess-Nummer %d." 64EOF 65 66: ${DIFF=diff} 67${DIFF} xg-st-1.ok xg-st-1.po 68result=$? 69 70rm -fr $tmpfiles 71 72exit $result 73