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