-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpackage.json
541 lines (541 loc) · 24.2 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
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
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
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
534
535
536
537
538
539
540
541
{
"name": "xliff-sync",
"displayName": "XLIFF Sync",
"description": "A tool to keep XLIFF translation files in sync.",
"version": "1.5.0",
"publisher": "rvanbekkum",
"repository": {
"type": "git",
"url": "https://github.com/rvanbekkum/vsc-xliff-sync"
},
"bugs": {
"url": "https://github.com/rvanbekkum/vsc-xliff-sync/issues"
},
"homepage": "https://github.com/rvanbekkum/vsc-xliff-sync/blob/master/README.md",
"license": "MIT",
"icon": "resources/xliffSync_logo.png",
"keywords": [
"xliff",
"localization",
"translation",
"al"
],
"galleryBanner": {
"color": "#272729",
"theme": "dark"
},
"engines": {
"vscode": "^1.75.0"
},
"categories": [
"Other"
],
"main": "./out/extension",
"activationEvents": [
"workspaceContains:**/*.xlf",
"workspaceContains:**/*.xlf2"
],
"contributes": {
"configuration": {
"title": "XLIFF Sync",
"properties": {
"xliffSync.baseFile": {
"type": "string",
"default": ".g.xlf",
"description": "Specifies the base XLIFF translation file.",
"scope": "resource"
},
"xliffSync.fileType": {
"type": "string",
"default": "xlf",
"description": "Specifies the translation files' type (xlf, xlf2).",
"enum": [
"xlf",
"xlf2"
],
"scope": "resource"
},
"xliffSync.syncCrossWorkspaceFolders": {
"type": "boolean",
"default": false,
"description": "Specifies whether the extension will sync from a base file to the translation files in all workspace folders.",
"scope": "window"
},
"xliffSync.matchingOriginalOnly": {
"type": "boolean",
"default": true,
"description": "Specifies whether the extension will sync only to files where the original-attribute is matching.",
"scope": "resource"
},
"xliffSync.unitMaps": {
"type": "string",
"default": "All",
"description": "Specifies for which search purposes this command should create in-memory maps in preparation of syncing.",
"enum": [
"None",
"Id",
"All"
],
"enumDescriptions": [
"Do not use in-memory maps.",
"Only use an in-memory map for finding units by ID.",
"Use in-memory maps for all search purposes."
],
"scope": "resource"
},
"xliffSync.findByXliffGeneratorNoteAndSource": {
"type": "boolean",
"default": true,
"description": "Specifies whether or not the extension will try to find translation units by XLIFF generator note and source.",
"scope": "resource"
},
"xliffSync.findByXliffGeneratorAndDeveloperNote": {
"type": "boolean",
"default": true,
"description": "Specifies whether or not the extension will try to find translation units by XLIFF generator note and developer note.",
"scope": "resource"
},
"xliffSync.findByXliffGeneratorNote": {
"type": "boolean",
"default": true,
"description": "Specifies whether or not the extension will try to find translation units by XLIFF generator note.",
"scope": "resource"
},
"xliffSync.findBySourceAndDeveloperNote": {
"type": "boolean",
"default": false,
"description": "Specifies whether or not the extension will try to find trans-units by source and developer note.",
"scope": "resource"
},
"xliffSync.findBySource": {
"type": "boolean",
"default": false,
"description": "Specifies whether or not the extension will try to find translation units by source.",
"scope": "resource"
},
"xliffSync.parseFromDeveloperNote": {
"type": "boolean",
"default": false,
"description": "Specifies whether translations should be parsed from the developer note.",
"scope": "resource"
},
"xliffSync.parseFromDeveloperNoteOverwrite": {
"type": "boolean",
"default": false,
"description": "Specifies whether translations parsed from the developer note should always overwrite existing translations.",
"scope": "resource"
},
"xliffSync.parseFromDeveloperNoteSeparator": {
"type": "string",
"default": "|",
"description": "Specifies the separator that is used when translations are parsed from the developer note.",
"scope": "resource"
},
"xliffSync.parseFromDeveloperNoteTrimCharacters": {
"type": "string",
"default": "",
"description": "Specifies the characters that will be trimmed from the translation.",
"scope": "resource"
},
"xliffSync.equivalentLanguages": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"default": {
"de-DE": "de-.*",
"en-US": "en-.*",
"es-ES": "es-.*",
"fr-FR": "fr-.*",
"nl-NL": "nl-.*"
},
"description": "Specifies master and slave languages that should be treated as equivalent, i.e., translations are copied from the master language.",
"scope": "resource"
},
"xliffSync.equivalentLanguagesEnabled": {
"type": "boolean",
"default": false,
"description": "Specifies whether languages should be treated as equivalent as specified in the xliffSync.equivalentLanguages setting.",
"scope": "resource"
},
"xliffSync.copyFromSourceForLanguages": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"uniqueItems": true,
"description": "Specifies the languages for which translations should be copied from the source text of trans-units.",
"scope": "resource"
},
"xliffSync.copyFromSourceForSameLanguage": {
"type": "boolean",
"default": false,
"description": "Specifies whether translations should be copied from the source text if source-language = target-language.",
"scope": "resource"
},
"xliffSync.copyFromSourceOverwrite": {
"type": "boolean",
"default": false,
"description": "Specifies whether translations copied from the source text should overwrite existing translations.",
"scope": "resource"
},
"xliffSync.detectSourceTextChanges": {
"type": "boolean",
"default": true,
"description": "Specifies whether changes in the source text of a trans-unit should be detected. If a change is detected, the target state is changed to needs-adaptation and a note is added to indicate the translation should be reviewed.",
"scope": "resource"
},
"xliffSync.ignoreLineEndingTypeChanges": {
"type": "boolean",
"default": false,
"description": "Specifies whether changes in line ending type (CRLF vs. LF) should not be considered as changes to the source text of a trans-unit.",
"scope": "resource"
},
"xliffSync.clearTranslationAfterSourceTextChange": {
"type": "boolean",
"default": false,
"description": "Specifies whether translations should be cleared when the source text of a trans-unit changed.",
"scope": "resource"
},
"xliffSync.addNeedsWorkTranslationNote": {
"type": "boolean",
"default": true,
"description": "Specifies whether an XLIFF Sync note should be added to explain why a trans-unit was marked as needs-work.",
"scope": "resource"
},
"xliffSync.useSelfClosingTags": {
"type": "boolean",
"default": true,
"description": "Specifies whether the XML tags in the XLIFF target files should be self-closing tags. (i.e., `<note></note>` vs. `<note/>`)",
"scope": "resource"
},
"xliffSync.keepEditorOpenAfterSync": {
"type": "boolean",
"default": true,
"description": "Specifies whether XLIFF files should be opened in the editor after syncing.",
"scope": "resource"
},
"xliffSync.openExternallyAfterEvent": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Check",
"ProblemDetected",
"Sync"
],
"enumDescriptions": [
"Open automatically after checking for missing translations or translation that needs work.",
"Open automatically after a problem (missing translation or translation that needs work) was detected.",
"Open automatically after syncing with the base translation file."
]
},
"default": [],
"uniqueItems": true,
"description": "Specifies after which event translation files should be opened automatically with the default XLIFF editor",
"scope": "resource"
},
"xliffSync.missingTranslation": {
"type": "string",
"default": "%EMPTY%",
"description": "Target tag content for missing translation (use %EMPTY% to leave new targets empty).",
"scope": "resource"
},
"xliffSync.needsWorkTranslationSubstate": {
"type": "string",
"default": "xliffSync:needsWork",
"description": "Specifies the substate to use for translations that need work in xlf2 files.",
"scope": "resource"
},
"xliffSync.developerNoteDesignation": {
"type": "string",
"default": "Developer",
"description": "Specifies the name that is used to designate a developer note.",
"scope": "resource"
},
"xliffSync.xliffGeneratorNoteDesignation": {
"type": "string",
"default": "Xliff Generator",
"description": "Specifies the name that is used to designate a XLIFF generator note.",
"scope": "resource"
},
"xliffSync.autoCheckMissingTranslations": {
"type": "boolean",
"default": false,
"description": "Specifies whether or not the extension should automatically check for missing translations after syncing.",
"scope": "resource"
},
"xliffSync.autoCheckNeedWorkTranslations": {
"type": "boolean",
"default": false,
"description": "Specifies whether or not the extension should automatically run a technical validation on translations after syncing.",
"scope": "resource"
},
"xliffSync.needWorkTranslationRules": {
"type": "array",
"items": {
"type": "string",
"enum": [
"ConsecutiveSpacesConsistent",
"ConsecutiveSpacesExist",
"OptionMemberCount",
"OptionLeadingSpaces",
"Placeholders",
"PlaceholdersDevNote",
"SourceEqualsTarget"
],
"enumDescriptions": [
"Checks that the 'consecutive space'-occurrences match.",
"Checks whether consecutive spaces exist in the source or translation text.",
"Checks that the number of members of the OptionCaption or PromotedActionCategories property match.",
"Checks that the leading spaces of members of the OptionCaption or PromotedActionCategories property match.",
"Checks that the number of placeholders match.",
"Checks that the meaning of placeholders are explained in the Developer note.",
"Checks that the source and target are the same for files with target language for which translations are copied from the source text."
]
},
"default": [
"OptionMemberCount",
"OptionLeadingSpaces",
"Placeholders"
],
"uniqueItems": true,
"description": "Specifies which technical validation rules should be used.",
"scope": "resource"
},
"xliffSync.needWorkTranslationRulesEnableAll": {
"type": "boolean",
"default": false,
"description": "Specifies whether or not all available technical validation rules should be used. Enabling this setting makes xliffSync.needWorkTranslationRules redundant.",
"scope": "resource"
},
"xliffSync.preserveTargetAttributes": {
"type": "boolean",
"default": false,
"description": "Specifies whether or not syncing should use the attributes from the target files for the trans-unit nodes while syncing.",
"scope": "resource"
},
"xliffSync.preserveTargetAttributesOrder": {
"type": "boolean",
"default": false,
"description": "Specifies whether the attributes of trans-unit nodes should use the order found in the target files while syncing.",
"scope": "resource"
},
"xliffSync.preserveTargetChildNodes": {
"type": "boolean",
"default": false,
"description": "Specifies whether translation-specific child nodes of trans-units in the target files should be preserved.",
"scope": "resource"
},
"xliffSync.replaceTranslationsDuringImport": {
"type": "boolean",
"default": false,
"description": "Specifies whether existing translations will be replaced when the XLIFF: Import Translations from File(s) command is run.",
"scope": "resource"
},
"xliffSync.decorationEnabled": {
"type": "boolean",
"default": true,
"description": "Specifies whether decorations for missing translations and translations that need work should be applied."
},
"xliffSync.decorationTargetTextOnly": {
"type": "boolean",
"default": false,
"description": "Specifies whether decorations for missing translations and translations that need work should only be applied to the target text."
},
"xliffSync.decoration": {
"type": "object",
"default": {
"backgroundColor": "rgba(240, 210, 105, 0.35)",
"overviewRulerColor": "rgba(240, 210, 105, 0.35)",
"border": "1px solid white",
"borderRadius": "4px"
},
"description": "Decoration for missing translations and translations that need work."
},
"xliffSync.enableSnippetsForLanguages": {
"type": "array",
"items": {
"type": "string",
"enum": [
"al"
],
"enumDescriptions": [
"AL"
]
},
"default": [],
"uniqueItems": true,
"description": "Specifies the programming languages for which the XLIFF Sync snippets should be enabled.",
"scope": "resource"
},
"xliffSync.snippetTargetLanguage": {
"type": "string",
"default": "TargetLanguageCode",
"description": "Specifies which target language to use by default in the XLIFF Sync snippets.",
"scope": "resource"
},
"xliffSync.defaultLanguages": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
"en-US",
"de-DE"
],
"default": [],
"uniqueItems": true,
"description": "Specifies the languages that should automatically be used for the translation file generation. \nExamples: \"en-US\", \"de-DE\".",
"order": 0,
"scope": "resource"
},
"xliffSync.buildCommandToExecute": {
"type": "string",
"default": "al.package",
"description": "Specifies the build command to execute when building with translations.",
"order": 1,
"scope": "resource"
}
}
},
"commands": [
{
"command": "xliffSync.createNewTargetFiles",
"title": "Create New Target File(s)",
"category": "XLIFF"
},
{
"command": "xliffSync.synchronizeFile",
"title": "Synchronize to Single File",
"category": "XLIFF"
},
{
"command": "xliffSync.synchronizeSources",
"title": "Synchronize Translation Units",
"category": "XLIFF"
},
{
"command": "xliffSync.findNextMissingTarget",
"title": "Next Missing Translation",
"category": "XLIFF"
},
{
"command": "xliffSync.findNextNeedsWorkTarget",
"title": "Next Needs Work Translation",
"category": "XLIFF"
},
{
"command": "xliffSync.checkForMissingTranslations",
"title": "Check for Missing Translations",
"category": "XLIFF"
},
{
"command": "xliffSync.checkForNeedWorkTranslations",
"title": "Check for Need Work Translations",
"category": "XLIFF"
},
{
"command": "xliffSync.importTranslationsFromFiles",
"title": "Import Translations from File(s)",
"category": "XLIFF"
},
{
"command": "xliffSync.buildWithTranslations",
"title": "Build with Translations",
"category": "XLIFF"
}
],
"keybindings": [
{
"command": "xliffSync.synchronizeFile",
"key": "alt+x s"
},
{
"command": "xliffSync.synchronizeSources",
"key": "alt+x m"
},
{
"command": "xliffSync.findNextMissingTarget",
"key": "alt+x n",
"when": "resourceExtname == .xlf"
},
{
"command": "xliffSync.findNextNeedsWorkTarget",
"key": "alt+x w",
"when": "resourceExtname == .xlf"
},
{
"command": "xliffSync.buildWithTranslations",
"key": "ctrl+shift+t",
"when": "workspaceFolderCount > 0"
}
],
"menus": {
"touchBar": [
{
"command": "xliffSync.synchronizeFile",
"group": "editing",
"when": "resourceExtname == .xlf"
},
{
"command": "xliffSync.findNextMissingTarget",
"group": "editing",
"when": "resourceExtname == .xlf"
},
{
"command": "xliffSync.findNextNeedsWorkTarget",
"group": "editing",
"when": "resourceExtname == .xlf"
}
],
"commandPalette": [
{
"command": "xliffSync.findNextMissingTarget",
"when": "resourceExtname == .xlf"
},
{
"command": "xliffSync.findNextNeedsWorkTarget",
"when": "resourceExtname == .xlf"
}
],
"explorer/context": [
{
"command": "xliffSync.synchronizeSources",
"group": "navigation",
"when": "resourceExtname == .xlf"
}
]
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"test": "npm run compile && node ./node_modules/vscode/bin/test"
},
"devDependencies": {
"@types/vscode": "^1.47.0",
"@types/mocha": "^7.0.2",
"@types/node": "^13.11.0",
"@types/sax": "^1.0.0",
"@types/xml2js": "^0.4.2",
"@types/xml2json": "^0.10.0",
"@types/xmlbuilder": "0.0.32",
"tslint": "^5.8.0",
"typescript": "^4.0.0"
},
"prettier": {
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always"
},
"dependencies": {
"open": "^8.2.0",
"sax": "^1.2.4",
"xml2js": "^0.4.19",
"xmlbuilder": "^9.0.7"
}
}