~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcdocs/gettext.xml

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ISO-8859-1"?>
 
2
<fpdoc-descriptions>
 
3
<package name="fcl">
 
4
 
 
5
<!--
 
6
  ====================================================================
 
7
    gettext
 
8
  ====================================================================
 
9
-->
 
10
 
 
11
<module name="gettext">
 
12
<short>Unit implementing resource string translation using gettext files</short>
 
13
<descr>
 
14
The <file>gettext</file> unit can be used to hook into the resource string mechanism
 
15
of Free Pascal to provide translations of the resource strings, based on the
 
16
GNU gettext mechanism. The unit provides a class (<link id="TMOFile"/>) to read 
 
17
the <file>.mo</file> files with localizations for various languages. It
 
18
also provides a couple of calls to translate all resource strings in an
 
19
application based on the translations in a <file>.mo</file> file.
 
20
</descr>
 
21
 
 
22
<!-- unresolved type reference Visibility: default -->
 
23
<element name="SysUtils">
 
24
<short>Exception and string formatting support.</short>
 
25
</element>
 
26
 
 
27
<!-- unresolved type reference Visibility: default -->
 
28
<element name="Classes">
 
29
<short>Stream support</short>
 
30
</element>
 
31
 
 
32
<!-- constant Visibility: default -->
 
33
<element name="MOFileHeaderMagic">
 
34
<short>file header bytes indicating a <file>.mo</file> file.</short>
 
35
<descr>
 
36
This constant is found as the first integer in a <file>.mo</file>
 
37
</descr>
 
38
<seealso>
 
39
<link id="TMOFileHeader"/>
 
40
</seealso>
 
41
</element>
 
42
 
 
43
<!-- record type Visibility: default -->
 
44
<element name="TMOFileHeader">
 
45
<short>Structure found at the head of a <file>.mo</file> file.</short>
 
46
<descr>
 
47
This structure describes the structure of a <file>.mo</file> file with
 
48
string localizations.
 
49
</descr>
 
50
</element>
 
51
 
 
52
<!-- variable Visibility: default -->
 
53
<element name="TMOFileHeader.magic">
 
54
<short>Magic constant, should equal <link id="#fcl.gettext.MOFileHeaderMagic">MOFileHeaderMagic</link>.</short>
 
55
</element>
 
56
 
 
57
<!-- variable Visibility: default -->
 
58
<element name="TMOFileHeader.revision">
 
59
<short>File revision</short>
 
60
</element>
 
61
 
 
62
<!-- variable Visibility: default -->
 
63
<element name="TMOFileHeader.nstrings">
 
64
<short>Number of string pairs in the file</short>
 
65
</element>
 
66
 
 
67
<!-- variable Visibility: default -->
 
68
<element name="TMOFileHeader.OrigTabOffset">
 
69
<short>Offset of the original strings description table.</short>
 
70
</element>
 
71
 
 
72
<!-- variable Visibility: default -->
 
73
<element name="TMOFileHeader.TransTabOffset">
 
74
<short>Offset of the translated strings description table.</short>
 
75
</element>
 
76
 
 
77
<!-- variable Visibility: default -->
 
78
<element name="TMOFileHeader.HashTabSize">
 
79
<short>Size of hashing table.</short>
 
80
</element>
 
81
 
 
82
<!-- variable Visibility: default -->
 
83
<element name="TMOFileHeader.HashTabOffset">
 
84
<short>Offset of hashing table.</short>
 
85
</element>
 
86
 
 
87
<!-- record type Visibility: default -->
 
88
<element name="TMOStringInfo">
 
89
<short>Structure describing string</short>
 
90
<descr>
 
91
This record is one element in the string tables describing the original and
 
92
translated strings. It describes the position and length of the string. The
 
93
location of these tables is stored in the <link id="TMOFileHeader"/> record
 
94
at the start of the file.
 
95
</descr>
 
96
<seealso>
 
