aboutsummaryrefslogtreecommitdiffstats
path: root/english/doc/manuals.defs
blob: 4c6fad930b1b2a2f47a250284920b907bfa5cd5e (plain) (blame)
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
#use wml::debian::common_tags
#use wml::debian::languages
#include "$(ENGLISHDIR)/doc/user-manuals.defs"
#use wml::debian::toc

# See user-manuals.defs for the quick cheatsheet

<define-tag toc-title-formatting endtag="required" whitespace="delete">
  <p><strong><span class="ddpbooktitle">%body</span></strong></p>
</define-tag>

<toc-display/>

<define-tag document>
  <toc-add-entry name="%1">%0</toc-add-entry>
</define-tag>

<define-tag doctable endtag=required whitespace=delete>
<table summary="">
  %body
</table>
</define-tag>

<bind-gettext-domain domain="doc" />

<define-tag authors>
<tr>
  <td><strong><gettext domain="doc">Authors:</gettext></strong></td>
  <td>%0</td>
</tr>
</define-tag>

<define-tag editors>
<tr>
  <td><strong><gettext domain="doc">Editors:</gettext></strong></td>
  <td>%0</td>
</tr>
</define-tag>

<define-tag maintainer>
<tr>
  <td><strong><gettext domain="doc">Maintainer:</gettext></strong></td>
  <td>%0</td>
</tr>
</define-tag>

<define-tag status endtag=required whitespace=delete>
<tr>
  <td valign="top"><strong><gettext domain="doc">Status:</gettext></strong></td>
  <td>%body</td>
</tr>
</define-tag>

<define-tag availability endtag=required whitespace=delete>
<tr>
  <td valign="top"><strong><gettext domain="doc">Availability:</gettext></strong></td>
  <td>%body</td>
</tr>
</define-tag>

<define-tag inddpvcs whitespace=delete>
  <preserve name index baselink langs formats basename path loc txt version naming srctype vcsname vcstype vcsweb vcsrepo />
  <set-var %attributes />
  <if <get-var name /> "" <exit message="you must pass a name to the inddpvcs tag" /> />
  #   Default values
  <defvar index index />
  <if <get-var langs />
      <set-var add-lang-ext=true />
      <group <set-var langs=en /><set-var add-lang-ext= /> />
  />
  <defvar formats html />
  <defvar path "manuals/<get-var name />" />
  <defvar basename "<get-var name />" />
  <defvar vcsname <get-var name /> />
# naming: default(extention: pt-br, ...), locale(extention: pt_BR, ...), none(no listing)
  <defvar naming default />
  <defvar srctype XML />
  <defvar vcstype ddp />

  <subst-in-var langs " " "\n" />
  <subst-in-var formats " " "\n" />

 <when <not <match <get-var naming /> "none" />/>>
  <br/>
  <gettext domain="doc">Latest version:</gettext>
  <ul>
  <foreach lang langs>
    <li>
    <:
    use Locale::Language;
    my $xy = '<get-var lang />';
    $xy =~ s/[-_]\w+$//; # for pt-br, pt_BR and such
    my $printlang = $trans{$CUR_ISO_LANG}{lc(code2language($xy))};
    $printlang = $trans{$CUR_ISO_LANG}{'norwegian'} if ($xy eq 'nb'); # nb is refered as Norwegian on the website
    $printlang = $trans{$CUR_ISO_LANG}{'greek'} if ($xy eq 'el'); # el is displayed as “Greek, Modern (1453-)”
    $printlang = "<strong>$printlang</strong>" if ($xy eq $CUR_ISO_LANG);
    print $printlang;
    :>
    <set-var version=<get-var version-<get-var name />-<get-var lang /> /> />
    <when <get-var version />>
      &nbsp;<gettext domain="doc">(version <get-var version />)</gettext>
    </when>
    :
    <foreach format formats>
      <set-var extlang=<get-var lang /> />
      <when <match <get-var naming /> "locale" />>
      	<when <match <get-var format /> "(dvi|epub|txt|pdf|ps)" />>
		<subst-in-var extlang "(\w\w)-(\w\w)" "\\1_<:=uc("\\2"):>" />
      	</when>
      </when>
      &nbsp;
      <if <match <get-var format /> "^html$" action=report />
        <set-var baselink=<get-var index /> />
        <set-var baselink=<get-var basename /> />
      />
      <if <get-var add-lang-ext />
        <if <match <get-var format /> "^singlepagehtml$" action=report />
              <set-var loc="<get-var baselink />.<get-var extlang />.html" />
        <set-var loc="<get-var baselink />.<get-var extlang />.<get-var format />" />
        />
        <if <match <get-var format /> "^singlepagehtml$" action=report />
              <set-var loc="<get-var baselink />.<get-var format />.html" />
        <set-var loc="<get-var baselink />.<get-var format />" />
        />
      />
      <when <match <get-var add-lang-ext /> "^$" action=report />>
        <when <match <get-var index /> "^index$" action=report />>
          <when <match <get-var format /> "^html$" action=report />>
            <set-var loc="" />
          </when>
        </when>
      </when>
      <when <match <get-var format /> "(pdf|ps|dvi|epub|html)" action=report />>
        <set-var txt=<upcase <get-var format /> /> />
      </when>
      <when <match <get-var format /> "txt" action=report />>
        <set-var txt=<gettext domain="doc">plain text</gettext> />
      </when>
      <when <match <get-var format /> "singlepagehtml$" action=report />>
        <set-var txt=<gettext domain="doc">HTML (single page)</gettext> />
      </when>
      [<a href="<get-var path />/<get-var loc />"><get-var txt /></a>]
