@codingame/monaco-vscode-language-detection-worker-service-override 7.1.0 → 7.1.1
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-language-detection-worker-service-override",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"vscode": "npm:@codingame/monaco-vscode-api@7.1.
|
|
32
|
+
"vscode": "npm:@codingame/monaco-vscode-api@7.1.1",
|
|
33
33
|
"@vscode/vscode-languagedetection": "npm:@codingame/vscode-languagedetection@1.0.23"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/vscode/src/vs/workbench/contrib/languageDetection/browser/languageDetection.contribution.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
3
|
import { getCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
4
|
-
import {
|
|
4
|
+
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
5
5
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
6
6
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
7
7
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -24,7 +24,6 @@ import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
|
24
24
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
25
25
|
|
|
26
26
|
var LanguageDetectionStatusContribution_1;
|
|
27
|
-
const _moduleId = "vs/workbench/contrib/languageDetection/browser/languageDetection.contribution";
|
|
28
27
|
const detectLanguageCommandId = 'editor.detectLanguage';
|
|
29
28
|
let LanguageDetectionStatusContribution = class LanguageDetectionStatusContribution {
|
|
30
29
|
static { LanguageDetectionStatusContribution_1 = this; }
|
|
@@ -76,15 +75,15 @@ let LanguageDetectionStatusContribution = class LanguageDetectionStatusContribut
|
|
|
76
75
|
const existing = editorModel.getLanguageId();
|
|
77
76
|
if (lang && lang !== existing && skip[existing] !== lang) {
|
|
78
77
|
const detectedName = this._languageService.getLanguageName(lang) || lang;
|
|
79
|
-
let tooltip = (
|
|
78
|
+
let tooltip = ( localize(2133, "Accept Detected Language: {0}", detectedName));
|
|
80
79
|
const keybinding = this._keybindingService.lookupKeybinding(detectLanguageCommandId);
|
|
81
80
|
const label = keybinding?.getLabel();
|
|
82
81
|
if (label) {
|
|
83
82
|
tooltip += ` (${label})`;
|
|
84
83
|
}
|
|
85
84
|
const props = {
|
|
86
|
-
name: (
|
|
87
|
-
ariaLabel: (
|
|
85
|
+
name: ( localize(2134, "Language Detection")),
|
|
86
|
+
ariaLabel: ( localize(2135, "Change to Detected Language: {0}", lang)),
|
|
88
87
|
tooltip,
|
|
89
88
|
command: detectLanguageCommandId,
|
|
90
89
|
text: '$(lightbulb-autofix)',
|
|
@@ -116,7 +115,7 @@ registerAction2(class extends Action2 {
|
|
|
116
115
|
constructor() {
|
|
117
116
|
super({
|
|
118
117
|
id: detectLanguageCommandId,
|
|
119
|
-
title: (
|
|
118
|
+
title: ( localize2(2136, "Detect Language from Content")),
|
|
120
119
|
f1: true,
|
|
121
120
|
precondition: ( (ContextKeyExpr.and(
|
|
122
121
|
(NOTEBOOK_EDITOR_EDITABLE.toNegated()),
|
|
@@ -137,7 +136,7 @@ registerAction2(class extends Action2 {
|
|
|
137
136
|
editor.getModel()?.setLanguage(lang, LanguageDetectionLanguageEventSource);
|
|
138
137
|
}
|
|
139
138
|
else {
|
|
140
|
-
notificationService.warn((
|
|
139
|
+
notificationService.warn(( localize(2137, "Unable to detect editor language")));
|
|
141
140
|
}
|
|
142
141
|
}
|
|
143
142
|
}
|