97
<link id="TMOFileHeader"/>
 
98
</seealso>
 
99
</element>
 
100
 
 
101
<!-- variable Visibility: default -->
 
102
<element name="TMOStringInfo.length">
 
103
<short>Length of the string</short>
 
104
</element>
 
105
 
 
106
<!-- variable Visibility: default -->
 
107
<element name="TMOStringInfo.offset">
 
108
<short>Offset in the file</short>
 
109
</element>
 
110
 
 
111
<!-- array type Visibility: default -->
 
112
<element name="TMOStringTable">
 
113
<short>Array of <link id="#fcl.gettext.TMOStringInfo">TMOStringInfo</link> records.</short>
 
114
<descr>
 
115
<var>TMOStringTable</var> is an array type containing <link id="TMOStringInfo"/> records.
 
116
It should never be used directly, as it would occupy too much memory.
 
117
</descr>
 
118
<seealso>
 
119
<link id="PMOStringTable"/>
 
120
</seealso>
 
121
</element>
 
122
 
 
123
<!-- pointer type Visibility: default -->
 
124
<element name="PMOStringTable">
 
125
<short>Pointer to a <link id="#fcl.gettext.TMOStringTable">TMOStringTable</link> array.</short>
 
126
</element>
 
127
 
 
128
<!-- array type Visibility: default -->
 
129
<element name="TLongWordArray">
 
130
<short>Array of <var>longword</var> elements.</short>
 
131
<descr>
 
132
<var>TLongWordArray</var> is an array used to define the <link id="PLongWordArray"/> pointer.
 
133
A variable of type <var>TLongWordArray</var> should never be directly
 
134
declared, as it would occupy too much memory.  The <var>PLongWordArray</var> type can be used 
 
135
to allocate a dynamic number of elements.
 
136
</descr>
 
137
<seealso>
 
138
<link id="PLongWordArray"/>
 
139
</seealso>
 
140
</element>
 
141
 
 
142
<!-- pointer type Visibility: default -->
 
143
<element name="PLongWordArray">
 
144
<short>Pointer to a <link id="#fcl.gettext.TLongWordArray">TLongWordArray</link> array.</short>
 
145
</element>
 
146
 
 
147
<!-- array type Visibility: default -->
 
148
<element name="TPCharArray">
 
149
<short>Array of <var>PChar</var> elements</short>
 
150
<descr>
 
151
<var>TLongWordArray</var> is an array used to define the <link id="PPCharArray"/> pointer.
 
152
A variable of type <var>TPCharArray</var> should never be directly declared, as it would 
 
153
occupy too much memory. The <var>PPCharArray</var> type can be used to allocate a dynamic 
 
154
number of elements.
 
155
</descr>
 
156
<seealso>
 
157
<link id="PPCharArray"/>
 
158
</seealso>
 
159
</element>
 
160
 
 
161
<!-- pointer type Visibility: default -->
 
162
<element name="PPCharArray">
 
163
<short>Pointer to a <link id="#fcl.gettext.TPCharArray">TPCharArray</link> array.</short>
 
164
</element>
 
165
 
 
166
<!--
 
167
  ********************************************************************
 
168
    #fcl.gettext.TMOFile
 
169
  ********************************************************************
 
170
-->
 
171
 
 
172
<!-- object Visibility: default -->
 
173
<element name="TMOFile">
 
174
<short>Class providing access to a <file>.mo</file> file.</short>
 
175
<descr>
 
176
<var>TMOFile</var> is a class providing easy access to a <file>.mo</file> file.
 
177
It can be used to translate any of the strings that reside in the
 
178
<file>.mo</file> file. The internal structure of the <file>.mo</file> is
 
179
completely hidden.
 
180
</descr>
 
181
</element>
 
182
 
 
183
<!-- constructor Visibility: public -->
 
184
<element name="TMOFile.Create">
 
185
<short>Create a new instance of the <var>TMOFile</var> class.</short>
 
