• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test of --java option.
5
6# Test whether we can compile and execute Java programs.
7test "${JAVA_CHOICE}" != no || {
8  echo "Skipping test: configured with --disable-java"
9  Exit 77
10}
11test "${BUILDJAVA}" = yes || {
12  echo "Skipping test: Java compiler or jar not found"
13  Exit 77
14}
15test "${TESTJAVA}" = yes || {
16  echo "Skipping test: Java engine not found"
17  Exit 77
18}
19
20test -d mu-java-1 || mkdir mu-java-1
21
22cat <<\EOF > mu-java-1/fr.po
23msgid ""
24msgstr ""
25"Content-Type: text/plain; charset=ISO-8859-1\n"
26"Plural-Forms: nplurals=2; plural=(n > 1);\n"
27
28msgid "'Your command, please?', asked the waiter."
29msgstr "�Votre commande, s'il vous plait�, dit le gar�on."
30
31# Les gateaux allemands sont les meilleurs du monde.
32#, java-format
33msgid "a piece of cake"
34msgid_plural "{0,number} pieces of cake"
35msgstr[0] "un morceau de gateau"
36msgstr[1] "{0,number} morceaux de gateau"
37
38# Reverse the arguments.
39#, java-format
40msgid "{0} is replaced by {1}."
41msgstr "{1} remplace {0}."
42
43# A proximity measure.
44msgid "Close"
45msgstr "Proche"
46
47# A menu entry.
48msgctxt "File"
49msgid "Close"
50msgstr "Fermer"
51EOF
52
53: ${MSGFMT=msgfmt}
54${MSGFMT} -j -d mu-java-1 -r prog -l fr mu-java-1/fr.po || Exit 1
55
56: ${MSGUNFMT=msgunfmt}
57CLASSPATH=mu-java-1${CLASSPATH:+:$CLASSPATH} \
58GETTEXTJAR=../../src/gettext.jar \
59${MSGUNFMT} --java -d mu-java-1 -r prog -l fr -o mu-java-1/prog.out || Exit 1
60
61: ${MSGCAT=msgcat}
62${MSGCAT} -s -o mu-java-1/prog.sort mu-java-1/prog.out || Exit 1
63
64cat <<\EOF > mu-java-1/prog.ok
65msgid ""
66msgstr ""
67"Content-Type: text/plain; charset=UTF-8\n"
68"Plural-Forms: nplurals=2; plural=(n > 1);\n"
69
70msgid "'Your command, please?', asked the waiter."
71msgstr "«Votre commande, s'il vous plait», dit le garçon."
72
73msgid "Close"
74msgstr "Proche"
75
76msgctxt "File"
77msgid "Close"
78msgstr "Fermer"
79
80msgid "a piece of cake"
81msgid_plural "{0,number} pieces of cake"
82msgstr[0] "un morceau de gateau"
83msgstr[1] "{0,number} morceaux de gateau"
84
85msgid "{0} is replaced by {1}."
86msgstr "{1} remplace {0}."
87EOF
88: ${DIFF=diff}
89${DIFF} mu-java-1/prog.ok mu-java-1/prog.sort || Exit 1
90
91Exit 0
92