blob: 0ad3e226a36db4c9c549fe3bb5cb560bcaf2f659 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/bin/sh
#
# Plural test for YCP
#
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
tmpfiles="$tmpfiles xg-y-1.ycp"
cat <<EOF > xg-y-1.ycp
title = sformat (_("%1 package", "%1 packages", num), num);
EOF
tmpfiles="$tmpfiles xg-y-1.po"
: ${XGETTEXT=xgettext}
${XGETTEXT} --omit-header --no-location -k:1,2 -d xg-y-1 xg-y-1.ycp
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
tmpfiles="$tmpfiles xg-y-1.ok"
cat <<EOF > xg-y-1.ok
#, ycp-format
msgid "%1 package"
msgid_plural "%1 packages"
msgstr[0] ""
msgstr[1] ""
EOF
: ${DIFF=diff}
${DIFF} xg-y-1.ok xg-y-1.po
result=$?
rm -fr $tmpfiles
exit $result
|