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