@tolgee/core 2.1.1 → 2.7.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/README.md +2 -1
- package/dist/tolgee.cjs.js +86 -32
- package/dist/tolgee.cjs.js.map +1 -1
- package/dist/tolgee.cjs.min.js +1 -1
- package/dist/tolgee.cjs.min.js.map +1 -1
- package/dist/tolgee.esm.js +16 -0
- package/dist/tolgee.esm.js.map +1 -0
- package/dist/tolgee.umd.js +86 -32
- package/dist/tolgee.umd.js.map +1 -1
- package/dist/tolgee.umd.min.js +1 -1
- package/dist/tolgee.umd.min.js.map +1 -1
- package/lib/Tolgee.js +4 -2
- package/lib/Tolgee.js.map +1 -1
- package/lib/TolgeeConfig.d.ts +1 -1
- package/lib/handlers/CoreHandler.js +4 -2
- package/lib/handlers/CoreHandler.js.map +1 -1
- package/lib/highlighter/TranslationHighlighter.d.ts +2 -2
- package/lib/highlighter/TranslationHighlighter.js +89 -28
- package/lib/highlighter/TranslationHighlighter.js.map +1 -1
- package/lib/types.d.ts +1 -0
- package/package.json +5 -5
- package/lib/Observer.test.d.ts +0 -2
- package/lib/Observer.test.js +0 -190
- package/lib/Observer.test.js.map +0 -1
- package/lib/Properties.test.d.ts +0 -1
- package/lib/Properties.test.js +0 -77
- package/lib/Properties.test.js.map +0 -1
- package/lib/Tolgee.test.d.ts +0 -1
- package/lib/Tolgee.test.js +0 -451
- package/lib/Tolgee.test.js.map +0 -1
- package/lib/TolgeeConfig.test.d.ts +0 -1
- package/lib/TolgeeConfig.test.js +0 -18
- package/lib/TolgeeConfig.test.js.map +0 -1
- package/lib/__testFixtures/classMock.d.ts +0 -3
- package/lib/__testFixtures/classMock.js +0 -8
- package/lib/__testFixtures/classMock.js.map +0 -1
- package/lib/__testFixtures/createElement.d.ts +0 -2
- package/lib/__testFixtures/createElement.js +0 -58
- package/lib/__testFixtures/createElement.js.map +0 -1
- package/lib/__testFixtures/createTestDom.d.ts +0 -9
- package/lib/__testFixtures/createTestDom.js +0 -18
- package/lib/__testFixtures/createTestDom.js.map +0 -1
- package/lib/__testFixtures/mocked.d.ts +0 -20
- package/lib/__testFixtures/mocked.js +0 -24
- package/lib/__testFixtures/mocked.js.map +0 -1
- package/lib/handlers/AttributeHandler.test.d.ts +0 -1
- package/lib/handlers/AttributeHandler.test.js +0 -177
- package/lib/handlers/AttributeHandler.test.js.map +0 -1
- package/lib/handlers/CoreHandler.test.d.ts +0 -1
- package/lib/handlers/CoreHandler.test.js +0 -148
- package/lib/handlers/CoreHandler.test.js.map +0 -1
- package/lib/handlers/TextHandler.test.d.ts +0 -1
- package/lib/handlers/TextHandler.test.js +0 -270
- package/lib/handlers/TextHandler.test.js.map +0 -1
- package/lib/helpers/TextHelper.test.d.ts +0 -1
- package/lib/helpers/TextHelper.test.js +0 -107
- package/lib/helpers/TextHelper.test.js.map +0 -1
- package/lib/highlighter/HighlightFunctionsInitializer.test.d.ts +0 -1
- package/lib/highlighter/HighlightFunctionsInitializer.test.js +0 -81
- package/lib/highlighter/HighlightFunctionsInitializer.test.js.map +0 -1
- package/lib/highlighter/MouseEventHandler.test.d.ts +0 -1
- package/lib/highlighter/MouseEventHandler.test.js +0 -195
- package/lib/highlighter/MouseEventHandler.test.js.map +0 -1
- package/lib/highlighter/TranslationHighlighter.test.d.ts +0 -1
- package/lib/highlighter/TranslationHighlighter.test.js +0 -207
- package/lib/highlighter/TranslationHighlighter.test.js.map +0 -1
- package/lib/services/CoreService.test.d.ts +0 -1
- package/lib/services/CoreService.test.js +0 -179
- package/lib/services/CoreService.test.js.map +0 -1
- package/lib/services/DependencyStore.test.d.ts +0 -1
- package/lib/services/DependencyStore.test.js +0 -67
- package/lib/services/DependencyStore.test.js.map +0 -1
- package/lib/services/ElementRegistrar.test.d.ts +0 -1
- package/lib/services/ElementRegistrar.test.js +0 -200
- package/lib/services/ElementRegistrar.test.js.map +0 -1
- package/lib/services/TextService.test.d.ts +0 -1
- package/lib/services/TextService.test.js +0 -430
- package/lib/services/TextService.test.js.map +0 -1
- package/lib/services/TranslationService.test.d.ts +0 -1
- package/lib/services/TranslationService.test.js +0 -649
- package/lib/services/TranslationService.test.js.map +0 -1
- package/lib/toolsManager/Messages.test.d.ts +0 -1
- package/lib/toolsManager/Messages.test.js +0 -114
- package/lib/toolsManager/Messages.test.js.map +0 -1
- package/lib/toolsManager/PluginManager.test.d.ts +0 -1
- package/lib/toolsManager/PluginManager.test.js +0 -120
- package/lib/toolsManager/PluginManager.test.js.map +0 -1
|
@@ -1,430 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
jest.dontMock('./TextService');
|
|
38
|
-
jest.dontMock('../helpers/TextHelper');
|
|
39
|
-
jest.dontMock('./DependencyStore');
|
|
40
|
-
import { Properties } from '../Properties';
|
|
41
|
-
import { getMockedInstance } from '@testFixtures/mocked';
|
|
42
|
-
import { TranslationService } from './TranslationService';
|
|
43
|
-
import { DependencyStore } from './DependencyStore';
|
|
44
|
-
describe('TextService', function () {
|
|
45
|
-
var mockedTranslationReturn = '';
|
|
46
|
-
var params = { param1: 'Dummy param 1', param2: 'Dummy param 2' };
|
|
47
|
-
var expectedTranslated = '';
|
|
48
|
-
var textService;
|
|
49
|
-
var getTranslationMock = jest.fn(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
|
-
return __generator(this, function (_a) {
|
|
51
|
-
return [2 /*return*/, mockedTranslationReturn];
|
|
52
|
-
});
|
|
53
|
-
}); });
|
|
54
|
-
var getFromCacheOrCallbackMock = jest.fn(function () {
|
|
55
|
-
return mockedTranslationReturn;
|
|
56
|
-
});
|
|
57
|
-
beforeEach(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
return __generator(this, function (_a) {
|
|
59
|
-
textService = new DependencyStore().textService;
|
|
60
|
-
mockedTranslationReturn = 'Dummy translated text {param1} {param2}';
|
|
61
|
-
expectedTranslated = mockedTranslationReturn
|
|
62
|
-
.replace('{param1}', params.param1)
|
|
63
|
-
.replace('{param2}', params.param2);
|
|
64
|
-
getMockedInstance(Properties).config = {
|
|
65
|
-
inputPrefix: '{{',
|
|
66
|
-
inputSuffix: '}}',
|
|
67
|
-
restrictedElements: [],
|
|
68
|
-
tagAttributes: {
|
|
69
|
-
'*': ['aria-label'],
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
getMockedInstance(TranslationService).getTranslation = getTranslationMock;
|
|
73
|
-
getMockedInstance(TranslationService).getFromCacheOrFallback =
|
|
74
|
-
getFromCacheOrCallbackMock;
|
|
75
|
-
return [2 /*return*/];
|
|
76
|
-
});
|
|
77
|
-
}); });
|
|
78
|
-
afterEach(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
79
|
-
return __generator(this, function (_a) {
|
|
80
|
-
jest.clearAllMocks();
|
|
81
|
-
return [2 /*return*/];
|
|
82
|
-
});
|
|
83
|
-
}); });
|
|
84
|
-
describe('translation functions', function () {
|
|
85
|
-
test('it will translate asynchronously correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
86
|
-
var translated;
|
|
87
|
-
return __generator(this, function (_a) {
|
|
88
|
-
switch (_a.label) {
|
|
89
|
-
case 0: return [4 /*yield*/, textService.translate(mockedTranslationReturn, params, "en", true, 'Default')];
|
|
90
|
-
case 1:
|
|
91
|
-
translated = _a.sent();
|
|
92
|
-
expect(translated).toEqual(expectedTranslated);
|
|
93
|
-
expect(getTranslationMock).toBeCalledWith('Dummy translated text {param1} {param2}', 'en', true, 'Default');
|
|
94
|
-
return [2 /*return*/];
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}); });
|
|
98
|
-
test('it will translate synchronously correctly', function () {
|
|
99
|
-
var translated = textService.instant(mockedTranslationReturn, params, 'en', true, 'Default');
|
|
100
|
-
expect(translated).toEqual(expectedTranslated);
|
|
101
|
-
expect(getFromCacheOrCallbackMock).toBeCalledWith('Dummy translated text {param1} {param2}', 'en', true, 'Default');
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
test('replace function replaces occurrences correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
105
|
-
var text, replaced;
|
|
106
|
-
return __generator(this, function (_a) {
|
|
107
|
-
switch (_a.label) {
|
|
108
|
-
case 0:
|
|
109
|
-
text = 'This is text with params {{text:param1:hello,param2:hello 2 as well}}. Text continues';
|
|
110
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
111
|
-
case 1:
|
|
112
|
-
replaced = _a.sent();
|
|
113
|
-
expect(replaced.text).toEqual('This is text with params Dummy translated text hello hello 2 as well. Text continues');
|
|
114
|
-
expect(replaced.keys[0].key).toEqual('text');
|
|
115
|
-
expect(replaced.keys[0].params['param1']).toEqual('hello');
|
|
116
|
-
expect(replaced.keys[0].params['param2']).toEqual('hello 2 as well');
|
|
117
|
-
return [2 /*return*/];
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}); });
|
|
121
|
-
test('replace function does not replace when prefix is escaped', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
122
|
-
var text, replaced;
|
|
123
|
-
return __generator(this, function (_a) {
|
|
124
|
-
switch (_a.label) {
|
|
125
|
-
case 0:
|
|
126
|
-
text = 'This is text: {{text:param1:aaaa,param2:aaaa}} \\{{text}}';
|
|
127
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
128
|
-
case 1:
|
|
129
|
-
replaced = _a.sent();
|
|
130
|
-
expect(replaced.text).toEqual('This is text: Dummy translated text aaaa aaaa {{text}}');
|
|
131
|
-
return [2 /*return*/];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}); });
|
|
135
|
-
test("it doesn't affect not related backslashes", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
136
|
-
var text, replaced;
|
|
137
|
-
return __generator(this, function (_a) {
|
|
138
|
-
switch (_a.label) {
|
|
139
|
-
case 0:
|
|
140
|
-
text = '\\This is \\text: {{text:param1:aaaa,param2:aaaa}} \\{{text}}, see? \\';
|
|
141
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
142
|
-
case 1:
|
|
143
|
-
replaced = _a.sent();
|
|
144
|
-
expect(replaced.text).toEqual('\\This is \\text: Dummy translated text aaaa aaaa {{text}}, see? \\');
|
|
145
|
-
return [2 /*return*/];
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
}); });
|
|
149
|
-
test('correctly parses default value', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
150
|
-
var text;
|
|
151
|
-
return __generator(this, function (_a) {
|
|
152
|
-
switch (_a.label) {
|
|
153
|
-
case 0:
|
|
154
|
-
text = '\\This is \\text: {{text,This is my default value.\\:look!:param1:aaaa,param2:aaaa}} \\{{text}}, see? \\';
|
|
155
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
156
|
-
case 1:
|
|
157
|
-
_a.sent();
|
|
158
|
-
expect(getTranslationMock).toHaveBeenCalledWith('text', undefined, false, 'This is my default value.:look!');
|
|
159
|
-
return [2 /*return*/];
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
}); });
|
|
163
|
-
test('replace function does not translate when params have escaped , or :', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
164
|
-
var text, replaced;
|
|
165
|
-
return __generator(this, function (_a) {
|
|
166
|
-
switch (_a.label) {
|
|
167
|
-
case 0:
|
|
168
|
-
text = 'This is text: {{text:param1:param 1 with\\,and \\:.,param2:hello \\:}}. Text continues';
|
|
169
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
170
|
-
case 1:
|
|
171
|
-
replaced = _a.sent();
|
|
172
|
-
expect(replaced.text).toEqual('This is text: Dummy translated text param 1 with,and :. hello :. Text continues');
|
|
173
|
-
return [2 /*return*/];
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
}); });
|
|
177
|
-
test('replace function does not translate when params have escaped \\', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
178
|
-
var text, replaced;
|
|
179
|
-
return __generator(this, function (_a) {
|
|
180
|
-
switch (_a.label) {
|
|
181
|
-
case 0:
|
|
182
|
-
text = 'This is text: {{text:param1:param 1 with\\\\ and again \\\\,param2:hello \\\\}}. Text continues';
|
|
183
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
184
|
-
case 1:
|
|
185
|
-
replaced = _a.sent();
|
|
186
|
-
expect(replaced.text).toEqual('This is text: Dummy translated text param 1 with\\ and again \\ hello \\. Text continues');
|
|
187
|
-
return [2 /*return*/];
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
}); });
|
|
191
|
-
test('replace function works with new lines in key', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
192
|
-
var text;
|
|
193
|
-
return __generator(this, function (_a) {
|
|
194
|
-
switch (_a.label) {
|
|
195
|
-
case 0:
|
|
196
|
-
mockedTranslationReturn = 'yep';
|
|
197
|
-
text = 'This is text: {{text\nwith\nnew\nlines}}. Text continues';
|
|
198
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
199
|
-
case 1:
|
|
200
|
-
_a.sent();
|
|
201
|
-
expect(getTranslationMock).toHaveBeenCalledWith('text\nwith\nnew\nlines', undefined, false, undefined);
|
|
202
|
-
return [2 /*return*/];
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}); });
|
|
206
|
-
test('works with escaped strings in params', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
207
|
-
var text, result;
|
|
208
|
-
return __generator(this, function (_a) {
|
|
209
|
-
switch (_a.label) {
|
|
210
|
-
case 0:
|
|
211
|
-
text = 'Text: {{text\nwith\nnew\nlines:hello:w\\,or\\:ld}}.';
|
|
212
|
-
mockedTranslationReturn = 'translated {hello}';
|
|
213
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
214
|
-
case 1:
|
|
215
|
-
result = _a.sent();
|
|
216
|
-
expect(result.keys[0].params['hello']).toEqual('w,or:ld');
|
|
217
|
-
return [2 /*return*/];
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
}); });
|
|
221
|
-
describe('Different key occurrences', function () {
|
|
222
|
-
beforeEach(function () {
|
|
223
|
-
getMockedInstance(TranslationService).getTranslation = jest.fn(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
224
|
-
return __generator(this, function (_a) {
|
|
225
|
-
return [2 /*return*/, 'translated'];
|
|
226
|
-
});
|
|
227
|
-
}); });
|
|
228
|
-
});
|
|
229
|
-
test('longer text will be handled correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
230
|
-
var text, replaced;
|
|
231
|
-
return __generator(this, function (_a) {
|
|
232
|
-
switch (_a.label) {
|
|
233
|
-
case 0:
|
|
234
|
-
text = 'This is standard text to translate: {{text}}. This is another one: {{text}}.\n' +
|
|
235
|
-
'There is an text with slash before, but escaped: \\\\{{text}}\n' +
|
|
236
|
-
'This is one with escaped prefix, to it shall not translate this one: \\{{aaa}}\n' +
|
|
237
|
-
'There is another text: {{text}}\n' +
|
|
238
|
-
'There are two texts to translate next to each other: {{text}}{{text}}. And after it text continues: {{text}}.\n' +
|
|
239
|
-
'This is an end, finally.\n';
|
|
240
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
241
|
-
case 1:
|
|
242
|
-
replaced = _a.sent();
|
|
243
|
-
expect(replaced.text).toEqual('This is standard text to translate: translated. This is another one: translated.\n' +
|
|
244
|
-
'There is an text with slash before, but escaped: \\translated\n' +
|
|
245
|
-
'This is one with escaped prefix, to it shall not translate this one: {{aaa}}\n' +
|
|
246
|
-
'There is another text: translated\n' +
|
|
247
|
-
'There are two texts to translate next to each other: translatedtranslated. And after it text continues: translated.\n' +
|
|
248
|
-
'This is an end, finally.\n');
|
|
249
|
-
return [2 /*return*/];
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
}); });
|
|
253
|
-
test('will translate correctly when the text begins with key', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
254
|
-
var text, replaced;
|
|
255
|
-
return __generator(this, function (_a) {
|
|
256
|
-
switch (_a.label) {
|
|
257
|
-
case 0:
|
|
258
|
-
text = '{{text}}, text continues';
|
|
259
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
260
|
-
case 1:
|
|
261
|
-
replaced = _a.sent();
|
|
262
|
-
expect(replaced.text).toEqual('translated, text continues');
|
|
263
|
-
return [2 /*return*/];
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
}); });
|
|
267
|
-
test('will not translate when there is nothing to translate', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
|
-
var text, replaced;
|
|
269
|
-
return __generator(this, function (_a) {
|
|
270
|
-
switch (_a.label) {
|
|
271
|
-
case 0:
|
|
272
|
-
text = '\\{{text}}, text continues';
|
|
273
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
274
|
-
case 1:
|
|
275
|
-
replaced = _a.sent();
|
|
276
|
-
expect(replaced).toEqual(undefined);
|
|
277
|
-
return [2 /*return*/];
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
}); });
|
|
281
|
-
test('will not translate when the text begins with escaped key', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
282
|
-
var text, replaced;
|
|
283
|
-
return __generator(this, function (_a) {
|
|
284
|
-
switch (_a.label) {
|
|
285
|
-
case 0:
|
|
286
|
-
text = '\\{{text}}, text continues {{other text}}';
|
|
287
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
288
|
-
case 1:
|
|
289
|
-
replaced = _a.sent();
|
|
290
|
-
expect(replaced.text).toEqual('{{text}}, text continues translated');
|
|
291
|
-
return [2 /*return*/];
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
}); });
|
|
295
|
-
test('will translate when the text begins with escaped escape character', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
296
|
-
var text, replaced;
|
|
297
|
-
return __generator(this, function (_a) {
|
|
298
|
-
switch (_a.label) {
|
|
299
|
-
case 0:
|
|
300
|
-
text = '\\\\{{text}}, text continues {{other text}}';
|
|
301
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
302
|
-
case 1:
|
|
303
|
-
replaced = _a.sent();
|
|
304
|
-
expect(replaced.text).toEqual('\\translated, text continues translated');
|
|
305
|
-
return [2 /*return*/];
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
}); });
|
|
309
|
-
test('will translate when the text begins with escaped escape character, what is escaped', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
310
|
-
var text, replaced;
|
|
311
|
-
return __generator(this, function (_a) {
|
|
312
|
-
switch (_a.label) {
|
|
313
|
-
case 0:
|
|
314
|
-
text = '\\\\\\{{text}}, text continues {{other text}}';
|
|
315
|
-
return [4 /*yield*/, textService.replace(text)];
|
|
316
|
-
case 1:
|
|
317
|
-
replaced = _a.sent();
|
|
318
|
-
expect(replaced.text).toEqual('\\\\{{text}}, text continues translated');
|
|
319
|
-
return [2 /*return*/];
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
}); });
|
|
323
|
-
});
|
|
324
|
-
describe('wrap function', function () {
|
|
325
|
-
test('will correctly wrap text without params', function () {
|
|
326
|
-
expect(textService.wrap('text')).toEqual('{{text}}');
|
|
327
|
-
});
|
|
328
|
-
test('will correctly wrap text with , and :', function () {
|
|
329
|
-
expect(textService.wrap('text, other text: yes!')).toEqual('{{text\\, other text\\: yes!}}');
|
|
330
|
-
});
|
|
331
|
-
test('will correctly wrap text with ,, : and \\', function () {
|
|
332
|
-
expect(textService.wrap('text, other text: \\ yes!')).toEqual('{{text\\, other text\\: \\\\ yes!}}');
|
|
333
|
-
});
|
|
334
|
-
test('will correctly wrap text with parameters', function () {
|
|
335
|
-
expect(textService.wrap('text', {
|
|
336
|
-
param1: 'the param value',
|
|
337
|
-
param2: '2nd value',
|
|
338
|
-
})).toEqual('{{text:param1:the param value,param2:2nd value}}');
|
|
339
|
-
});
|
|
340
|
-
test('will correctly wrap text with parameters containing : an ,', function () {
|
|
341
|
-
expect(textService.wrap('text', {
|
|
342
|
-
param1: 'the param value: value, value2 or value3',
|
|
343
|
-
param2: '2nd value',
|
|
344
|
-
})).toEqual('{{text:param1:the param value\\: value\\, value2 or value3,param2:2nd value}}');
|
|
345
|
-
});
|
|
346
|
-
test('it will correctly replace wrapped text', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
347
|
-
var wrapped, _a;
|
|
348
|
-
return __generator(this, function (_b) {
|
|
349
|
-
switch (_b.label) {
|
|
350
|
-
case 0:
|
|
351
|
-
getMockedInstance(TranslationService).getTranslation = jest.fn(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
352
|
-
return __generator(this, function (_a) {
|
|
353
|
-
return [2 /*return*/, 'xxx {param1} {param2} xxx'];
|
|
354
|
-
});
|
|
355
|
-
}); });
|
|
356
|
-
wrapped = textService.wrap('An longer key with some strange ,: ,: \\ characters', { param1: ',:,:', param2: '....\\...,' });
|
|
357
|
-
_a = expect;
|
|
358
|
-
return [4 /*yield*/, textService.replace(wrapped)];
|
|
359
|
-
case 1:
|
|
360
|
-
_a.apply(void 0, [(_b.sent()).text]).toEqual('xxx ,:,: ....\\..., xxx');
|
|
361
|
-
return [2 /*return*/];
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
}); });
|
|
365
|
-
test('will correctly convert param to string', function () {
|
|
366
|
-
var wrapped = textService.wrap('key', { param1: 1 });
|
|
367
|
-
expect(wrapped).toEqual('{{key:param1:1}}');
|
|
368
|
-
});
|
|
369
|
-
test('will correctly replace number parameters', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
370
|
-
var wrapped, _a;
|
|
371
|
-
return __generator(this, function (_b) {
|
|
372
|
-
switch (_b.label) {
|
|
373
|
-
case 0:
|
|
374
|
-
getMockedInstance(TranslationService).getTranslation = jest.fn(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
375
|
-
return __generator(this, function (_a) {
|
|
376
|
-
return [2 /*return*/, 'xxx {param1, number} {param2, number} xxx'];
|
|
377
|
-
});
|
|
378
|
-
}); });
|
|
379
|
-
wrapped = textService.wrap('key', { param1: 1, param2: 145.5 });
|
|
380
|
-
_a = expect;
|
|
381
|
-
return [4 /*yield*/, textService.replace(wrapped)];
|
|
382
|
-
case 1:
|
|
383
|
-
_a.apply(void 0, [(_b.sent()).text]).toEqual('xxx 1 145.5 xxx');
|
|
384
|
-
return [2 /*return*/];
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
|
-
}); });
|
|
388
|
-
test('correctly wraps default value', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
389
|
-
var wrapped;
|
|
390
|
-
return __generator(this, function (_a) {
|
|
391
|
-
switch (_a.label) {
|
|
392
|
-
case 0:
|
|
393
|
-
wrapped = textService.wrap('key', { param1: 1, param2: 'Yes,yes,yes:yes' }, 'Look: What a beautiful default\nvalue,' +
|
|
394
|
-
' translating will be such an experience.');
|
|
395
|
-
expect(wrapped).toEqual('{{key,Look\\: What a beautiful default\n' +
|
|
396
|
-
'value\\, translating will be such an experience.' +
|
|
397
|
-
':param1:1,param2:Yes\\,yes\\,yes\\:yes}}');
|
|
398
|
-
return [4 /*yield*/, textService.replace(wrapped)];
|
|
399
|
-
case 1:
|
|
400
|
-
_a.sent();
|
|
401
|
-
expect(getTranslationMock).toBeCalledWith('key', undefined, false, 'Look: What a beautiful default\nvalue, translating will be such an experience.');
|
|
402
|
-
return [2 /*return*/];
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
|
-
}); });
|
|
406
|
-
test('will correctly replace bigint parameter', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
407
|
-
var wrapped, _a;
|
|
408
|
-
return __generator(this, function (_b) {
|
|
409
|
-
switch (_b.label) {
|
|
410
|
-
case 0:
|
|
411
|
-
getMockedInstance(TranslationService).getTranslation = jest.fn(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
412
|
-
return __generator(this, function (_a) {
|
|
413
|
-
return [2 /*return*/, 'xxx {param1, number} {param2, number} xxx'];
|
|
414
|
-
});
|
|
415
|
-
}); });
|
|
416
|
-
wrapped = textService.wrap('key', {
|
|
417
|
-
param1: 1,
|
|
418
|
-
param2: BigInt(129374),
|
|
419
|
-
});
|
|
420
|
-
_a = expect;
|
|
421
|
-
return [4 /*yield*/, textService.replace(wrapped)];
|
|
422
|
-
case 1:
|
|
423
|
-
_a.apply(void 0, [(_b.sent()).text]).toEqual('xxx 1 129,374 xxx');
|
|
424
|
-
return [2 /*return*/];
|
|
425
|
-
}
|
|
426
|
-
});
|
|
427
|
-
}); });
|
|
428
|
-
});
|
|
429
|
-
});
|
|
430
|
-
//# sourceMappingURL=TextService.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextService.test.js","sourceRoot":"","sources":["../../src/services/TextService.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AAC/B,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;AACvC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAQ,CAAC,aAAa,EAAE;IACtB,IAAI,uBAAuB,GAAG,EAAE,CAAC;IACjC,IAAM,M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