• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test extraction of non-ASCII msgids.
5
6cat <<EOF > xg-test5.c
7void foo (int option)
8{
9  printf (_("%s: nezn�m� p�ep�na� -- %c\n"), option);
10  printf (_("%s: p�ep�na� vy�aduje argument -- %c\n"), option);
11}
12EOF
13
14: ${XGETTEXT=xgettext}
15${XGETTEXT} --no-location -k_ -o xg-test5.po xg-test5.c 2>/dev/null
16test $? = 1 || { Exit 1; }
17${XGETTEXT} --no-location -k_ --from-code=iso-8859-2 -o xg-test5.tmp xg-test5.c || Exit 1
18LC_ALL=C tr -d '\r' < xg-test5.tmp > xg-test5.po || Exit 1
19
20sed -e '/POT-Creation-Date/d' < xg-test5.po > xg-test5.pot
21
22cat <<EOF > xg-test5.ok
23# SOME DESCRIPTIVE TITLE.
24# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
25# This file is distributed under the same license as the PACKAGE package.
26# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
27#
28#, fuzzy
29msgid ""
30msgstr ""
31"Project-Id-Version: PACKAGE VERSION\n"
32"Report-Msgid-Bugs-To: \n"
33"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
34"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
35"Language-Team: LANGUAGE <LL@li.org>\n"
36"Language: \n"
37"MIME-Version: 1.0\n"
38"Content-Type: text/plain; charset=UTF-8\n"
39"Content-Transfer-Encoding: 8bit\n"
40
41#, c-format
42msgid "%s: neznámý přepínač -- %c\n"
43msgstr ""
44
45#, c-format
46msgid "%s: přepínač vyžaduje argument -- %c\n"
47msgstr ""
48EOF
49
50: ${DIFF=diff}
51${DIFF} xg-test5.ok xg-test5.pot
52result=$?
53
54exit $result
55