186
<descr>
 
187
<p>
 
188
<var>Create</var> creates a new instance of the <var>MOFile</var> class. 
 
189
It opens the file <var>AFileName</var> or the stream <var>AStream</var>.
 
190
If a stream is provided, it should be seekable.
 
191
</p>
 
192
<p>
 
193
The whole contents of the file is read into memory during the
 
194
<var>Create</var> call. This means that the stream is no longer 
 
195
needed after the <var>Create</var> call. 
 
196
</p>
 
197
</descr>
 
198
<errors>
 
199
If the named file does not exist, then an exception may be raised. If the
 
200
file does not contain a valid <link id="TMOFileHeader"/> structure, then 
 
201
an <link id="EMOFileError"/> exception is raised.
 
202
</errors>
 
203
<seealso>
 
204
<link id="TMOFile.Destroy"/>
 
205
</seealso>
 
206
</element>
 
207
 
 
208
<!-- argument Visibility: default -->
 
209
<element name="TMOFile.Create.AFilename">
 
210
<short>File to open.</short>
 
211
</element>
 
212
 
 
213
<!-- argument Visibility: default -->
 
214
<element name="TMOFile.Create.AStream">
 
215
<short>Contents of a .mo file.</short>
 
216
</element>
 
217
 
 
218
<!-- destructor Visibility: public -->
 
219
<element name="TMOFile.Destroy">
 
220
<short>Removes the <var>TMOFile</var> instance from memory</short>
 
221
<descr>
 
222
<var>Destroy</var> cleans the internal structures with the contents of the
 
223
<file>.mo</file>. After this the <var>TMOFile</var> instance is removed from
 
224
memory.
 
225
</descr>
 
226
<seealso>
 
227
<link id="TMOFile.Create"/>
 
228
</seealso>
 
229
</element>
 
230
 
 
231
<!-- function Visibility: public -->
 
232
<element name="TMOFile.Translate">
 
233
<short>Translate a string</short>
 
234
<descr>
 
235
<p>
 
236
<var>Translate</var> translates the string <var>AOrig</var>. 
 
237
The string should be in the .mo file as-is. The string can be given as a
 
238
plain string, as a <var>PChar</var> (with length <var>ALen</var>). If the
 
239
hash value (<var>AHash</var>) of the string is not given, it is calculated.
 
240
</p>
 
241
<p>
 
242
If the string is in the <var>.mo</var> file, the translated string is
 
243
returned. If the string is not in the file, an empty string is returned.
 
244
</p>
 
245
</descr>
 
246
<errors>
 
247
None.
 
248
</errors>
 
249
</element>
 
250
 
 
251
<!-- function result Visibility: default -->
 
252
<element name="TMOFile.Translate.Result">
 
253
<short>Translated string.</short>
 
254
</element>
 
255
 
 
256
<!-- argument Visibility: default -->
 
257
<element name="TMOFile.Translate.AOrig">
 
258
<short>String to translate.</short>
 
259
</element>
 
260
 
 
261
<!-- argument Visibility: default -->
 
262
<element name="TMOFile.Translate.ALen">
 
263
<short>Length of the original string.</short>
 
264
</element>
 
265
 
 
266
<!-- argument Visibility: default -->
 
267
<element name="TMOFile.Translate.AHash">
 
268
<short>Hash value of the original string.</short>
 
269
</element>
 
270
 
 
271
<!--
 
272
  ********************************************************************
 
273
    #fcl.gettext.EMOFileError
 
274
  ********************************************************************
 
275
-->
 
276
 
 
277
<!-- object Visibility: default -->
 
278
<element name="EMOFileError">
 
279
<short>Exception raised in case of an error.</short>
 
280
<descr>
 
281
<var>EMOFileError</var> is raised in case an <link id="TMOFile"/> instance
 
282
is created with an invalid <file>.mo</file>.
 
283
</descr>
 
284
<seealso>
 
