• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/tests/
1#!/bin/sh
2
3# Test of Perl support with UTF-8 encoded input.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles xg-pl-3.pl"
9cat <<\EOF > xg-pl-3.pl
10use charnames ':full';
11printf "%s\n", gettext "B��se B��bchen - wo sind sie blo\N{LATIN SMALL LETTER SHARP S}?";
12print gettext <<STR
13Die europ??ische W??hrung ist \N{EURO SIGN}.
14STR
15EOF
16
17tmpfiles="$tmpfiles xg-pl-3.po"
18: ${XGETTEXT=xgettext}
19# delete POT-Creation-Date: line because the date depends on local time.
20${XGETTEXT} --output - --from-code=UTF-8 xg-pl-3.pl \
21  | sed '/\"POT-Creation-Date:.*/d' | tr -d '\r' > xg-pl-3.po
22test $? = 0 || { rm -fr $tmpfiles; exit 1; }
23
24tmpfiles="$tmpfiles xg-pl-3.ok"
25cat <<\EOF > xg-pl-3.ok
26# SOME DESCRIPTIVE TITLE.
27# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
28# This file is distributed under the same license as the PACKAGE package.
29# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
30#
31#, fuzzy
32msgid ""
33msgstr ""
34"Project-Id-Version: PACKAGE VERSION\n"
35"Report-Msgid-Bugs-To: \n"
36"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
37"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
38"Language-Team: LANGUAGE <LL@li.org>\n"
39"MIME-Version: 1.0\n"
40"Content-Type: text/plain; charset=UTF-8\n"
41"Content-Transfer-Encoding: 8bit\n"
42
43#: xg-pl-3.pl:2
44msgid "B��se B��bchen - wo sind sie blo��?"
45msgstr ""
46
47#: xg-pl-3.pl:4
48msgid "Die europ��ische W��hrung ist ���.\n"
49msgstr ""
50EOF
51
52: ${DIFF=diff}
53${DIFF} xg-pl-3.ok xg-pl-3.po
54result=$?
55
56rm -fr $tmpfiles
57
58exit $result
59