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