File: msgfmt-xml-5

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 (138 lines) | stat: -rwxr-xr-x 3,996 bytes parent folder | download | duplicates (2)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test msgfmt --xml: DocBook support with --replace-text option

# Example file taken from
# https://sources.debian.org/src/python-activipy/0.1-9/debian/activipy_tester.dbk/
cat <<\EOF > activipy_tester.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">

<!-- (c) 2015 W. Martin Borgert <debacle@debian.org>
     Date: 2015-11-22
     License of this manual: GPL-3+ -->

<refentry>
  <refmeta>
    <refentrytitle>activipy_tester</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class="source">activipy_tester</refmiscinfo>
    <refmiscinfo class="manual">User Commands</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>activipy_tester</refname>

    <refpurpose>Test for activitystreams correctness</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>activipy_tester</command>
      <arg><option>-h</option></arg>
      <arg><option>--help</option></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <para>
      Run <command>activipy_tester --help</command> for more options.
    </para>
  </refsect1>
</refentry>
EOF

cat <<\EOF > de.po
# 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"
"POT-Creation-Date: 2024-10-11 23:47+0200\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: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: activipy_tester.xml:11 activipy_tester.xml:13 activipy_tester.xml:17
msgid "activipy_tester"
msgstr ""

#: activipy_tester.xml:12
msgid "1"
msgstr ""

#: activipy_tester.xml:14
msgid "User Commands"
msgstr "Benutzer-Befehle"

#: activipy_tester.xml:19
msgid "Test for activitystreams correctness"
msgstr "Tests von activitystreams"

#: activipy_tester.xml:22
msgid ""
"<command>activipy_tester</command><arg><option>-h</option></arg><arg><option>--help</option></arg>"
msgstr ""

#: activipy_tester.xml:30
msgid "Description"
msgstr "Beschreibung"

#: activipy_tester.xml:32
msgid "Run <command>activipy_tester --help</command> for more options."
msgstr "Für weitere Optionen führen Sie <command>activipy_tester --help</command> aus."
EOF

cat <<\EOF > activipy_tester.de.xml.ok
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<!-- (c) 2015 W. Martin Borgert <debacle@debian.org>
     Date: 2015-11-22
     License of this manual: GPL-3+ -->
<refentry>
  <refmeta>
    <refentrytitle>activipy_tester</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class="source">activipy_tester</refmiscinfo>
    <refmiscinfo class="manual" xml:lang="de">Benutzer-Befehle</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>activipy_tester</refname>
    <refpurpose xml:lang="de">Tests von activitystreams</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>activipy_tester</command>
      <arg>
        <option>-h</option>
      </arg>
      <arg>
        <option>--help</option>
      </arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title xml:lang="de">Beschreibung</title>
    <para xml:lang="de">Für weitere Optionen führen Sie <command>activipy_tester --help</command> aus.</para>
  </refsect1>
</refentry>
EOF

: ${MSGFMT=msgfmt}
${MSGFMT} --xml --template=activipy_tester.xml --replace-text -l de de.po -o activipy_tester.de.xml \
  || Exit 1

: ${DIFF=diff}
${DIFF} activipy_tester.de.xml.ok activipy_tester.de.xml
test $? = 0 || Exit 1