1 #! /bin/sh 2 3 # Test c-format handling. 4 5 tmpfiles="" 6 trap 'rm -fr $tmpfiles' 1 2 3 15 7 8 tmpfiles="$tmpfiles mf-test4.po" 9 cat <<EOF >mf-test4.po 10 # SOME DESCRIPTIVE TITLE. 11 # Copyright (C) YEAR Free Software Foundation, Inc. 12 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 13 # 14 #, fuzzy 15 msgid "" 16 msgstr "" 17 "Project-Id-Version: msgfmt test 4\n" 18 "PO-Revision-Date: 1996-04-05 19:47+0200\n" 19 "Last-Translator: Ulrich Drepper <drepper (at] gnu.org>\n" 20 "Language-Team: test <test (at] li.org>\n" 21 "MIME-Version: 1.0\n" 22 "Content-Type: text/plain; charset=ISO-8859-1\n" 23 "Content-Transfer-Encoding: 8bit\n" 24 # 25 #, no-c-format 26 msgid "no percent" 27 msgstr "but here %d is one" 28 # 29 #, c-format 30 msgid "in the %d normal %c order %s\n" 31 msgstr "but %2$c not %3$s here %1$d\n" 32 # 33 # If no c-format is given no check is wanted, not only if no-c-format is there. 34 msgid "This is a string %s" 35 msgstr "...but this $s not" 36 EOF 37 38 : ${MSGFMT=msgfmt} 39 ${MSGFMT} -o /dev/null mf-test4.po 2> /dev/null 40 result=$? 41 42 rm -fr $tmpfiles 43 44 exit $result 45