@codingame/monaco-vscode-localization-service-override 8.0.0 → 8.0.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-localization-service-override",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@8.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@8.0.2"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -16,7 +16,7 @@ class BaseLocalizationWorkbenchContribution extends Disposable {
|
|
|
16
16
|
extensionPoint: 'localizations',
|
|
17
17
|
defaultExtensionKind: ['ui', 'workspace'],
|
|
18
18
|
jsonSchema: {
|
|
19
|
-
description: ( localize(
|
|
19
|
+
description: ( localize(7586, "Contributes localizations to the editor")),
|
|
20
20
|
type: 'array',
|
|
21
21
|
default: [],
|
|
22
22
|
items: {
|
|
@@ -25,19 +25,19 @@ class BaseLocalizationWorkbenchContribution extends Disposable {
|
|
|
25
25
|
defaultSnippets: [{ body: { languageId: '', languageName: '', localizedLanguageName: '', translations: [{ id: 'vscode', path: '' }] } }],
|
|
26
26
|
properties: {
|
|
27
27
|
languageId: {
|
|
28
|
-
description: ( localize(
|
|
28
|
+
description: ( localize(7587, 'Id of the language into which the display strings are translated.')),
|
|
29
29
|
type: 'string'
|
|
30
30
|
},
|
|
31
31
|
languageName: {
|
|
32
|
-
description: ( localize(
|
|
32
|
+
description: ( localize(7588, 'Name of the language in English.')),
|
|
33
33
|
type: 'string'
|
|
34
34
|
},
|
|
35
35
|
localizedLanguageName: {
|
|
36
|
-
description: ( localize(
|
|
36
|
+
description: ( localize(7589, 'Name of the language in contributed language.')),
|
|
37
37
|
type: 'string'
|
|
38
38
|
},
|
|
39
39
|
translations: {
|
|
40
|
-
description: ( localize(
|
|
40
|
+
description: ( localize(7590, 'List of translations associated to the language.')),
|
|
41
41
|
type: 'array',
|
|
42
42
|
default: [{ id: 'vscode', path: '' }],
|
|
43
43
|
items: {
|
|
@@ -47,19 +47,19 @@ class BaseLocalizationWorkbenchContribution extends Disposable {
|
|
|
47
47
|
id: {
|
|
48
48
|
type: 'string',
|
|
49
49
|
description: ( localize(
|
|
50
|
-
|
|
50
|
+
7591,
|
|
51
51
|
"Id of VS Code or Extension for which this translation is contributed to. Id of VS Code is always `vscode` and of extension should be in format `publisherId.extensionName`."
|
|
52
52
|
)),
|
|
53
53
|
pattern: '^((vscode)|([a-z0-9A-Z][a-z0-9A-Z-]*)\\.([a-z0-9A-Z][a-z0-9A-Z-]*))$',
|
|
54
54
|
patternErrorMessage: ( localize(
|
|
55
|
-
|
|
55
|
+
7592,
|
|
56
56
|
"Id should be `vscode` or in format `publisherId.extensionName` for translating VS code or an extension respectively."
|
|
57
57
|
))
|
|
58
58
|
},
|
|
59
59
|
path: {
|
|
60
60
|
type: 'string',
|
|
61
61
|
description: ( localize(
|
|
62
|
-
|
|
62
|
+
7593,
|
|
63
63
|
"A relative path to a file containing translations for the language."
|
|
64
64
|
))
|
|
65
65
|
}
|
|
@@ -87,9 +87,9 @@ class LocalizationsDataRenderer extends Disposable {
|
|
|
87
87
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
88
88
|
}
|
|
89
89
|
const headers = [
|
|
90
|
-
( localize(
|
|
91
|
-
( localize(
|
|
92
|
-
( localize(
|
|
90
|
+
( localize(7594, "Language ID")),
|
|
91
|
+
( localize(7595, "Language Name")),
|
|
92
|
+
( localize(7596, "Language Name (Localized)")),
|
|
93
93
|
];
|
|
94
94
|
const rows = ( (localizations
|
|
95
95
|
.sort((a, b) => a.languageId.localeCompare(b.languageId))
|
|
@@ -111,7 +111,7 @@ class LocalizationsDataRenderer extends Disposable {
|
|
|
111
111
|
}
|
|
112
112
|
( (Registry.as(Extensions.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
113
113
|
id: 'localizations',
|
|
114
|
-
label: ( localize(
|
|
114
|
+
label: ( localize(7597, "Langauage Packs")),
|
|
115
115
|
access: {
|
|
116
116
|
canToggle: false
|
|
117
117
|
},
|
|
@@ -12,13 +12,13 @@ class ConfigureDisplayLanguageAction extends Action2 {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super({
|
|
14
14
|
id: ConfigureDisplayLanguageAction.ID,
|
|
15
|
-
title: ( localize2(
|
|
15
|
+
title: ( localize2(10615, "Configure Display Language")),
|
|
16
16
|
menu: {
|
|
17
17
|
id: MenuId.CommandPalette
|
|
18
18
|
},
|
|
19
19
|
metadata: {
|
|
20
20
|
description: ( localize2(
|
|
21
|
-
|
|
21
|
+
10616,
|
|
22
22
|
"Changes the locale of VS Code based on installed language packs. Common languages include French, Chinese, Spanish, Japanese, German, Korean, and more."
|
|
23
23
|
))
|
|
24
24
|
}
|
|
@@ -32,9 +32,9 @@ class ConfigureDisplayLanguageAction extends Action2 {
|
|
|
32
32
|
const installedLanguages = await languagePackService.getInstalledLanguages();
|
|
33
33
|
const qp = quickInputService.createQuickPick();
|
|
34
34
|
qp.matchOnDescription = true;
|
|
35
|
-
qp.placeholder = ( localize(
|
|
35
|
+
qp.placeholder = ( localize(10617, "Select Display Language"));
|
|
36
36
|
if (installedLanguages?.length) {
|
|
37
|
-
const items = [{ type: 'separator', label: ( localize(
|
|
37
|
+
const items = [{ type: 'separator', label: ( localize(10618, "Installed")) }];
|
|
38
38
|
qp.items = items.concat(this.withMoreInfoButton(installedLanguages));
|
|
39
39
|
}
|
|
40
40
|
const disposables = ( (new DisposableStore()));
|
|
@@ -49,7 +49,7 @@ class ConfigureDisplayLanguageAction extends Action2 {
|
|
|
49
49
|
if (newLanguages.length) {
|
|
50
50
|
qp.items = [
|
|
51
51
|
...qp.items,
|
|
52
|
-
{ type: 'separator', label: ( localize(
|
|
52
|
+
{ type: 'separator', label: ( localize(10619, "Available")) },
|
|
53
53
|
...this.withMoreInfoButton(newLanguages)
|
|
54
54
|
];
|
|
55
55
|
}
|
|
@@ -75,7 +75,7 @@ class ConfigureDisplayLanguageAction extends Action2 {
|
|
|
75
75
|
for (const item of items) {
|
|
76
76
|
if (item.extensionId) {
|
|
77
77
|
item.buttons = [{
|
|
78
|
-
tooltip: ( localize(
|
|
78
|
+
tooltip: ( localize(10620, "More Info")),
|
|
79
79
|
iconClass: 'codicon-info'
|
|
80
80
|
}];
|
|
81
81
|
}
|
|
@@ -85,7 +85,7 @@ class ConfigureDisplayLanguageAction extends Action2 {
|
|
|
85
85
|
}
|
|
86
86
|
class ClearDisplayLanguageAction extends Action2 {
|
|
87
87
|
static { this.ID = 'workbench.action.clearLocalePreference'; }
|
|
88
|
-
static { this.LABEL = ( localize2(
|
|
88
|
+
static { this.LABEL = ( localize2(10621, "Clear Display Language Preference")); }
|
|
89
89
|
constructor() {
|
|
90
90
|
super({
|
|
91
91
|
id: ClearDisplayLanguageAction.ID,
|
|
@@ -68,16 +68,16 @@ let AbstractLocaleService = class AbstractLocaleService {
|
|
|
68
68
|
const restartDialog = await this.dialogService.confirm({
|
|
69
69
|
type: 'info',
|
|
70
70
|
message: ( localize(
|
|
71
|
-
|
|
71
|
+
3256,
|
|
72
72
|
"To change the display language, {0} needs to reload",
|
|
73
73
|
this.productService.nameLong
|
|
74
74
|
)),
|
|
75
75
|
detail: ( localize(
|
|
76
|
-
|
|
76
|
+
3257,
|
|
77
77
|
"Press the reload button to refresh the page and set the display language to {0}.",
|
|
78
78
|
languagePackItem.label
|
|
79
79
|
)),
|
|
80
|
-
primaryButton: ( localize(
|
|
80
|
+
primaryButton: ( localize(3258, "&&Reload")),
|
|
81
81
|
});
|
|
82
82
|
if (restartDialog.confirmed) {
|
|
83
83
|
this.hostService.restart();
|
|
@@ -91,15 +91,15 @@ let AbstractLocaleService = class AbstractLocaleService {
|
|
|
91
91
|
const restartDialog = await this.dialogService.confirm({
|
|
92
92
|
type: 'info',
|
|
93
93
|
message: ( localize(
|
|
94
|
-
|
|
94
|
+
3259,
|
|
95
95
|
"To change the display language, {0} needs to reload",
|
|
96
96
|
this.productService.nameLong
|
|
97
97
|
)),
|
|
98
98
|
detail: ( localize(
|
|
99
|
-
|
|
99
|
+
3260,
|
|
100
100
|
"Press the reload button to refresh the page and use your browser's language."
|
|
101
101
|
)),
|
|
102
|
-
primaryButton: ( localize(
|
|
102
|
+
primaryButton: ( localize(3258, "&&Reload")),
|
|
103
103
|
});
|
|
104
104
|
if (restartDialog.confirmed) {
|
|
105
105
|
this.hostService.restart();
|