1 #! /bin/sh 2 3 # Test --translated option with Java .properties syntax. 4 5 tmpfiles="" 6 trap 'rm -fr $tmpfiles' 1 2 3 15 7 8 tmpfiles="$tmpfiles ma-s-1.properties" 9 cat <<\EOF > ma-s-1.properties 10 # HEADER. 11 # 12 !=Project-Id-Version\: Bonnie Tyler\n 13 14 #: married-men:4 15 #, fuzzy 16 !The\ world\ is\ full\ of\ married\ men=So viele verheiratete M\u00e4nner 17 18 #: married-men:5 19 with\ wives\ who\ never\ understand=und ihre Frauen verstehen sie nicht 20 21 #: married-men:6 22 !They're\ looking\ for\ someone\ to\ share= 23 24 # schwer zu \u00fcbersetzen... 25 #: married-men:7 26 !the\ excitement\ of\ a\ love\ affair= 27 28 #: married-men:8 29 !Just\ as\ soon\ as\ they\ find\ you= 30 31 #: married-men:9 32 !They\ warn\ you\ and\ darn\ you= 33 EOF 34 35 tmpfiles="$tmpfiles ma-s-1.out" 36 : ${MSGATTRIB=msgattrib} 37 ${MSGATTRIB} --translated --properties-input --properties-output -o ma-s-1.out ma-s-1.properties 38 test $? = 0 || { rm -fr $tmpfiles; exit 1; } 39 40 tmpfiles="$tmpfiles ma-s-1.ok" 41 cat <<\EOF > ma-s-1.ok 42 # HEADER. 43 # 44 !=Project-Id-Version\: Bonnie Tyler\n 45 46 #: married-men:4 47 #, fuzzy 48 !The\ world\ is\ full\ of\ married\ men=So viele verheiratete M\u00e4nner 49 50 #: married-men:5 51 with\ wives\ who\ never\ understand=und ihre Frauen verstehen sie nicht 52 EOF 53 54 : ${DIFF=diff} 55 ${DIFF} ma-s-1.ok ma-s-1.out 56 result=$? 57 58 rm -fr $tmpfiles 59 60 exit $result 61