1 | <!--
|
---|
2 | !
|
---|
3 | ! Some notes to the DTD:
|
---|
4 | !
|
---|
5 | ! The location element is set as optional since it was introduced first in Qt 4.2.
|
---|
6 | ! The userdata element is set as optional since it was introduced first in Qt 4.4.
|
---|
7 | ! The source and translation elements are optional starting with version 3.0
|
---|
8 | ! (Qt 4.6) to support S60 blank messages.
|
---|
9 | !
|
---|
10 | -->
|
---|
11 | <!--
|
---|
12 | ! Macro used in order to escape byte entities not allowed in an xml document
|
---|
13 | ! for instance, only #x9, #xA and #xD are allowed characters below #x20.
|
---|
14 | -->
|
---|
15 | <!ENTITY % evilstring '(#PCDATA | byte)*' >
|
---|
16 | <!ELEMENT byte EMPTY>
|
---|
17 | <!-- value contains decimal (e.g. 1000) or hex (e.g. x3e8) unicode encoding of one char -->
|
---|
18 | <!ATTLIST byte
|
---|
19 | value CDATA #REQUIRED>
|
---|
20 | <!--
|
---|
21 | ! This element wildcard is no valid DTD. No better solution available.
|
---|
22 | ! extra elements may appear in TS and message elements. Each element may appear
|
---|
23 | ! only once within each scope. The contents are preserved verbatim; any
|
---|
24 | ! attributes are dropped. Currently recognized extra tags include:
|
---|
25 | ! extra-po-msgid_plural, extra-po-old_msgid_plural
|
---|
26 | ! extra-po-flags (comma-space separated list)
|
---|
27 | ! extra-loc-layout_id
|
---|
28 | ! extra-loc-feature
|
---|
29 | ! extra-loc-blank
|
---|
30 | -->
|
---|
31 | <!ELEMENT extra-* %evilstring; >
|
---|
32 | <!ELEMENT TS (defaultcodec?, extra-**, (context|message)+) >
|
---|
33 | <!ATTLIST TS
|
---|
34 | version CDATA #IMPLIED
|
---|
35 | sourcelanguage CDATA #IMPLIED
|
---|
36 | language CDATA #IMPLIED>
|
---|
37 | <!-- The encoding to use in the .qm file by default. Default is ISO-8859-1. -->
|
---|
38 | <!ELEMENT defaultcodec (#PCDATA) >
|
---|
39 | <!ELEMENT context (name?, comment?, (context|message)+) >
|
---|
40 | <!ATTLIST context
|
---|
41 | encoding CDATA #IMPLIED>
|
---|
42 | <!ELEMENT name %evilstring; >
|
---|
43 | <!-- If "no", then the context nesting is for informational puposes only -->
|
---|
44 | <!ATTLIST name
|
---|
45 | nest (yes|no) "yes">
|
---|
46 | <!-- This is "disambiguation" in the (new) API, or "msgctxt" in gettext speak -->
|
---|
47 | <!ELEMENT comment %evilstring; >
|
---|
48 | <!-- Previous content of comment (result of merge) -->
|
---|
49 | <!ELEMENT oldcomment %evilstring; >
|
---|
50 | <!-- The real comment (added by developer/designer) -->
|
---|
51 | <!ELEMENT extracomment %evilstring; >
|
---|
52 | <!-- Comment added by translator -->
|
---|
53 | <!ELEMENT translatorcomment %evilstring; >
|
---|
54 | <!ELEMENT message (location*, source?, oldsource?, comment?, oldcomment?, extracomment?, translatorcomment?, translation?, userdata?, extra-**) >
|
---|
55 | <!--
|
---|
56 | ! If utf8 is true, the defaultcodec is overridden and the message is encoded
|
---|
57 | ! in UTF-8 in the .qm file.
|
---|
58 | -->
|
---|
59 | <!ATTLIST message
|
---|
60 | id CDATA #IMPLIED
|
---|
61 | utf8 (true|false) "false"
|
---|
62 | numerus (yes|no) "no">
|
---|
63 | <!ELEMENT location EMPTY>
|
---|
64 | <!--
|
---|
65 | ! If the line is omitted, the location specifies only a file.
|
---|
66 | !
|
---|
67 | ! location supports relative specifications as well. Line numbers are
|
---|
68 | ! relative (explicitly positive or negative) to the last reference to a
|
---|
69 | ! given filename; each file starts with current line 0. If the filename
|
---|
70 | ! is omitted, the "current" one is used. For the 1st location in a message,
|
---|
71 | ! "current" is the filename used for the 1st location of the previous message.
|
---|
72 | ! For subsequent locations, it is the filename used for the previous location.
|
---|
73 | ! A single .ts file has either all absolute or all relative locations.
|
---|
74 | -->
|
---|
75 | <!ATTLIST location
|
---|
76 | filename CDATA #IMPLIED
|
---|
77 | line CDATA #IMPLIED>
|
---|
78 | <!ELEMENT source %evilstring;>
|
---|
79 | <!-- Previous content of source (result of merge) -->
|
---|
80 | <!ELEMENT oldsource %evilstring;>
|
---|
81 | <!--
|
---|
82 | ! The following should really say one evilstring macro or several
|
---|
83 | ! numerusform or lengthvariant elements, but the DTD can't express this.
|
---|
84 | -->
|
---|
85 | <!ELEMENT translation (#PCDATA|byte|numerusform|lengthvariant)* >
|
---|
86 | <!--
|
---|
87 | ! If no type is set, the message is "finished".
|
---|
88 | ! Length variants must be ordered by falling display length.
|
---|
89 | ! variants may not be yes if the message has numerus yes.
|
---|
90 | -->
|
---|
91 | <!ATTLIST translation
|
---|
92 | type (unfinished|obsolete) #IMPLIED
|
---|
93 | variants (yes|no) "no">
|
---|
94 | <!-- Deprecated. Use extra-* -->
|
---|
95 | <!ELEMENT userdata (#PCDATA)* >
|
---|
96 | <!--
|
---|
97 | ! The following should really say one evilstring macro or several
|
---|
98 | ! lengthvariant elements, but the DTD can't express this.
|
---|
99 | ! Length variants must be ordered by falling display length.
|
---|
100 | -->
|
---|
101 | <!ELEMENT numerusform (#PCDATA|byte|lengthvariant)* >
|
---|
102 | <!ATTLIST numerusform
|
---|
103 | plurality (nullar|singular|dual|trial|paucal|greaterpaucal|plural|greaterplural) #IMPLIED>
|
---|
104 | variants (yes|no) "no">
|
---|
105 | <!ELEMENT lengthvariant %evilstring; >
|
---|
106 | <!--
|
---|
107 | ! The translation variants have a priority between 1 ("highest") and 9 ("lowest")
|
---|
108 | ! Typically longer translations get a higher priority.
|
---|
109 | ! If omitted, the order of appearance of the variants in the .ts files is used.
|
---|
110 | -->
|
---|
111 | <!ATTLIST lengthvariant
|
---|
112 | priority (1|2|3|4|5|6|7|8|9) #IMPLIED>
|
---|
113 |
|
---|