• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test compendium option.
5
6# Translation is available within the compendium (mm-c-3.com)
7# the old translation file (mm-c-3.in1) contains the same msgid
8# Why not make use of the translation from the compendium?
9
10cat <<EOF > mm-c-3.in1
11#: file.c:123
12msgid "1"
13msgstr "1x"
14
15#: file.c:345
16msgid "one, two, three"
17msgstr ""
18EOF
19
20cat <<EOF > mm-c-3.com
21#: file.c:345
22msgid "one, two, three"
23msgstr "1, 2, 3"
24EOF
25
26cat <<EOF > mm-c-3.pot
27#: file.c:123
28msgid "1"
29msgstr ""
30
31#: file.c:345
32msgid "one, two, three"
33msgstr ""
34EOF
35
36: ${MSGMERGE=msgmerge}
37${MSGMERGE} -q -C mm-c-3.com -o mm-c-3.tmp mm-c-3.in1 mm-c-3.pot || Exit 1
38LC_ALL=C tr -d '\r' < mm-c-3.tmp > mm-c-3.out || Exit 1
39
40cat << EOF > mm-c-3.ok
41#: file.c:123
42msgid "1"
43msgstr "1x"
44
45#: file.c:345
46msgid "one, two, three"
47msgstr "1, 2, 3"
48EOF
49
50: ${DIFF=diff}
51${DIFF} mm-c-3.ok mm-c-3.out
52result=$?
53
54exit $result
55