@esgettext/tools 1.0.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.
- package/LICENSE +19 -0
- package/README.md +126 -0
- package/bin/esgettext-install.js +5 -0
- package/bin/esgettext-mo2json.js +5 -0
- package/bin/esgettext-msgfmt-all.js +5 -0
- package/bin/esgettext-msgmerge-all.js +5 -0
- package/bin/esgettext-xgettext.js +5 -0
- package/dist/cli/getopt.d.ts +34 -0
- package/dist/cli/getopt.js +150 -0
- package/dist/cli/getopt.js.map +1 -0
- package/dist/cli/getopt.spec.d.ts +1 -0
- package/dist/cli/getopt.spec.js +164 -0
- package/dist/cli/getopt.spec.js.map +1 -0
- package/dist/cli/install.d.ts +1 -0
- package/dist/cli/install.js +91 -0
- package/dist/cli/install.js.map +1 -0
- package/dist/cli/mo2json-cli.d.ts +1 -0
- package/dist/cli/mo2json-cli.js +48 -0
- package/dist/cli/mo2json-cli.js.map +1 -0
- package/dist/cli/msgfmt-all.d.ts +1 -0
- package/dist/cli/msgfmt-all.js +99 -0
- package/dist/cli/msgfmt-all.js.map +1 -0
- package/dist/cli/msgmerge-all.d.ts +1 -0
- package/dist/cli/msgmerge-all.js +85 -0
- package/dist/cli/msgmerge-all.js.map +1 -0
- package/dist/cli/xgettext-cli.d.ts +1 -0
- package/dist/cli/xgettext-cli.js +303 -0
- package/dist/cli/xgettext-cli.js.map +1 -0
- package/dist/install/install.d.ts +10 -0
- package/dist/install/install.js +157 -0
- package/dist/install/install.js.map +1 -0
- package/dist/msgfmt-all/msgfmt-all.d.ts +8 -0
- package/dist/msgfmt-all/msgfmt-all.js +142 -0
- package/dist/msgfmt-all/msgfmt-all.js.map +1 -0
- package/dist/msgmerge-all/msgmerge-all.d.ts +9 -0
- package/dist/msgmerge-all/msgmerge-all.js +157 -0
- package/dist/msgmerge-all/msgmerge-all.js.map +1 -0
- package/dist/package.d.ts +4 -0
- package/dist/package.js +17 -0
- package/dist/package.js.map +1 -0
- package/dist/parser/__snapshots__/javascript.spec.js.snap +56 -0
- package/dist/parser/__snapshots__/po.spec.js.snap +176 -0
- package/dist/parser/javascript.d.ts +4 -0
- package/dist/parser/javascript.js +47 -0
- package/dist/parser/javascript.js.map +1 -0
- package/dist/parser/javascript.spec.d.ts +1 -0
- package/dist/parser/javascript.spec.js +436 -0
- package/dist/parser/javascript.spec.js.map +1 -0
- package/dist/parser/parser.d.ts +45 -0
- package/dist/parser/parser.js +582 -0
- package/dist/parser/parser.js.map +1 -0
- package/dist/parser/po.d.ts +22 -0
- package/dist/parser/po.js +394 -0
- package/dist/parser/po.js.map +1 -0
- package/dist/parser/po.spec.d.ts +1 -0
- package/dist/parser/po.spec.js +296 -0
- package/dist/parser/po.spec.js.map +1 -0
- package/dist/parser/typescript.d.ts +4 -0
- package/dist/parser/typescript.js +47 -0
- package/dist/parser/typescript.js.map +1 -0
- package/dist/parser/typescript.spec.d.ts +1 -0
- package/dist/parser/typescript.spec.js +106 -0
- package/dist/parser/typescript.spec.js.map +1 -0
- package/dist/pot/__snapshots__/catalog.spec.js.snap +591 -0
- package/dist/pot/catalog.d.ts +26 -0
- package/dist/pot/catalog.js +210 -0
- package/dist/pot/catalog.js.map +1 -0
- package/dist/pot/catalog.spec.d.ts +1 -0
- package/dist/pot/catalog.spec.js +240 -0
- package/dist/pot/catalog.spec.js.map +1 -0
- package/dist/pot/entry.d.ts +35 -0
- package/dist/pot/entry.js +322 -0
- package/dist/pot/entry.js.map +1 -0
- package/dist/pot/entry.spec.d.ts +1 -0
- package/dist/pot/entry.spec.js +317 -0
- package/dist/pot/entry.spec.js.map +1 -0
- package/dist/pot/keyword.d.ts +17 -0
- package/dist/pot/keyword.js +181 -0
- package/dist/pot/keyword.js.map +1 -0
- package/dist/pot/keyword.spec.d.ts +1 -0
- package/dist/pot/keyword.spec.js +54 -0
- package/dist/pot/keyword.spec.js.map +1 -0
- package/dist/xgettext/__snapshots__/xgettext.spec.js.snap +462 -0
- package/dist/xgettext/file-resolver.d.ts +5 -0
- package/dist/xgettext/file-resolver.js +23 -0
- package/dist/xgettext/file-resolver.js.map +1 -0
- package/dist/xgettext/file-resolver.spec.d.ts +1 -0
- package/dist/xgettext/file-resolver.spec.js +22 -0
- package/dist/xgettext/file-resolver.spec.js.map +1 -0
- package/dist/xgettext/files-collector.d.ts +5 -0
- package/dist/xgettext/files-collector.js +41 -0
- package/dist/xgettext/files-collector.js.map +1 -0
- package/dist/xgettext/files-collector.spec.d.ts +1 -0
- package/dist/xgettext/files-collector.spec.js +78 -0
- package/dist/xgettext/files-collector.spec.js.map +1 -0
- package/dist/xgettext/xgettext.d.ts +16 -0
- package/dist/xgettext/xgettext.js +335 -0
- package/dist/xgettext/xgettext.js.map +1 -0
- package/dist/xgettext/xgettext.spec.d.ts +1 -0
- package/dist/xgettext/xgettext.spec.js +743 -0
- package/dist/xgettext/xgettext.spec.js.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POTEntry = void 0;
|
|
4
|
+
var runtime_1 = require("@esgettext/runtime");
|
|
5
|
+
var gtx = runtime_1.Textdomain.getInstance('tools');
|
|
6
|
+
var POTEntry = (function () {
|
|
7
|
+
function POTEntry(properties) {
|
|
8
|
+
this.properties = properties;
|
|
9
|
+
if (/[\u0000-\u0006\u000e-\u001f]/.exec(properties.msgid)) {
|
|
10
|
+
throw new Error(gtx._('msgid must not contain control characters.'));
|
|
11
|
+
}
|
|
12
|
+
if (typeof this.properties.msgidPlural !== 'undefined') {
|
|
13
|
+
if (/[\u0000-\u0006\u000e-\u001f]/.exec(properties.msgidPlural)) {
|
|
14
|
+
throw new Error(gtx._('msgid_plural must not contain control characters.'));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (this.properties.msgid === '' &&
|
|
18
|
+
(typeof this.properties.msgctxt === 'undefined' ||
|
|
19
|
+
this.properties.msgctxt === '')) {
|
|
20
|
+
this.warning(gtx._('Empty msgid. It is reserved by esgettext.\n' +
|
|
21
|
+
"Calling gettext('') returns the header " +
|
|
22
|
+
'entry with meta information, not the empty ' +
|
|
23
|
+
'string.\n' +
|
|
24
|
+
'Consider adding a message context, if this ' +
|
|
25
|
+
'is done intentionally.'));
|
|
26
|
+
}
|
|
27
|
+
this.checkDeprecatedControls(this.properties.msgctxt);
|
|
28
|
+
this.checkDeprecatedControls(this.properties.msgid);
|
|
29
|
+
this.checkDeprecatedControls(this.properties.msgidPlural);
|
|
30
|
+
this.checkReferences();
|
|
31
|
+
this.checkFlags();
|
|
32
|
+
}
|
|
33
|
+
POTEntry.build = function () {
|
|
34
|
+
var entry = new POTEntry({ msgid: 'ignore' });
|
|
35
|
+
delete entry.properties.msgid;
|
|
36
|
+
return entry;
|
|
37
|
+
};
|
|
38
|
+
POTEntry.prototype.toString = function (width) {
|
|
39
|
+
if (width === void 0) { width = 76; }
|
|
40
|
+
var out = '';
|
|
41
|
+
if (typeof this.properties.translatorComments !== 'undefined') {
|
|
42
|
+
for (var _i = 0, _a = this.properties.translatorComments; _i < _a.length; _i++) {
|
|
43
|
+
var comment = _a[_i];
|
|
44
|
+
comment = comment.replace(/\n/g, '\n# ');
|
|
45
|
+
out += "# ".concat(comment, "\n");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (typeof this.properties.extractedComments !== 'undefined') {
|
|
49
|
+
for (var _b = 0, _c = this.properties.extractedComments; _b < _c.length; _b++) {
|
|
50
|
+
var comment = _c[_b];
|
|
51
|
+
comment = comment.replace(/\n/g, '\n#. ');
|
|
52
|
+
out += "#. ".concat(comment, "\n");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (typeof this.properties.automatic !== 'undefined') {
|
|
56
|
+
for (var _d = 0, _e = this.properties.automatic; _d < _e.length; _d++) {
|
|
57
|
+
var comment = _e[_d];
|
|
58
|
+
comment = comment.replace(/\n/g, '\n#. ');
|
|
59
|
+
out += "#. ".concat(comment, "\n");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (typeof this.properties.references !== 'undefined') {
|
|
63
|
+
var references = Array.from(new Set(this.properties.references)).join(' ');
|
|
64
|
+
if (width > 0) {
|
|
65
|
+
var wrapped = this.wrap(references, width - 3);
|
|
66
|
+
for (var _f = 0, wrapped_1 = wrapped; _f < wrapped_1.length; _f++) {
|
|
67
|
+
var line = wrapped_1[_f];
|
|
68
|
+
out += "#: ".concat(line.trimRight().replace(/ $/, ''), "\n");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
out += "#: ".concat(references, "\n");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (typeof this.properties.flags !== 'undefined' &&
|
|
76
|
+
this.properties.flags.length) {
|
|
77
|
+
var flags = Array.from(new Set(this.properties.flags)).join(', ');
|
|
78
|
+
out += "#, ".concat(flags, "\n");
|
|
79
|
+
}
|
|
80
|
+
if (typeof this.properties.msgctxt !== 'undefined') {
|
|
81
|
+
out +=
|
|
82
|
+
this.serializeMsgId(this.properties.msgctxt, width, 'msgctxt') + '\n';
|
|
83
|
+
}
|
|
84
|
+
out += this.serializeMsgId(this.properties.msgid, width) + '\n';
|
|
85
|
+
if (typeof this.properties.msgidPlural === 'undefined') {
|
|
86
|
+
if (typeof this.properties.msgstr !== 'undefined') {
|
|
87
|
+
out +=
|
|
88
|
+
this.serializeMsgId(this.properties.msgstr, width, 'msgstr') + '\n';
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
out += 'msgstr ""\n';
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
out +=
|
|
96
|
+
this.serializeMsgId(this.properties.msgidPlural, width, 'msgid_plural') + '\n';
|
|
97
|
+
out += 'msgstr[0] ""\nmsgstr[1] ""\n';
|
|
98
|
+
}
|
|
99
|
+
return out;
|
|
100
|
+
};
|
|
101
|
+
POTEntry.prototype.merge = function (other) {
|
|
102
|
+
var _a, _b, _c, _d;
|
|
103
|
+
var _this = this;
|
|
104
|
+
if (other.properties.translatorComments) {
|
|
105
|
+
if (!this.properties.translatorComments) {
|
|
106
|
+
this.properties.translatorComments = new Array();
|
|
107
|
+
}
|
|
108
|
+
(_a = this.properties.translatorComments).push.apply(_a, other.properties.translatorComments);
|
|
109
|
+
}
|
|
110
|
+
if (other.properties.automatic) {
|
|
111
|
+
if (!this.properties.automatic) {
|
|
112
|
+
this.properties.automatic = new Array();
|
|
113
|
+
}
|
|
114
|
+
(_b = this.properties.automatic).push.apply(_b, other.properties.automatic);
|
|
115
|
+
}
|
|
116
|
+
if (other.properties.flags) {
|
|
117
|
+
if (!this.properties.flags) {
|
|
118
|
+
this.properties.flags = new Array();
|
|
119
|
+
}
|
|
120
|
+
other.properties.flags.forEach(function (flag) {
|
|
121
|
+
var negated = flag.replace(/^no-/, '');
|
|
122
|
+
if (negated === flag) {
|
|
123
|
+
negated = 'no-' + flag;
|
|
124
|
+
}
|
|
125
|
+
if (_this.properties.flags.includes(negated)) {
|
|
126
|
+
other.warning(gtx._x('flag "{flag}" conflicts with previous flag "{negated}"', {
|
|
127
|
+
flag: flag,
|
|
128
|
+
negated: negated,
|
|
129
|
+
}));
|
|
130
|
+
var refs = _this.properties.references;
|
|
131
|
+
if (refs) {
|
|
132
|
+
other.warning(gtx._nx('The conflicting flag "{negated}" may stem from this location:', 'The conflicting flag "{negated}" may stem from one of these locations:', refs.length, { flag: flag, negated: negated }));
|
|
133
|
+
refs.forEach(function (ref) {
|
|
134
|
+
console.warn("\t".concat(ref));
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
(_c = this.properties.flags).push.apply(_c, other.properties.flags);
|
|
140
|
+
}
|
|
141
|
+
if (other.properties.references) {
|
|
142
|
+
if (!this.properties.references) {
|
|
143
|
+
this.properties.references = new Array();
|
|
144
|
+
}
|
|
145
|
+
(_d = this.properties.references).push.apply(_d, other.properties.references);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
POTEntry.prototype.addExtractedCommentLine = function (line) {
|
|
149
|
+
if (!this.properties.extractedComments) {
|
|
150
|
+
this.properties.extractedComments = [];
|
|
151
|
+
}
|
|
152
|
+
this.properties.extractedComments.push(line);
|
|
153
|
+
};
|
|
154
|
+
POTEntry.prototype.addTranslatorCommentLine = function (line) {
|
|
155
|
+
if (!this.properties.translatorComments) {
|
|
156
|
+
this.properties.translatorComments = [];
|
|
157
|
+
}
|
|
158
|
+
this.properties.translatorComments.push(line);
|
|
159
|
+
};
|
|
160
|
+
POTEntry.prototype.addFlag = function (flag) {
|
|
161
|
+
if (!this.properties.flags) {
|
|
162
|
+
this.properties.flags = [];
|
|
163
|
+
}
|
|
164
|
+
this.properties.flags.push(flag);
|
|
165
|
+
};
|
|
166
|
+
POTEntry.prototype.addReference = function (reference) {
|
|
167
|
+
if (!this.properties.references) {
|
|
168
|
+
this.properties.references = [];
|
|
169
|
+
}
|
|
170
|
+
this.properties.references.push(reference);
|
|
171
|
+
};
|
|
172
|
+
POTEntry.prototype.addToMsgid = function (chunk) {
|
|
173
|
+
if (typeof this.properties.msgid === 'undefined') {
|
|
174
|
+
this.properties.msgid = '';
|
|
175
|
+
}
|
|
176
|
+
this.properties.msgid += chunk;
|
|
177
|
+
};
|
|
178
|
+
POTEntry.prototype.addToMsgidPlural = function (chunk) {
|
|
179
|
+
if (typeof this.properties.msgidPlural === 'undefined') {
|
|
180
|
+
this.properties.msgidPlural = '';
|
|
181
|
+
}
|
|
182
|
+
this.properties.msgidPlural += chunk;
|
|
183
|
+
};
|
|
184
|
+
POTEntry.prototype.addToMsgstr = function (chunk) {
|
|
185
|
+
if (typeof this.properties.msgstr === 'undefined') {
|
|
186
|
+
this.properties.msgstr = '';
|
|
187
|
+
}
|
|
188
|
+
this.properties.msgstr += chunk;
|
|
189
|
+
};
|
|
190
|
+
POTEntry.prototype.addToMsgctxt = function (chunk) {
|
|
191
|
+
if (typeof this.properties.msgctxt === 'undefined') {
|
|
192
|
+
this.properties.msgctxt = '';
|
|
193
|
+
}
|
|
194
|
+
this.properties.msgctxt += chunk;
|
|
195
|
+
};
|
|
196
|
+
POTEntry.prototype.serializeMsgId = function (input, width, prefix) {
|
|
197
|
+
var _this = this;
|
|
198
|
+
if (prefix === void 0) { prefix = 'msgid'; }
|
|
199
|
+
if (width <= 0) {
|
|
200
|
+
var escaped = this.escape(input);
|
|
201
|
+
return "".concat(prefix, " \"").concat(escaped, "\"");
|
|
202
|
+
}
|
|
203
|
+
var output = new Array();
|
|
204
|
+
var preWrapped = input.split('\n').map(function (str) { return _this.escape(str); });
|
|
205
|
+
if (preWrapped.length > 1 ||
|
|
206
|
+
preWrapped[0].length > width - prefix.length - 3) {
|
|
207
|
+
output.push("".concat(prefix, " \"\""));
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
var chunk = preWrapped.shift();
|
|
211
|
+
output.push("".concat(prefix, " \"").concat(chunk, "\""));
|
|
212
|
+
}
|
|
213
|
+
preWrapped.forEach(function (line, index) {
|
|
214
|
+
if (index < preWrapped.length - 1) {
|
|
215
|
+
line += '\\n';
|
|
216
|
+
}
|
|
217
|
+
if (line.length) {
|
|
218
|
+
var wrapped = _this.wrap(line, width - 2);
|
|
219
|
+
wrapped.forEach(function (inner) {
|
|
220
|
+
output.push("\"".concat(inner, "\""));
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
return output.join('\n');
|
|
225
|
+
};
|
|
226
|
+
POTEntry.prototype.wrap = function (input, width) {
|
|
227
|
+
var output = new Array();
|
|
228
|
+
while (input.length > width) {
|
|
229
|
+
var i = input.lastIndexOf(' ', width);
|
|
230
|
+
if (i < 0) {
|
|
231
|
+
i = input.indexOf(' ', width);
|
|
232
|
+
}
|
|
233
|
+
if (i < 0) {
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
output.push(input.substr(0, i + 1));
|
|
237
|
+
input = input.substr(i + 1);
|
|
238
|
+
}
|
|
239
|
+
output.push(input);
|
|
240
|
+
return output;
|
|
241
|
+
};
|
|
242
|
+
POTEntry.prototype.escape = function (input) {
|
|
243
|
+
var escapes = {
|
|
244
|
+
'\u0007': '\\a',
|
|
245
|
+
'\b': '\\b',
|
|
246
|
+
'\t': '\\t',
|
|
247
|
+
'\n': '\\n',
|
|
248
|
+
'\v': '\\v',
|
|
249
|
+
'\f': '\\f',
|
|
250
|
+
'\r': '\\r',
|
|
251
|
+
'"': '\\"',
|
|
252
|
+
'\\': '\\\\',
|
|
253
|
+
};
|
|
254
|
+
return input.replace(/([\u0007-\u000d"\\])/gs, function (m) {
|
|
255
|
+
return escapes[m[0]];
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
POTEntry.prototype.checkDeprecatedControls = function (str) {
|
|
259
|
+
if (typeof str === 'undefined') {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
var deprecated = RegExp('[\u0007\u0008\u000b-\u000e]', 'gs');
|
|
263
|
+
var escapes = {
|
|
264
|
+
'\u0007': '\\a',
|
|
265
|
+
'\b': '\\b',
|
|
266
|
+
'\v': '\\v',
|
|
267
|
+
'\f': '\\f',
|
|
268
|
+
'\r': '\\r',
|
|
269
|
+
};
|
|
270
|
+
var matches;
|
|
271
|
+
while ((matches = deprecated.exec(str)) !== null) {
|
|
272
|
+
var escape_1 = escapes[matches[0]];
|
|
273
|
+
if (!escape_1) {
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
delete escapes[matches[0]];
|
|
277
|
+
this.warning(gtx._x('internationalized messages should not ' +
|
|
278
|
+
"contain the '{escape}' escape sequence", { escape: escape_1 }));
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
POTEntry.prototype.checkReferences = function () {
|
|
282
|
+
var _this = this;
|
|
283
|
+
if (typeof this.properties.references === 'undefined') {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
this.properties.references.forEach(function (ref) {
|
|
287
|
+
if (/[ \n]/.exec(ref)) {
|
|
288
|
+
_this.error(gtx._('filenames must not contain space or newlines'));
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
};
|
|
292
|
+
POTEntry.prototype.checkFlags = function () {
|
|
293
|
+
var _this = this;
|
|
294
|
+
if (typeof this.properties.flags === 'undefined') {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
this.properties.flags.forEach(function (flag) {
|
|
298
|
+
if (/[,\n]/.exec(flag)) {
|
|
299
|
+
_this.error(gtx._('flags must not contain commas or newlines'));
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
POTEntry.prototype.error = function (msg) {
|
|
304
|
+
var location = gtx._('[in memory]');
|
|
305
|
+
if (typeof this.properties.references !== 'undefined') {
|
|
306
|
+
location = this.properties.references[0].toString();
|
|
307
|
+
}
|
|
308
|
+
throw new Error(gtx._x('{location}: error: {msg}', { location: location, msg: msg }));
|
|
309
|
+
};
|
|
310
|
+
POTEntry.prototype.warning = function (msg) {
|
|
311
|
+
if (!this.properties.noWarnings) {
|
|
312
|
+
var location_1 = gtx._('[in memory]');
|
|
313
|
+
if (typeof this.properties.references !== 'undefined') {
|
|
314
|
+
location_1 = this.properties.references[0].toString();
|
|
315
|
+
}
|
|
316
|
+
console.warn(gtx._x('{location}: warning: {msg}', { location: location_1, msg: msg }));
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
return POTEntry;
|
|
320
|
+
}());
|
|
321
|
+
exports.POTEntry = POTEntry;
|
|
322
|
+
//# sourceMappingURL=entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../src/pot/entry.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAEhD,IAAM,GAAG,GAAG,oBAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAuB5C;IAOC,kBAAqB,UAA8B;QAA9B,eAAU,GAAV,UA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
3
|
+
var entry_1 = require("./entry");
|
|
4
|
+
describe('POT entries', function () {
|
|
5
|
+
describe('simple cases', function () {
|
|
6
|
+
it('should output singular entries', function () {
|
|
7
|
+
var entry = new entry_1.POTEntry({ msgid: 'foobar' });
|
|
8
|
+
var expected = "msgid \"foobar\"\nmsgstr \"\"\n";
|
|
9
|
+
expect(entry.toString()).toEqual(expected);
|
|
10
|
+
});
|
|
11
|
+
it('should output plural entries', function () {
|
|
12
|
+
var entry = new entry_1.POTEntry({ msgid: 'foobar', msgidPlural: 'foobars' });
|
|
13
|
+
var expected = "msgid \"foobar\"\nmsgid_plural \"foobars\"\nmsgstr[0] \"\"\nmsgstr[1] \"\"\n";
|
|
14
|
+
expect(entry.toString()).toEqual(expected);
|
|
15
|
+
});
|
|
16
|
+
it('should output message contexts', function () {
|
|
17
|
+
var entry = new entry_1.POTEntry({ msgid: 'Open', msgctxt: 'Menu' });
|
|
18
|
+
var expected = "msgctxt \"Menu\"\nmsgid \"Open\"\nmsgstr \"\"\n";
|
|
19
|
+
expect(entry.toString()).toEqual(expected);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
describe('escaping', function () {
|
|
23
|
+
beforeAll(function () {
|
|
24
|
+
jest.spyOn(global.console, 'warn').mockImplementation(function () {
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
afterAll(function () { return jest.restoreAllMocks(); });
|
|
28
|
+
it('should escape a backslash', function () {
|
|
29
|
+
var entry = new entry_1.POTEntry({ msgid: '\\' });
|
|
30
|
+
var expected = "msgid \"\\\\\"\nmsgstr \"\"\n";
|
|
31
|
+
expect(entry.toString()).toEqual(expected);
|
|
32
|
+
});
|
|
33
|
+
it('should escape a double quote', function () {
|
|
34
|
+
var entry = new entry_1.POTEntry({ msgid: '"' });
|
|
35
|
+
var expected = "msgid \"\\\"\"\nmsgstr \"\"\n";
|
|
36
|
+
expect(entry.toString()).toEqual(expected);
|
|
37
|
+
});
|
|
38
|
+
it('should escape a bell character', function () {
|
|
39
|
+
var entry = new entry_1.POTEntry({ msgid: '\u0007' });
|
|
40
|
+
var expected = "msgid \"\\a\"\nmsgstr \"\"\n";
|
|
41
|
+
expect(entry.toString()).toEqual(expected);
|
|
42
|
+
});
|
|
43
|
+
it('should escape a backspace character', function () {
|
|
44
|
+
var entry = new entry_1.POTEntry({ msgid: '\b' });
|
|
45
|
+
var expected = "msgid \"\\b\"\nmsgstr \"\"\n";
|
|
46
|
+
expect(entry.toString()).toEqual(expected);
|
|
47
|
+
});
|
|
48
|
+
it('should escape a horizontal tab', function () {
|
|
49
|
+
var entry = new entry_1.POTEntry({ msgid: '\t' });
|
|
50
|
+
var expected = "msgid \"\\t\"\nmsgstr \"\"\n";
|
|
51
|
+
expect(entry.toString()).toEqual(expected);
|
|
52
|
+
});
|
|
53
|
+
it('should escape newlines', function () {
|
|
54
|
+
var entry = new entry_1.POTEntry({ msgid: '\n\n' });
|
|
55
|
+
var expected = "msgid \"\"\n\"\\n\"\n\"\\n\"\nmsgstr \"\"\n";
|
|
56
|
+
expect(entry.toString()).toEqual(expected);
|
|
57
|
+
});
|
|
58
|
+
it('should escape a vertical tab', function () {
|
|
59
|
+
var entry = new entry_1.POTEntry({ msgid: '\v' });
|
|
60
|
+
var expected = "msgid \"\\v\"\nmsgstr \"\"\n";
|
|
61
|
+
expect(entry.toString()).toEqual(expected);
|
|
62
|
+
});
|
|
63
|
+
it('should escape a form feed', function () {
|
|
64
|
+
var entry = new entry_1.POTEntry({ msgid: '\f' });
|
|
65
|
+
var expected = "msgid \"\\f\"\nmsgstr \"\"\n";
|
|
66
|
+
expect(entry.toString()).toEqual(expected);
|
|
67
|
+
});
|
|
68
|
+
it('should escape a carriage return', function () {
|
|
69
|
+
var entry = new entry_1.POTEntry({ msgid: '\r' });
|
|
70
|
+
var expected = "msgid \"\\r\"\nmsgstr \"\"\n";
|
|
71
|
+
expect(entry.toString()).toEqual(expected);
|
|
72
|
+
});
|
|
73
|
+
it('should throw an exception for all other controls', function () {
|
|
74
|
+
var _loop_1 = function (i) {
|
|
75
|
+
expect(function () { return new entry_1.POTEntry({ msgid: String.fromCharCode(i) }); }).toThrow();
|
|
76
|
+
expect(function () {
|
|
77
|
+
return new entry_1.POTEntry({ msgid: 'x', msgidPlural: String.fromCharCode(i) });
|
|
78
|
+
}).toThrow();
|
|
79
|
+
};
|
|
80
|
+
for (var i = 0; i < 0x7; ++i) {
|
|
81
|
+
_loop_1(i);
|
|
82
|
+
}
|
|
83
|
+
var _loop_2 = function (i) {
|
|
84
|
+
expect(function () { return new entry_1.POTEntry({ msgid: String.fromCharCode(i) }); }).toThrow();
|
|
85
|
+
expect(function () {
|
|
86
|
+
return new entry_1.POTEntry({ msgid: 'x', msgidPlural: String.fromCharCode(i) });
|
|
87
|
+
}).toThrow();
|
|
88
|
+
};
|
|
89
|
+
for (var i = 0xe; i < 0x20; ++i) {
|
|
90
|
+
_loop_2(i);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
describe('line wrapping', function () {
|
|
95
|
+
it('should wrap long lines by default', function () {
|
|
96
|
+
var entry = new entry_1.POTEntry({ msgid: 'For a very long time.' });
|
|
97
|
+
var expected = "msgid \"\"\n\"For a very long \"\n\"time.\"\nmsgstr \"\"\n";
|
|
98
|
+
expect(entry.toString(20)).toEqual(expected);
|
|
99
|
+
});
|
|
100
|
+
it('should not wrap long lines, when requested', function () {
|
|
101
|
+
var entry = new entry_1.POTEntry({ msgid: 'For a very long time.' });
|
|
102
|
+
var expected = "msgid \"For a very long time.\"\nmsgstr \"\"\n";
|
|
103
|
+
expect(entry.toString(0)).toEqual(expected);
|
|
104
|
+
});
|
|
105
|
+
it('should always wrap at newline characters', function () {
|
|
106
|
+
var entry = new entry_1.POTEntry({ msgid: 'line 1\nline 2\nline 3\n' });
|
|
107
|
+
var expected = "msgid \"\"\n\"line 1\\n\"\n\"line 2\\n\"\n\"line 3\\n\"\nmsgstr \"\"\n";
|
|
108
|
+
expect(entry.toString()).toEqual(expected);
|
|
109
|
+
});
|
|
110
|
+
it('should never wrap inside words', function () {
|
|
111
|
+
var entry = new entry_1.POTEntry({ msgid: 'ForAVeryLongTime' });
|
|
112
|
+
var expected = "msgid \"\"\n\"ForAVeryLongTime\"\nmsgstr \"\"\n";
|
|
113
|
+
expect(entry.toString(10)).toEqual(expected);
|
|
114
|
+
});
|
|
115
|
+
it('should never wrap inside words with prefix and postfix', function () {
|
|
116
|
+
var entry = new entry_1.POTEntry({ msgid: 'before ForAVeryLongTime after' });
|
|
117
|
+
var expected = "msgid \"\"\n\"before \"\n\"ForAVeryLongTime \"\n\"after\"\nmsgstr \"\"\n";
|
|
118
|
+
expect(entry.toString(10)).toEqual(expected);
|
|
119
|
+
});
|
|
120
|
+
it('should not exceed the requested width', function () {
|
|
121
|
+
var entry = new entry_1.POTEntry({ msgid: 'At the Height of the Fighting' });
|
|
122
|
+
var expected = "msgid \"\"\n\"At the Height \"\n\"of the \"\n\"Fighting\"\nmsgstr \"\"\n";
|
|
123
|
+
expect(entry.toString(16)).toEqual(expected);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
describe('meta information', function () {
|
|
127
|
+
it('should output translator comments', function () {
|
|
128
|
+
var entry = new entry_1.POTEntry({
|
|
129
|
+
msgid: 'Sun',
|
|
130
|
+
translatorComments: ['Copyright (C) 2020 my@self.net!'],
|
|
131
|
+
});
|
|
132
|
+
var expected = "# Copyright (C) 2020 my@self.net!\nmsgid \"Sun\"\nmsgstr \"\"\n";
|
|
133
|
+
expect(entry.toString(20)).toEqual(expected);
|
|
134
|
+
});
|
|
135
|
+
it('should output automatic comments', function () {
|
|
136
|
+
var entry = new entry_1.POTEntry({
|
|
137
|
+
msgid: 'Sun',
|
|
138
|
+
automatic: ['TRANSLATORS: The weekday, not our star!'],
|
|
139
|
+
});
|
|
140
|
+
var expected = "#. TRANSLATORS: The weekday, not our star!\nmsgid \"Sun\"\nmsgstr \"\"\n";
|
|
141
|
+
expect(entry.toString(20)).toEqual(expected);
|
|
142
|
+
});
|
|
143
|
+
it('should handle newlines inside automatic comments', function () {
|
|
144
|
+
var entry = new entry_1.POTEntry({
|
|
145
|
+
msgid: 'Sun',
|
|
146
|
+
automatic: ['TRANSLATORS:\nThe weekday,\nnot our star!'],
|
|
147
|
+
});
|
|
148
|
+
var expected = "#. TRANSLATORS:\n#. The weekday,\n#. not our star!\nmsgid \"Sun\"\nmsgstr \"\"\n";
|
|
149
|
+
expect(entry.toString(20)).toEqual(expected);
|
|
150
|
+
});
|
|
151
|
+
it('should output flags', function () {
|
|
152
|
+
var entry = new entry_1.POTEntry({
|
|
153
|
+
msgid: 'hello',
|
|
154
|
+
flags: ['no-perl-format', 'no-perl-brace-format'],
|
|
155
|
+
});
|
|
156
|
+
var expected = "#, no-perl-format, no-perl-brace-format\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
157
|
+
expect(entry.toString(20)).toEqual(expected);
|
|
158
|
+
});
|
|
159
|
+
it('should make flags unique', function () {
|
|
160
|
+
var entry = new entry_1.POTEntry({
|
|
161
|
+
msgid: 'hello',
|
|
162
|
+
flags: ['no-perl-format', 'no-perl-format'],
|
|
163
|
+
});
|
|
164
|
+
var expected = "#, no-perl-format\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
165
|
+
expect(entry.toString(20)).toEqual(expected);
|
|
166
|
+
});
|
|
167
|
+
it('should output references', function () {
|
|
168
|
+
var entry = new entry_1.POTEntry({
|
|
169
|
+
msgid: 'hello',
|
|
170
|
+
references: ['src/hello.ts:2304', 'src/goodbye.ts:2304'],
|
|
171
|
+
});
|
|
172
|
+
var expected = "#: src/hello.ts:2304 src/goodbye.ts:2304\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
173
|
+
expect(entry.toString()).toEqual(expected);
|
|
174
|
+
});
|
|
175
|
+
it('should wrap references if requested', function () {
|
|
176
|
+
var entry = new entry_1.POTEntry({
|
|
177
|
+
msgid: 'hello',
|
|
178
|
+
references: ['src/hello.ts:2304', 'src/goodbye.ts:2304'],
|
|
179
|
+
});
|
|
180
|
+
var expected = "#: src/hello.ts:2304\n#: src/goodbye.ts:2304\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
181
|
+
expect(entry.toString(25)).toEqual(expected);
|
|
182
|
+
expected = "#: src/hello.ts:2304 src/goodbye.ts:2304\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
183
|
+
expect(entry.toString(-1)).toEqual(expected);
|
|
184
|
+
});
|
|
185
|
+
it('should handle everything together in the right order', function () {
|
|
186
|
+
var entry = new entry_1.POTEntry({
|
|
187
|
+
msgid: 'hello',
|
|
188
|
+
automatic: ['TRANSLATORS: Send me a postcard!'],
|
|
189
|
+
flags: ['no-c-format'],
|
|
190
|
+
references: ['src/hello.ts:2304'],
|
|
191
|
+
});
|
|
192
|
+
var expected = "#. TRANSLATORS: Send me a postcard!\n#: src/hello.ts:2304\n#, no-c-format\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
193
|
+
expect(entry.toString()).toEqual(expected);
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
describe('merge entries', function () {
|
|
197
|
+
var entry = new entry_1.POTEntry({ msgid: 'hello' });
|
|
198
|
+
var expected = "msgid \"hello\"\nmsgstr \"\"\n";
|
|
199
|
+
expect(entry.toString()).toEqual(expected);
|
|
200
|
+
entry.merge(new entry_1.POTEntry({
|
|
201
|
+
msgid: 'hello',
|
|
202
|
+
translatorComments: ['Copyright (C) 2020 myself.'],
|
|
203
|
+
}));
|
|
204
|
+
expected = "# Copyright (C) 2020 myself.\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
205
|
+
expect(entry.toString()).toEqual(expected);
|
|
206
|
+
entry.merge(new entry_1.POTEntry({
|
|
207
|
+
msgid: 'hello',
|
|
208
|
+
translatorComments: ['Written by myself.'],
|
|
209
|
+
}));
|
|
210
|
+
expected = "# Copyright (C) 2020 myself.\n# Written by myself.\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
211
|
+
expect(entry.toString()).toEqual(expected);
|
|
212
|
+
entry.merge(new entry_1.POTEntry({
|
|
213
|
+
msgid: 'hello',
|
|
214
|
+
automatic: ['TRANSLATORS: Send me a postcard!'],
|
|
215
|
+
}));
|
|
216
|
+
expected = "# Copyright (C) 2020 myself.\n# Written by myself.\n#. TRANSLATORS: Send me a postcard!\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
217
|
+
expect(entry.toString()).toEqual(expected);
|
|
218
|
+
entry.merge(new entry_1.POTEntry({
|
|
219
|
+
msgid: 'hello',
|
|
220
|
+
automatic: ['TRANSLATORS: I will write you back!'],
|
|
221
|
+
}));
|
|
222
|
+
expected = "# Copyright (C) 2020 myself.\n# Written by myself.\n#. TRANSLATORS: Send me a postcard!\n#. TRANSLATORS: I will write you back!\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
223
|
+
expect(entry.toString()).toEqual(expected);
|
|
224
|
+
entry.merge(new entry_1.POTEntry({
|
|
225
|
+
msgid: 'hello',
|
|
226
|
+
references: ['src/hello.ts:2304'],
|
|
227
|
+
}));
|
|
228
|
+
expected = "# Copyright (C) 2020 myself.\n# Written by myself.\n#. TRANSLATORS: Send me a postcard!\n#. TRANSLATORS: I will write you back!\n#: src/hello.ts:2304\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
229
|
+
expect(entry.toString()).toEqual(expected);
|
|
230
|
+
entry.merge(new entry_1.POTEntry({
|
|
231
|
+
msgid: 'hello',
|
|
232
|
+
references: ['src/goodbye.ts:2304'],
|
|
233
|
+
}));
|
|
234
|
+
expected = "# Copyright (C) 2020 myself.\n# Written by myself.\n#. TRANSLATORS: Send me a postcard!\n#. TRANSLATORS: I will write you back!\n#: src/hello.ts:2304 src/goodbye.ts:2304\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
235
|
+
expect(entry.toString()).toEqual(expected);
|
|
236
|
+
entry.merge(new entry_1.POTEntry({
|
|
237
|
+
msgid: 'hello',
|
|
238
|
+
references: ['src/goodbye.ts:2304'],
|
|
239
|
+
}));
|
|
240
|
+
expected = "# Copyright (C) 2020 myself.\n# Written by myself.\n#. TRANSLATORS: Send me a postcard!\n#. TRANSLATORS: I will write you back!\n#: src/hello.ts:2304 src/goodbye.ts:2304\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
241
|
+
expect(entry.toString()).toEqual(expected);
|
|
242
|
+
entry.merge(new entry_1.POTEntry({
|
|
243
|
+
msgid: 'hello',
|
|
244
|
+
flags: ['no-perl-format'],
|
|
245
|
+
}));
|
|
246
|
+
expected = "# Copyright (C) 2020 myself.\n# Written by myself.\n#. TRANSLATORS: Send me a postcard!\n#. TRANSLATORS: I will write you back!\n#: src/hello.ts:2304 src/goodbye.ts:2304\n#, no-perl-format\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
247
|
+
expect(entry.toString()).toEqual(expected);
|
|
248
|
+
entry.merge(new entry_1.POTEntry({
|
|
249
|
+
msgid: 'hello',
|
|
250
|
+
flags: ['no-c-format'],
|
|
251
|
+
}));
|
|
252
|
+
expected = "# Copyright (C) 2020 myself.\n# Written by myself.\n#. TRANSLATORS: Send me a postcard!\n#. TRANSLATORS: I will write you back!\n#: src/hello.ts:2304 src/goodbye.ts:2304\n#, no-perl-format, no-c-format\nmsgid \"hello\"\nmsgstr \"\"\n";
|
|
253
|
+
expect(entry.toString()).toEqual(expected);
|
|
254
|
+
});
|
|
255
|
+
describe('warnings', function () {
|
|
256
|
+
var warner;
|
|
257
|
+
beforeEach(function () {
|
|
258
|
+
warner = jest.spyOn(global.console, 'warn').mockImplementation(function () {
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
afterEach(function () { return jest.restoreAllMocks(); });
|
|
262
|
+
it('should print a warning, when a msgid is the empty string', function () {
|
|
263
|
+
new entry_1.POTEntry({ msgid: '' });
|
|
264
|
+
expect(warner).toHaveBeenCalled();
|
|
265
|
+
warner.mockClear();
|
|
266
|
+
new entry_1.POTEntry({ msgid: '', msgidPlural: 'spaces' });
|
|
267
|
+
expect(warner).toHaveBeenCalled();
|
|
268
|
+
warner.mockClear();
|
|
269
|
+
new entry_1.POTEntry({ msgid: '', msgctxt: 'spaces' });
|
|
270
|
+
expect(warner).not.toHaveBeenCalled();
|
|
271
|
+
});
|
|
272
|
+
it('should print one warning for each deprecated control in a msgid', function () {
|
|
273
|
+
new entry_1.POTEntry({ msgid: '\u0007\u0007\b\b\v\v\f\f\r\r' });
|
|
274
|
+
expect(warner).toHaveBeenCalledTimes(5);
|
|
275
|
+
});
|
|
276
|
+
it('should print one warning for each deprecated control in a msgidPlural', function () {
|
|
277
|
+
new entry_1.POTEntry({
|
|
278
|
+
msgid: 'foobar',
|
|
279
|
+
msgidPlural: '\u0007\u0007\b\b\v\v\f\f\r\r',
|
|
280
|
+
});
|
|
281
|
+
expect(warner).toHaveBeenCalledTimes(5);
|
|
282
|
+
});
|
|
283
|
+
it('should print one warning for each deprecated control in a msgctxt', function () {
|
|
284
|
+
new entry_1.POTEntry({
|
|
285
|
+
msgid: 'foobar',
|
|
286
|
+
msgctxt: '\u0007\u0007\b\b\v\v\f\f\r\r',
|
|
287
|
+
});
|
|
288
|
+
expect(warner).toHaveBeenCalledTimes(5);
|
|
289
|
+
});
|
|
290
|
+
it('should warn about conflicting flags', function () {
|
|
291
|
+
var entry = new entry_1.POTEntry({
|
|
292
|
+
msgid: 'foobar',
|
|
293
|
+
flags: ['perl-brace-format'],
|
|
294
|
+
});
|
|
295
|
+
var other = new entry_1.POTEntry({
|
|
296
|
+
msgid: 'foobar',
|
|
297
|
+
flags: ['no-perl-brace-format'],
|
|
298
|
+
});
|
|
299
|
+
entry.merge(other);
|
|
300
|
+
expect(warner).toHaveBeenCalledTimes(1);
|
|
301
|
+
expect(warner).toHaveBeenNthCalledWith(1, '[in memory]: warning: flag "no-perl-brace-format" conflicts with previous flag "perl-brace-format"');
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
describe('errors', function () {
|
|
305
|
+
it('should reject file names with spaces', function () {
|
|
306
|
+
var msgid = 'xyz';
|
|
307
|
+
var references = ['file name:42'];
|
|
308
|
+
expect(function () { return new entry_1.POTEntry({ msgid: msgid, references: references }); }).toThrow();
|
|
309
|
+
});
|
|
310
|
+
it('should reject flags with commas', function () {
|
|
311
|
+
var msgid = 'xyz';
|
|
312
|
+
var flags = ['foo, bar'];
|
|
313
|
+
expect(function () { return new entry_1.POTEntry({ msgid: msgid, flags: flags }); }).toThrow();
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
//# sourceMappingURL=entry.spec.js.map
|