#      <if <match <get-var format /> "(html|txt|pdf|ps)" action=report /> ""
#        <exit message="you must pass a valid format to the inddpvcs tag" />
#      />
    </foreach>
    </li>
  </foreach>

  </ul>
 </when>
# DDP Git repo access (used)
 <when <match <get-var vcstype /> "ddp" action=report />>
  <set-var vcsweb="https://salsa.debian.org/ddp-team/<get-var vcsname />" />
  <set-var vcsrepo="https://salsa.debian.org/ddp-team/<get-var vcsname />.git" />
  <p><gettext domain="doc">The latest <get-var srctype /> source is available through the <a href="https://packages.debian.org/git">Git</a> repository.</gettext></p>
  <ul>
    <li><gettext domain="doc">Web interface: </gettext><a href="<get-var vcsweb />"><get-var vcsweb /></a></li>
    <li><gettext domain="doc">VCS interface: </gettext><tt>git clone <get-var vcsrepo /></tt></li>
  </ul>
 </when>
# DDP attic Git repo access (used)
 <when <match <get-var vcstype /> "attic" action=report />>
  <set-var vcsweb="https://salsa.debian.org/ddp-team/attic/<get-var vcsname />" />
  <set-var vcsrepo="https://salsa.debian.org/ddp-team/attic/<get-var vcsname />.git" />
  <p><gettext domain="doc">The latest <get-var srctype /> source is available through the <a href="https://packages.debian.org/git">Git</a> repository.</gettext></p>
  <ul>
    <li><gettext domain="doc">Web interface: </gettext><a href="<get-var vcsweb />"><get-var vcsweb /></a></li>
    <li><gettext domain="doc">VCS interface: </gettext><tt>git clone <get-var vcsrepo /></tt></li>
  </ul>
 </when>
# Generic Git repo access (used)
 <when <match <get-var vcstype /> "git" action=report />>
  <p><gettext domain="doc">The latest <get-var srctype /> source is available through the <a href="https://packages.debian.org/git">Git</a> repository.</gettext></p>
  <ul>
    <li><gettext domain="doc">Web interface: </gettext><a href="<get-var vcsweb />"><get-var vcsweb /></a></li>
    <li><gettext domain="doc">VCS interface: </gettext><tt>git clone <get-var vcsrepo /></tt></li>
  </ul>
 </when>
  <restore name index baselink langs formats basename path loc txt version naming srctype vcsname vcstype vcsweb vcsrepo />
</define-tag>

<define-tag inpackage>
  <gettext domain="doc">Debian package</gettext>
  <strong><a href="https://packages.debian.org/%0">%0</a></strong>
</define-tag>
<define-tag insrcpackage>
  <gettext domain="doc">Debian package</gettext>
  <strong><a href="https://packages.debian.org/src:%0">%0</a></strong>
</define-tag>

<define-tag inoldpackage>
  <gettext domain="doc">Debian package (archived)</gettext>
  <strong>%0</strong>
</define-tag>
<define-tag inoldsrcpackage>
  <gettext domain="doc">Debian package (archived)</gettext>
  <strong>%0</strong>
</define-tag>

© 2014-2024 Faster IT GmbH | imprint | privacy policy