285
<link id="TMOFile"/>
 
286
</seealso>
 
287
</element>
 
288
 
 
289
<!-- procedure Visibility: default -->
 
290
<element name="GetLanguageIDs">
 
291
<short>Return the current language IDs</short>
 
292
<descr>
 
293
<var>GetLanguageIDs</var> returns the current language IDs (an ISO string) as 
 
294
returned by the operating system. On windows, the <var>GetUserDefaultLCID</var> 
 
295
and <var>GetLocaleInfo</var> calls are  used. On other operating systems,
 
296
the <var>LC_ALL</var>, <var>LC_MESSAGES</var> or <var>LANG</var> environment
 
297
variables are examined.
 
298
</descr>
 
299
</element>
 
300
 
 
301
<!-- argument Visibility: default -->
 
302
<element name="GetLanguageIDs.Lang">
 
303
<short>Primary language</short>
 
304
</element>
 
305
 
 
306
<!-- argument Visibility: default -->
 
307
<element name="GetLanguageIDs.FallbackLang">
 
308
<short>Secondary language</short>
 
309
</element>
 
310
 
 
311
<!-- procedure Visibility: default -->
 
312
<element name="TranslateResourceStrings">
 
313
<short>Translate the resource strings of the application.</short>
 
314
<descr>
 
315
<var>TranslateResourceStrings</var> translates all the resource strings 
 
316
in the application based on the values in the <file>.mo</file> file 
 
317
<var>AFileName</var> or <var>AFile</var>. 
 
318
The procedure creates an <link id="TMOFile"/> instance to
 
319
read the <file>.mo</file> file if a filename is given.
 
320
</descr>
 
321
<errors>
 
322
If the file does not exist or is an invalid <file>.mo</file> file.
 
323
</errors>
 
324
<seealso>
 
325
<link id="TranslateUnitResourceStrings"/>
 
326
<link id="TMOFile"/>
 
327
</seealso>
 
328
</element>
 
329
 
 
330
<!-- argument Visibility: default -->
 
331
<element name="TranslateResourceStrings.AFile">
 
332
<short><var>TMOfile</var> instance with translated strings.</short>
 
333
</element>
 
334
 
 
335
<!-- argument Visibility: default -->
 
336
<element name="TranslateResourceStrings.AFilename">
 
337
<short>Name of <file>.mo</file> file with translated strings</short>
 
338
</element>
 
339
 
 
340
<!-- procedure Visibility: default -->
 
341
<element name="TranslateUnitResourceStrings">
 
342
<short>Translate the resource strings of a unit.</short>
 
343
<descr>
 
344
<var>TranslateUnitResourceStrings</var> is identical in function to
 
345
<link id="TranslateResourceStrings"/>, but translates the strings of a
 
346
single unit (<var>AUnitName</var>) which was used to compile the 
 
347
application. This can be more convenient, since the resource string files
 
348
are created on a unit basis.
 
349
</descr>
 
350
<seealso>
 
351
<link id="TranslateResourceStrings"/>
 
352
<link id="TMOFile"/>
 
353
</seealso>
 
354
</element>
 
355
 
 
356
<!-- argument Visibility: default -->
 
357
<element name="TranslateUnitResourceStrings.AUnitName">
 
358
<short>Name of the unit whose strings should be translated.</short>
 
359
</element>
 
360
 
 
361
<!-- argument Visibility: default -->
 
362
<element name="TranslateUnitResourceStrings.AFile">
 
363
<short><var>TMOFile</var> instance with translated strings.</short>
 
364
</element>
 
365
 
 
366
<!-- argument Visibility: default -->
 
367
<element name="TranslateUnitResourceStrings.AFilename">
 
368
<short>Name of <file>.mo</file> file with translated strings</short>
 
369
</element>
 
370
 
 
371
</module> <!-- gettext -->
 
372
 
 
373
</package>
 
374
</fpdoc-descriptions>