ilib-tools-common 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1132 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>TranslationUnit - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
19
+ </head>
20
+ <body>
21
+
22
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
23
+ <label for="nav-trigger" class="navicon-button x">
24
+ <div class="navicon"></div>
25
+ </label>
26
+
27
+ <label for="nav-trigger" class="overlay"></label>
28
+
29
+ <nav >
30
+
31
+
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Resource.html">Resource</a><ul class='methods'><li data-type='method'><a href="Resource.html#addInstance">addInstance</a></li><li data-type='method'><a href="Resource.html#escapeText">escapeText</a></li><li data-type='method'><a href="Resource.html#getAutoKey">getAutoKey</a></li><li data-type='method'><a href="Resource.html#getComment">getComment</a></li><li data-type='method'><a href="Resource.html#getContext">getContext</a></li><li data-type='method'><a href="Resource.html#getDataType">getDataType</a></li><li data-type='method'><a href="Resource.html#getFlavor">getFlavor</a></li><li data-type='method'><a href="Resource.html#getId">getId</a></li><li data-type='method'><a href="Resource.html#getInstances">getInstances</a></li><li data-type='method'><a href="Resource.html#getKey">getKey</a></li><li data-type='method'><a href="Resource.html#getLocalize">getLocalize</a></li><li data-type='method'><a href="Resource.html#getOrigin">getOrigin</a></li><li data-type='method'><a href="Resource.html#getPath">getPath</a></li><li data-type='method'><a href="Resource.html#getProject">getProject</a></li><li data-type='method'><a href="Resource.html#getSource">getSource</a></li><li data-type='method'><a href="Resource.html#getSourceLocale">getSourceLocale</a></li><li data-type='method'><a href="Resource.html#getState">getState</a></li><li data-type='method'><a href="Resource.html#getTarget">getTarget</a></li><li data-type='method'><a href="Resource.html#getTargetLocale">getTargetLocale</a></li><li data-type='method'><a href="Resource.html#getType">getType</a></li><li data-type='method'><a href="Resource.html#isInstance">isInstance</a></li><li data-type='method'><a href="Resource.html#same">same</a></li><li data-type='method'><a href="Resource.html#setComment">setComment</a></li><li data-type='method'><a href="Resource.html#setProject">setProject</a></li><li data-type='method'><a href="Resource.html#setSourceLocale">setSourceLocale</a></li><li data-type='method'><a href="Resource.html#setState">setState</a></li><li data-type='method'><a href="Resource.html#setTargetLocale">setTargetLocale</a></li></ul></li><li><a href="ResourceArray.html">ResourceArray</a><ul class='methods'><li data-type='method'><a href="ResourceArray.html#addInstance">addInstance</a></li><li data-type='method'><a href="ResourceArray.html#addSourceItem">addSourceItem</a></li><li data-type='method'><a href="ResourceArray.html#addTargetItem">addTargetItem</a></li><li data-type='method'><a href="ResourceArray.html#cleanHashKey">cleanHashKey</a></li><li data-type='method'><a href="ResourceArray.html#cleanHashKeyForTranslation">cleanHashKeyForTranslation</a></li><li data-type='method'><a href="ResourceArray.html#clone">clone</a></li><li data-type='method'><a href="ResourceArray.html#equals">equals</a></li><li data-type='method'><a href="ResourceArray.html#equals">equals</a></li><li data-type='method'><a href="ResourceArray.html#escapeText">escapeText</a></li><li data-type='method'><a href="ResourceArray.html#getAutoKey">getAutoKey</a></li><li data-type='method'><a href="ResourceArray.html#getComment">getComment</a></li><li data-type='method'><a href="ResourceArray.html#getContext">getContext</a></li><li data-type='method'><a href="ResourceArray.html#getDataType">getDataType</a></li><li data-type='method'><a href="ResourceArray.html#getFlavor">getFlavor</a></li><li data-type='method'><a href="ResourceArray.html#getId">getId</a></li><li data-type='method'><a href="ResourceArray.html#getInstances">getInstances</a></li><li data-type='method'><a href="ResourceArray.html#getKey">getKey</a></li><li data-type='method'><a href="ResourceArray.html#getLocalize">getLocalize</a></li><li data-type='method'><a href="ResourceArray.html#getOrigin">getOrigin</a></li><li data-type='method'><a href="ResourceArray.html#getPath">getPath</a></li><li data-type='method'><a href="ResourceArray.html#getProject">getProject</a></li><li data-type='method'><a href="ResourceArray.html#getSource">getSource</a></li><li data-type='method'><a href="ResourceArray.html#getSourceArray">getSourceArray</a></li><li data-type='method'><a href="ResourceArray.html#getSourceItem">getSourceItem</a></li><li data-type='method'><a href="ResourceArray.html#getSourceLocale">getSourceLocale</a></li><li data-type='method'><a href="ResourceArray.html#getState">getState</a></li><li data-type='method'><a href="ResourceArray.html#getTarget">getTarget</a></li><li data-type='method'><a href="ResourceArray.html#getTargetArray">getTargetArray</a></li><li data-type='method'><a href="ResourceArray.html#getTargetItem">getTargetItem</a></li><li data-type='method'><a href="ResourceArray.html#getTargetLocale">getTargetLocale</a></li><li data-type='method'><a href="ResourceArray.html#getType">getType</a></li><li data-type='method'><a href="ResourceArray.html#hashKey">hashKey</a></li><li data-type='method'><a href="ResourceArray.html#hashKeyForTranslation">hashKeyForTranslation</a></li><li data-type='method'><a href="ResourceArray.html#isInstance">isInstance</a></li><li data-type='method'><a href="ResourceArray.html#same">same</a></li><li data-type='method'><a href="ResourceArray.html#setComment">setComment</a></li><li data-type='method'><a href="ResourceArray.html#setProject">setProject</a></li><li data-type='method'><a href="ResourceArray.html#setSource">setSource</a></li><li data-type='method'><a href="ResourceArray.html#setSourceLocale">setSourceLocale</a></li><li data-type='method'><a href="ResourceArray.html#setState">setState</a></li><li data-type='method'><a href="ResourceArray.html#setTarget">setTarget</a></li><li data-type='method'><a href="ResourceArray.html#setTargetLocale">setTargetLocale</a></li><li data-type='method'><a href="ResourceArray.html#size">size</a></li><li data-type='method'><a href="ResourceArray.html#.hashKey">hashKey</a></li></ul></li><li><a href="ResourcePlural.html">ResourcePlural</a><ul class='methods'><li data-type='method'><a href="ResourcePlural.html#addInstance">addInstance</a></li><li data-type='method'><a href="ResourcePlural.html#addSourcePlural">addSourcePlural</a></li><li data-type='method'><a href="ResourcePlural.html#addTargetPlural">addTargetPlural</a></li><li data-type='method'><a href="ResourcePlural.html#cleanHashKey">cleanHashKey</a></li><li data-type='method'><a href="ResourcePlural.html#cleanHashKeyForTranslation">cleanHashKeyForTranslation</a></li><li data-type='method'><a href="ResourcePlural.html#clone">clone</a></li><li data-type='method'><a href="ResourcePlural.html#equals">equals</a></li><li data-type='method'><a href="ResourcePlural.html#escapeText">escapeText</a></li><li data-type='method'><a href="ResourcePlural.html#getAllValidCategories">getAllValidCategories</a></li><li data-type='method'><a href="ResourcePlural.html#getAutoKey">getAutoKey</a></li><li data-type='method'><a href="ResourcePlural.html#getCategories">getCategories</a></li><li data-type='method'><a href="ResourcePlural.html#getClasses">getClasses</a></li><li data-type='method'><a href="ResourcePlural.html#getComment">getComment</a></li><li data-type='method'><a href="ResourcePlural.html#getContext">getContext</a></li><li data-type='method'><a href="ResourcePlural.html#getDataType">getDataType</a></li><li data-type='method'><a href="ResourcePlural.html#getFlavor">getFlavor</a></li><li data-type='method'><a href="ResourcePlural.html#getId">getId</a></li><li data-type='method'><a href="ResourcePlural.html#getInstances">getInstances</a></li><li data-type='method'><a href="ResourcePlural.html#getKey">getKey</a></li><li data-type='method'><a href="ResourcePlural.html#getLocalize">getLocalize</a></li><li data-type='method'><a href="ResourcePlural.html#getOrigin">getOrigin</a></li><li data-type='method'><a href="ResourcePlural.html#getPath">getPath</a></li><li data-type='method'><a href="ResourcePlural.html#getProject">getProject</a></li><li data-type='method'><a href="ResourcePlural.html#getSource">getSource</a></li><li data-type='method'><a href="ResourcePlural.html#getSourceLocale">getSourceLocale</a></li><li data-type='method'><a href="ResourcePlural.html#getSourcePlural">getSourcePlural</a></li><li data-type='method'><a href="ResourcePlural.html#getSourcePlurals">getSourcePlurals</a></li><li data-type='method'><a href="ResourcePlural.html#getSourceStrings">getSourceStrings</a></li><li data-type='method'><a href="ResourcePlural.html#getState">getState</a></li><li data-type='method'><a href="ResourcePlural.html#getTarget">getTarget</a></li><li data-type='method'><a href="ResourcePlural.html#getTargetLocale">getTargetLocale</a></li><li data-type='method'><a href="ResourcePlural.html#getTargetPlural">getTargetPlural</a></li><li data-type='method'><a href="ResourcePlural.html#getTargetPlurals">getTargetPlurals</a></li><li data-type='method'><a href="ResourcePlural.html#getTargetStrings">getTargetStrings</a></li><li data-type='method'><a href="ResourcePlural.html#getType">getType</a></li><li data-type='method'><a href="ResourcePlural.html#hashKey">hashKey</a></li><li data-type='method'><a href="ResourcePlural.html#hashKeyForTranslation">hashKeyForTranslation</a></li><li data-type='method'><a href="ResourcePlural.html#isInstance">isInstance</a></li><li data-type='method'><a href="ResourcePlural.html#same">same</a></li><li data-type='method'><a href="ResourcePlural.html#setComment">setComment</a></li><li data-type='method'><a href="ResourcePlural.html#setProject">setProject</a></li><li data-type='method'><a href="ResourcePlural.html#setSource">setSource</a></li><li data-type='method'><a href="ResourcePlural.html#setSourceLocale">setSourceLocale</a></li><li data-type='method'><a href="ResourcePlural.html#setState">setState</a></li><li data-type='method'><a href="ResourcePlural.html#setTarget">setTarget</a></li><li data-type='method'><a href="ResourcePlural.html#setTargetLocale">setTargetLocale</a></li><li data-type='method'><a href="ResourcePlural.html#size">size</a></li><li data-type='method'><a href="ResourcePlural.html#.hashKey">hashKey</a></li></ul></li><li><a href="ResourceString.html">ResourceString</a><ul class='methods'><li data-type='method'><a href="ResourceString.html#addInstance">addInstance</a></li><li data-type='method'><a href="ResourceString.html#cleanHashKey">cleanHashKey</a></li><li data-type='method'><a href="ResourceString.html#cleanHashKeyForTranslation">cleanHashKeyForTranslation</a></li><li data-type='method'><a href="ResourceString.html#clone">clone</a></li><li data-type='method'><a href="ResourceString.html#equals">equals</a></li><li data-type='method'><a href="ResourceString.html#escapeText">escapeText</a></li><li data-type='method'><a href="ResourceString.html#getAutoKey">getAutoKey</a></li><li data-type='method'><a href="ResourceString.html#getComment">getComment</a></li><li data-type='method'><a href="ResourceString.html#getContext">getContext</a></li><li data-type='method'><a href="ResourceString.html#getDataType">getDataType</a></li><li data-type='method'><a href="ResourceString.html#getFlavor">getFlavor</a></li><li data-type='method'><a href="ResourceString.html#getId">getId</a></li><li data-type='method'><a href="ResourceString.html#getInstances">getInstances</a></li><li data-type='method'><a href="ResourceString.html#getKey">getKey</a></li><li data-type='method'><a href="ResourceString.html#getLocalize">getLocalize</a></li><li data-type='method'><a href="ResourceString.html#getOrigin">getOrigin</a></li><li data-type='method'><a href="ResourceString.html#getPath">getPath</a></li><li data-type='method'><a href="ResourceString.html#getProject">getProject</a></li><li data-type='method'><a href="ResourceString.html#getSource">getSource</a></li><li data-type='method'><a href="ResourceString.html#getSourceLocale">getSourceLocale</a></li><li data-type='method'><a href="ResourceString.html#getState">getState</a></li><li data-type='method'><a href="ResourceString.html#getTarget">getTarget</a></li><li data-type='method'><a href="ResourceString.html#getTargetLocale">getTargetLocale</a></li><li data-type='method'><a href="ResourceString.html#getType">getType</a></li><li data-type='method'><a href="ResourceString.html#hashKey">hashKey</a></li><li data-type='method'><a href="ResourceString.html#hashKeyForTranslation">hashKeyForTranslation</a></li><li data-type='method'><a href="ResourceString.html#isInstance">isInstance</a></li><li data-type='method'><a href="ResourceString.html#same">same</a></li><li data-type='method'><a href="ResourceString.html#setComment">setComment</a></li><li data-type='method'><a href="ResourceString.html#setProject">setProject</a></li><li data-type='method'><a href="ResourceString.html#setSource">setSource</a></li><li data-type='method'><a href="ResourceString.html#setSourceLocale">setSourceLocale</a></li><li data-type='method'><a href="ResourceString.html#setState">setState</a></li><li data-type='method'><a href="ResourceString.html#setTarget">setTarget</a></li><li data-type='method'><a href="ResourceString.html#setTargetLocale">setTargetLocale</a></li><li data-type='method'><a href="ResourceString.html#size">size</a></li><li data-type='method'><a href="ResourceString.html#.cleanHashKey">cleanHashKey</a></li><li data-type='method'><a href="ResourceString.html#.hashKey">hashKey</a></li></ul></li><li><a href="ResourceXliff.html">ResourceXliff</a></li><li><a href="TranslationSet.html">TranslationSet</a><ul class='methods'><li data-type='method'><a href="TranslationSet.html#add">add</a></li><li data-type='method'><a href="TranslationSet.html#addAll">addAll</a></li><li data-type='method'><a href="TranslationSet.html#addSet">addSet</a></li><li data-type='method'><a href="TranslationSet.html#clear">clear</a></li><li data-type='method'><a href="TranslationSet.html#diff">diff</a></li><li data-type='method'><a href="TranslationSet.html#get">get</a></li><li data-type='method'><a href="TranslationSet.html#getAll">getAll</a></li><li data-type='method'><a href="TranslationSet.html#getBy">getBy</a></li><li data-type='method'><a href="TranslationSet.html#getBySource">getBySource</a></li><li data-type='method'><a href="TranslationSet.html#getClean">getClean</a></li><li data-type='method'><a href="TranslationSet.html#getContexts">getContexts</a></li><li data-type='method'><a href="TranslationSet.html#getLocales">getLocales</a></li><li data-type='method'><a href="TranslationSet.html#getProjects">getProjects</a></li><li data-type='method'><a href="TranslationSet.html#isDirty">isDirty</a></li><li data-type='method'><a href="TranslationSet.html#remove">remove</a></li><li data-type='method'><a href="TranslationSet.html#setClean">setClean</a></li><li data-type='method'><a href="TranslationSet.html#size">size</a></li></ul></li><li><a href="TranslationUnit.html">TranslationUnit</a><ul class='methods'><li data-type='method'><a href="TranslationUnit.html#addProperties">addProperties</a></li><li data-type='method'><a href="TranslationUnit.html#addVariant">addVariant</a></li><li data-type='method'><a href="TranslationUnit.html#addVariants">addVariants</a></li><li data-type='method'><a href="TranslationUnit.html#clone">clone</a></li><li data-type='method'><a href="TranslationUnit.html#getProperties">getProperties</a></li><li data-type='method'><a href="TranslationUnit.html#getVariants">getVariants</a></li><li data-type='method'><a href="TranslationUnit.html#hashKey">hashKey</a></li></ul></li><li><a href="TranslationVariant.html">TranslationVariant</a><ul class='methods'><li data-type='method'><a href="TranslationVariant.html#hashKey">hashKey</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#cleanString">cleanString</a></li><li><a href="global.html#containsActualText">containsActualText</a></li><li><a href="global.html#formatPath">formatPath</a></li><li><a href="global.html#getLocaleFromPath">getLocaleFromPath</a></li><li><a href="global.html#hashKey">hashKey</a></li><li><a href="global.html#isEmpty">isEmpty</a></li><li><a href="global.html#objectMap">objectMap</a></li></ul>
33
+
34
+ </nav>
35
+
36
+ <div id="main">
37
+
38
+ <h1 class="page-title">TranslationUnit</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+
48
+ <header>
49
+
50
+ <h2>
51
+
52
+ TranslationUnit
53
+
54
+ </h2>
55
+
56
+ <div class="class-description usertext">Represent a translation unit. A translation unit is
57
+ a segment in the source language, along with one or
58
+ more variants, which are translations to various
59
+ target languages. A translation unit may contain more
60
+ than one translation for a particular locale, as there
61
+ are sometimes more than one translation for a particular
62
+ phrase in the source language, depending on the context.</div>
63
+
64
+
65
+ </header>
66
+
67
+ <article>
68
+
69
+ <div class="container-overview">
70
+
71
+
72
+
73
+
74
+ <h2>Constructor</h2>
75
+
76
+
77
+ <h4 class="name" id="TranslationUnit"><span class="type-signature"></span>new TranslationUnit<span class="signature">(options)</span><span class="type-signature"></span></h4>
78
+
79
+
80
+
81
+
82
+
83
+
84
+ <dl class="details">
85
+
86
+ <dt class="tag-description">Description:</dt>
87
+ <dd class="tag-description"><ul class="dummy"><li>Create a new translation unit.
88
+
89
+ The options may be undefined, which represents
90
+ a new, clean TranslationUnit instance. The options object may also
91
+ be an object with the following properties:
92
+
93
+ <ul>
94
+ <li><i>source</i> - source text for this unit (required)
95
+ <li><i>sourceLocale</i> - the source locale spec for this unit (required)
96
+ <li><i>target</i> - target text for this unit (optional)
97
+ <li><i>targetLocale</i> - the target locale spec for this unit (optional)
98
+ <li><i>key</i> - the unique resource key for this translation unit (required)
99
+ <li><i>file</i> - path to the original source code file that contains the
100
+ source text of this translation unit (required)
101
+ <li><i>project</i> - the project that this string/unit is part of
102
+ <li><i>resType</i> - type of this resource (string, array, plural) (optional)
103
+ <li><i>state</i> - the state of the current unit (optional)
104
+ <li><i>comment</i> - the translator's comment for this unit (optional)
105
+ <li><i>datatype</i> - the source of the data of this unit (optional)
106
+ <li><i>flavor</i> - the flavor that this string comes from(optional)
107
+ </ul>
108
+
109
+ If the required properties are not given, the constructor throws an exception.<p>
110
+
111
+ For newly extracted strings, there is no target text yet. There must be a target
112
+ locale for the translators to use when creating new target text, however. This
113
+ means that there may be multiple translation units in a file with the same
114
+ source locale and no target text, but different target locales.</li></ul></dd>
115
+
116
+
117
+
118
+ <dt class="tag-source">Source:</dt>
119
+ <dd class="tag-source"><ul class="dummy"><li>
120
+ <a href="TranslationUnit.js.html">TranslationUnit.js</a>, <a href="TranslationUnit.js.html#line35">line 35</a>
121
+ </li></ul></dd>
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
+ </dl>
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <h5 class="h5-parameters">Parameters:</h5>
168
+
169
+
170
+ <table class="params">
171
+ <thead>
172
+ <tr>
173
+
174
+ <th>Name</th>
175
+
176
+
177
+ <th>Type</th>
178
+
179
+
180
+
181
+
182
+
183
+ <th class="last">Description</th>
184
+ </tr>
185
+ </thead>
186
+
187
+ <tbody>
188
+
189
+
190
+ <tr>
191
+
192
+ <td class="name"><code>options</code></td>
193
+
194
+
195
+ <td class="type">
196
+
197
+
198
+ <span class="param-type">Object</span>
199
+
200
+
201
+
202
+
203
+ </td>
204
+
205
+
206
+
207
+
208
+
209
+ <td class="description last">options for this unit</td>
210
+ </tr>
211
+
212
+
213
+ </tbody>
214
+ </table>
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+ </div>
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+ <h3 class="subsection-title">Methods</h3>
254
+
255
+
256
+
257
+
258
+
259
+
260
+ <h4 class="name" id="addProperties"><span class="type-signature"></span>addProperties<span class="signature">(properties)</span><span class="type-signature"></span></h4>
261
+
262
+
263
+
264
+
265
+
266
+
267
+ <dl class="details">
268
+
269
+ <dt class="tag-description">Description:</dt>
270
+ <dd class="tag-description"><ul class="dummy"><li>Add a property to this translation unit.</li></ul></dd>
271
+
272
+
273
+
274
+ <dt class="tag-source">Source:</dt>
275
+ <dd class="tag-source"><ul class="dummy"><li>
276
+ <a href="TranslationUnit.js.html">TranslationUnit.js</a>, <a href="TranslationUnit.js.html#line169">line 169</a>
277
+ </li></ul></dd>
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+ </dl>
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+ <h5 class="h5-parameters">Parameters:</h5>
324
+
325
+
326
+ <table class="params">
327
+ <thead>
328
+ <tr>
329
+
330
+ <th>Name</th>
331
+
332
+
333
+ <th>Type</th>
334
+
335
+
336
+
337
+
338
+
339
+ <th class="last">Description</th>
340
+ </tr>
341
+ </thead>
342
+
343
+ <tbody>
344
+
345
+
346
+ <tr>
347
+
348
+ <td class="name"><code>properties</code></td>
349
+
350
+
351
+ <td class="type">
352
+
353
+
354
+ <span class="param-type">Object</span>
355
+
356
+
357
+
358
+
359
+ </td>
360
+
361
+
362
+
363
+
364
+
365
+ <td class="description last">an object that maps properties to values</td>
366
+ </tr>
367
+
368
+
369
+ </tbody>
370
+ </table>
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+ <h4 class="name" id="addVariant"><span class="type-signature"></span>addVariant<span class="signature">(variant)</span><span class="type-signature"></span></h4>
396
+
397
+
398
+
399
+
400
+
401
+
402
+ <dl class="details">
403
+
404
+ <dt class="tag-description">Description:</dt>
405
+ <dd class="tag-description"><ul class="dummy"><li>Add a single variant to this translation unit. This variant
406
+ is only added if it is unique in this translation unit. That is,
407
+ No other variant exists in this unit with the same locale and
408
+ string.</li></ul></dd>
409
+
410
+
411
+
412
+ <dt class="tag-source">Source:</dt>
413
+ <dd class="tag-source"><ul class="dummy"><li>
414
+ <a href="TranslationUnit.js.html">TranslationUnit.js</a>, <a href="TranslationUnit.js.html#line135">line 135</a>
415
+ </li></ul></dd>
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+ </dl>
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+ <h5 class="h5-parameters">Parameters:</h5>
462
+
463
+
464
+ <table class="params">
465
+ <thead>
466
+ <tr>
467
+
468
+ <th>Name</th>
469
+
470
+
471
+ <th>Type</th>
472
+
473
+
474
+
475
+
476
+
477
+ <th class="last">Description</th>
478
+ </tr>
479
+ </thead>
480
+
481
+ <tbody>
482
+
483
+
484
+ <tr>
485
+
486
+ <td class="name"><code>variant</code></td>
487
+
488
+
489
+ <td class="type">
490
+
491
+
492
+ <span class="param-type"><a href="TranslationVariant.html">TranslationVariant</a></span>
493
+
494
+
495
+
496
+
497
+ </td>
498
+
499
+
500
+
501
+
502
+
503
+ <td class="description last">the variant to add</td>
504
+ </tr>
505
+
506
+
507
+ </tbody>
508
+ </table>
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+ <h4 class="name" id="addVariants"><span class="type-signature"></span>addVariants<span class="signature">(variants)</span><span class="type-signature"></span></h4>
534
+
535
+
536
+
537
+
538
+
539
+
540
+ <dl class="details">
541
+
542
+ <dt class="tag-description">Description:</dt>
543
+ <dd class="tag-description"><ul class="dummy"><li>Add an array of variants to this translation unit. This only
544
+ adds a variant if it is unique. That is, the unit is not
545
+ added if the locale and string are the same as an existing
546
+ variant.</li></ul></dd>
547
+
548
+
549
+
550
+ <dt class="tag-source">Source:</dt>
551
+ <dd class="tag-source"><ul class="dummy"><li>
552
+ <a href="TranslationUnit.js.html">TranslationUnit.js</a>, <a href="TranslationUnit.js.html#line151">line 151</a>
553
+ </li></ul></dd>
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+
568
+
569
+
570
+
571
+
572
+
573
+
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+ </dl>
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+ <h5 class="h5-parameters">Parameters:</h5>
600
+
601
+
602
+ <table class="params">
603
+ <thead>
604
+ <tr>
605
+
606
+ <th>Name</th>
607
+
608
+
609
+ <th>Type</th>
610
+
611
+
612
+
613
+
614
+
615
+ <th class="last">Description</th>
616
+ </tr>
617
+ </thead>
618
+
619
+ <tbody>
620
+
621
+
622
+ <tr>
623
+
624
+ <td class="name"><code>variants</code></td>
625
+
626
+
627
+ <td class="type">
628
+
629
+
630
+ <span class="param-type">Array.&lt;<a href="TranslationVariant.html">TranslationVariant</a>></span>
631
+
632
+
633
+
634
+
635
+ </td>
636
+
637
+
638
+
639
+
640
+
641
+ <td class="description last">the array of variants to add</td>
642
+ </tr>
643
+
644
+
645
+ </tbody>
646
+ </table>
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+
670
+
671
+ <h4 class="name" id="clone"><span class="type-signature"></span>clone<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="TranslationUnit.html">TranslationUnit</a>}</span></h4>
672
+
673
+
674
+
675
+
676
+
677
+
678
+ <dl class="details">
679
+
680
+ <dt class="tag-description">Description:</dt>
681
+ <dd class="tag-description"><ul class="dummy"><li>Clone the current unit and return the clone.</li></ul></dd>
682
+
683
+
684
+
685
+ <dt class="tag-source">Source:</dt>
686
+ <dd class="tag-source"><ul class="dummy"><li>
687
+ <a href="TranslationUnit.js.html">TranslationUnit.js</a>, <a href="TranslationUnit.js.html#line102">line 102</a>
688
+ </li></ul></dd>
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
708
+
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+
717
+
718
+
719
+
720
+ </dl>
721
+
722
+
723
+
724
+
725
+
726
+
727
+
728
+
729
+
730
+
731
+
732
+
733
+
734
+
735
+
736
+
737
+
738
+
739
+
740
+
741
+
742
+
743
+
744
+
745
+
746
+
747
+
748
+ <h5 class="h5-returns">Returns:</h5>
749
+
750
+
751
+ <div class="param-desc">
752
+ a clone of the current unit.
753
+ </div>
754
+
755
+
756
+
757
+ <dl class="param-type">
758
+ <dt>
759
+ Type
760
+ </dt>
761
+ <dd>
762
+
763
+ <span class="param-type"><a href="TranslationUnit.html">TranslationUnit</a></span>
764
+
765
+
766
+
767
+ </dd>
768
+ </dl>
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
+
778
+
779
+ <h4 class="name" id="getProperties"><span class="type-signature"></span>getProperties<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>
780
+
781
+
782
+
783
+
784
+
785
+
786
+ <dl class="details">
787
+
788
+ <dt class="tag-description">Description:</dt>
789
+ <dd class="tag-description"><ul class="dummy"><li>Return the list of properties and their values for this translation unit.</li></ul></dd>
790
+
791
+
792
+
793
+ <dt class="tag-source">Source:</dt>
794
+ <dd class="tag-source"><ul class="dummy"><li>
795
+ <a href="TranslationUnit.js.html">TranslationUnit.js</a>, <a href="TranslationUnit.js.html#line161">line 161</a>
796
+ </li></ul></dd>
797
+
798
+
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+
807
+
808
+
809
+
810
+
811
+
812
+
813
+
814
+
815
+
816
+
817
+
818
+
819
+
820
+
821
+
822
+
823
+
824
+
825
+
826
+
827
+
828
+ </dl>
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+
838
+
839
+
840
+
841
+
842
+
843
+
844
+
845
+
846
+
847
+
848
+
849
+
850
+
851
+
852
+
853
+
854
+
855
+
856
+ <h5 class="h5-returns">Returns:</h5>
857
+
858
+
859
+ <div class="param-desc">
860
+ an object mapping properties to values
861
+ </div>
862
+
863
+
864
+
865
+ <dl class="param-type">
866
+ <dt>
867
+ Type
868
+ </dt>
869
+ <dd>
870
+
871
+ <span class="param-type">Object</span>
872
+
873
+
874
+
875
+ </dd>
876
+ </dl>
877
+
878
+
879
+
880
+
881
+
882
+
883
+
884
+
885
+
886
+
887
+ <h4 class="name" id="getVariants"><span class="type-signature"></span>getVariants<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;<a href="TranslationVariant.html">TranslationVariant</a>>}</span></h4>
888
+
889
+
890
+
891
+
892
+
893
+
894
+ <dl class="details">
895
+
896
+ <dt class="tag-description">Description:</dt>
897
+ <dd class="tag-description"><ul class="dummy"><li>Return the list of variants for this translation unit.</li></ul></dd>
898
+
899
+
900
+
901
+ <dt class="tag-source">Source:</dt>
902
+ <dd class="tag-source"><ul class="dummy"><li>
903
+ <a href="TranslationUnit.js.html">TranslationUnit.js</a>, <a href="TranslationUnit.js.html#line123">line 123</a>
904
+ </li></ul></dd>
905
+
906
+
907
+
908
+
909
+
910
+
911
+
912
+
913
+
914
+
915
+
916
+
917
+
918
+
919
+
920
+
921
+
922
+
923
+
924
+
925
+
926
+
927
+
928
+
929
+
930
+
931
+
932
+
933
+
934
+
935
+
936
+ </dl>
937
+
938
+
939
+
940
+
941
+
942
+
943
+
944
+
945
+
946
+
947
+
948
+
949
+
950
+
951
+
952
+
953
+
954
+
955
+
956
+
957
+
958
+
959
+
960
+
961
+
962
+
963
+
964
+ <h5 class="h5-returns">Returns:</h5>
965
+
966
+
967
+ <div class="param-desc">
968
+ the variants for
969
+ this translation unit
970
+ </div>
971
+
972
+
973
+
974
+ <dl class="param-type">
975
+ <dt>
976
+ Type
977
+ </dt>
978
+ <dd>
979
+
980
+ <span class="param-type">Array.&lt;<a href="TranslationVariant.html">TranslationVariant</a>></span>
981
+
982
+
983
+
984
+ </dd>
985
+ </dl>
986
+
987
+
988
+
989
+
990
+
991
+
992
+
993
+
994
+
995
+
996
+ <h4 class="name" id="hashKey"><span class="type-signature"></span>hashKey<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
997
+
998
+
999
+
1000
+
1001
+
1002
+
1003
+ <dl class="details">
1004
+
1005
+ <dt class="tag-description">Description:</dt>
1006
+ <dd class="tag-description"><ul class="dummy"><li>Return a unique hash key for this translation unit. The
1007
+ hash key is calculated from the source string and locale
1008
+ and does not depend on the properties or variants in
1009
+ the unit.</li></ul></dd>
1010
+
1011
+
1012
+
1013
+ <dt class="tag-source">Source:</dt>
1014
+ <dd class="tag-source"><ul class="dummy"><li>
1015
+ <a href="TranslationUnit.js.html">TranslationUnit.js</a>, <a href="TranslationUnit.js.html#line114">line 114</a>
1016
+ </li></ul></dd>
1017
+
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+ </dl>
1049
+
1050
+
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+
1066
+
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+
1074
+
1075
+
1076
+ <h5 class="h5-returns">Returns:</h5>
1077
+
1078
+
1079
+ <div class="param-desc">
1080
+ the unique hash key
1081
+ </div>
1082
+
1083
+
1084
+
1085
+ <dl class="param-type">
1086
+ <dt>
1087
+ Type
1088
+ </dt>
1089
+ <dd>
1090
+
1091
+ <span class="param-type">string</span>
1092
+
1093
+
1094
+
1095
+ </dd>
1096
+ </dl>
1097
+
1098
+
1099
+
1100
+
1101
+
1102
+
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+ </article>
1109
+
1110
+ </section>
1111
+
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+ </div>
1118
+
1119
+ <br class="clear">
1120
+
1121
+ <footer>
1122
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Tue Jan 24 2023 22:21:49 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1123
+ </footer>
1124
+
1125
+ <script>prettyPrint();</script>
1126
+ <script src="scripts/polyfill.js"></script>
1127
+ <script src="scripts/linenumber.js"></script>
1128
+
1129
+
1130
+
1131
+ </body>
1132
+ </html>