File: xgettext-csharp-8

package info (click to toggle)
gettext 0.23.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 168,104 kB
  • sloc: ansic: 532,579; sh: 68,252; perl: 28,011; makefile: 9,066; lisp: 3,184; yacc: 1,055; java: 615; cs: 589; cpp: 397; objc: 343; sed: 79; tcl: 63; xml: 40; pascal: 11; php: 7; awk: 7
file content (66 lines) | stat: -rwxr-xr-x 1,758 bytes parent folder | download | duplicates (4)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test C# support: Unicode character escape handling

cat <<\EOF > xg-cs-8.cs
// Valid:
string s1 = "\U00020213";    // Codepoint U+20213
string s2 = "\uD840\uDE13";  // Encoded form of U+20213
string s3 = "\uD840\U0000DE13";  // Encoded form of U+20213
string s4 = "\U0000D840\uDE13";  // Encoded form of U+20213
string s5 = "\U0000D840\U0000DE13";  // Encoded form of U+20213
string s6 = "\xD840\xDE13";  // Encoded form of U+20213

// Invalid:
string i1 = "\U0020213";    // Unterminated
string i2 = "\uD840\u3032";  // Missing low surrogate
string i3 = "\uD840\uDE1";    // Unterminated after a high surrogate
EOF

: ${XGETTEXT=xgettext}
${XGETTEXT} --output xg-cs-8.tmp --add-location xg-cs-8.cs -a 2>/dev/null || Exit 1
sed -e '/\"POT-Creation-Date:.*/d' < xg-cs-8.tmp | LC_ALL=C tr -d '\r' > xg-cs-8.po || Exit 1

cat <<\EOF > xg-cs-8.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: xg-cs-8.cs:2 xg-cs-8.cs:3 xg-cs-8.cs:4 xg-cs-8.cs:5 xg-cs-8.cs:6
#: xg-cs-8.cs:7
msgid "𠈓"
msgstr ""

#: xg-cs-8.cs:10
msgid "\\U0020213"
msgstr ""

#: xg-cs-8.cs:11
msgid "�〲"
msgstr ""

#: xg-cs-8.cs:12
msgid "�\\uDE1"
msgstr ""
EOF

: ${DIFF=diff}
${DIFF} xg-cs-8.ok xg-cs-8.po
result=$?

exit $result