@opensumi/ide-electron-basic 2.22.9 → 2.22.10-rc-1678885769.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/lib/browser/electron-preference.contribution.d.ts +7 -0
- package/lib/browser/electron-preference.contribution.d.ts.map +1 -0
- package/lib/browser/electron-preference.contribution.js +25 -0
- package/lib/browser/electron-preference.contribution.js.map +1 -0
- package/lib/browser/header/header.service.d.ts +5 -7
- package/lib/browser/header/header.service.d.ts.map +1 -1
- package/lib/browser/header/header.service.js +5 -5
- package/lib/browser/header/header.service.js.map +1 -1
- package/lib/browser/index.d.ts +1 -0
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +3 -0
- package/lib/browser/index.js.map +1 -1
- package/lib/common/header.d.ts +1 -1
- package/lib/common/i18n/en-US.lang.d.ts +9 -0
- package/lib/common/i18n/en-US.lang.d.ts.map +1 -0
- package/lib/common/i18n/en-US.lang.js +28 -0
- package/lib/common/i18n/en-US.lang.js.map +1 -0
- package/lib/common/i18n/setup.d.ts +2 -0
- package/lib/common/i18n/setup.d.ts.map +1 -0
- package/lib/common/i18n/setup.js +8 -0
- package/lib/common/i18n/setup.js.map +1 -0
- package/lib/common/i18n/zh-CN.lang.d.ts +9 -0
- package/lib/common/i18n/zh-CN.lang.d.ts.map +1 -0
- package/lib/common/i18n/zh-CN.lang.js +28 -0
- package/lib/common/i18n/zh-CN.lang.js.map +1 -0
- package/package.json +10 -10
- package/src/browser/electron-preference.contribution.ts +18 -0
- package/src/browser/header/header.service.ts +7 -6
- package/src/browser/index.ts +4 -0
- package/src/common/header.ts +1 -1
- package/src/common/i18n/en-US.lang.ts +24 -0
- package/src/common/i18n/setup.ts +7 -0
- package/src/common/i18n/zh-CN.lang.ts +24 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PreferenceSchema, PreferenceContribution } from '@opensumi/ide-core-browser';
|
|
2
|
+
export declare const electronPreferencesSchema: PreferenceSchema;
|
|
3
|
+
export declare const ElectronPreferences: unique symbol;
|
|
4
|
+
export declare class ElectronPreferenceContribution implements PreferenceContribution {
|
|
5
|
+
schema: PreferenceSchema;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=electron-preference.contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electron-preference.contribution.d.ts","sourceRoot":"","sources":["../../src/browser/electron-preference.contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAoB,MAAM,4BAA4B,CAAC;AAExG,eAAO,MAAM,yBAAyB,EAAE,gBAQvC,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AAEjE,qBACa,8BAA+B,YAAW,sBAAsB;IAC3E,MAAM,EAAE,gBAAgB,CAA6B;CACtD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ElectronPreferenceContribution = exports.ElectronPreferences = exports.electronPreferencesSchema = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const ide_core_browser_1 = require("@opensumi/ide-core-browser");
|
|
6
|
+
exports.electronPreferencesSchema = {
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {
|
|
9
|
+
'window.title': {
|
|
10
|
+
type: 'string',
|
|
11
|
+
description: (0, ide_core_browser_1.localize)('window.title'),
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
exports.ElectronPreferences = Symbol('ElectronPreferences');
|
|
16
|
+
let ElectronPreferenceContribution = class ElectronPreferenceContribution {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.schema = exports.electronPreferencesSchema;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
ElectronPreferenceContribution = tslib_1.__decorate([
|
|
22
|
+
(0, ide_core_browser_1.Domain)(ide_core_browser_1.PreferenceContribution)
|
|
23
|
+
], ElectronPreferenceContribution);
|
|
24
|
+
exports.ElectronPreferenceContribution = ElectronPreferenceContribution;
|
|
25
|
+
//# sourceMappingURL=electron-preference.contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electron-preference.contribution.js","sourceRoot":"","sources":["../../src/browser/electron-preference.contribution.ts"],"names":[],"mappings":";;;;AAAA,iEAAwG;AAE3F,QAAA,yBAAyB,GAAqB;IACzD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,IAAA,2BAAQ,EAAC,cAAc,CAAC;SACtC;KACF;CACF,CAAC;AAEW,QAAA,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAG1D,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAApC;QACL,WAAM,GAAqB,iCAAyB,CAAC;IACvD,CAAC;CAAA,CAAA;AAFY,8BAA8B;IAD1C,IAAA,yBAAM,EAAC,yCAAsB,CAAC;GAClB,8BAA8B,CAE1C;AAFY,wEAA8B"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AppConfig, DisposableCollection, WithEventBus } from '@opensumi/ide-core-browser';
|
|
3
|
-
import { ResourceDidUpdateEvent, WorkbenchEditorService } from '@opensumi/ide-editor/lib/browser';
|
|
1
|
+
import { DisposableCollection, WithEventBus } from '@opensumi/ide-core-browser';
|
|
4
2
|
import { IElectronHeaderService } from '../../common/header';
|
|
5
3
|
export declare const TITLE_DIRTY = "\u25CF ";
|
|
6
4
|
export declare const SEPARATOR = " - ";
|
|
7
5
|
export declare let DEFAULT_TEMPLATE: string;
|
|
8
6
|
export declare class ElectronHeaderService extends WithEventBus implements IElectronHeaderService {
|
|
9
7
|
disposableCollection: DisposableCollection;
|
|
10
|
-
editorService
|
|
11
|
-
|
|
12
|
-
appConfig
|
|
8
|
+
private readonly editorService;
|
|
9
|
+
private readonly preferenceService;
|
|
10
|
+
private readonly appConfig;
|
|
13
11
|
private _onTitleChanged;
|
|
14
12
|
onTitleChanged: import("@opensumi/ide-core-browser").Event<string>;
|
|
15
13
|
private _appTitle;
|
|
@@ -20,7 +18,7 @@ export declare class ElectronHeaderService extends WithEventBus implements IElec
|
|
|
20
18
|
private _templateVariables;
|
|
21
19
|
setTemplateVariables(key: string, value: string | undefined): void;
|
|
22
20
|
constructor();
|
|
23
|
-
onResourceDidUpdateEvent(
|
|
21
|
+
onResourceDidUpdateEvent(): void;
|
|
24
22
|
updateAppTitle(): void;
|
|
25
23
|
get appTitle(): string;
|
|
26
24
|
formatAppTitle(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.service.d.ts","sourceRoot":"","sources":["../../../src/browser/header/header.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"header.service.d.ts","sourceRoot":"","sources":["../../../src/browser/header/header.service.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,oBAAoB,EAGpB,YAAY,EAEb,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,eAAO,MAAM,WAAW,YAAY,CAAC;AACrC,eAAO,MAAM,SAAS,QAAQ,CAAC;AAE/B,eAAO,IAAI,gBAAgB,QAAwD,CAAC;AAMpF,qBACa,qBAAsB,SAAQ,YAAa,YAAW,sBAAsB;IACvF,oBAAoB,uBAA8B;IAGlD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAyB;IAGvD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;IAGtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IAEtC,OAAO,CAAC,eAAe,CAAyB;IAChD,cAAc,qDAA8B;IAE5C,OAAO,CAAC,SAAS,CAAS;IAE1B,SAAS,SAAa;IAEtB,OAAO,CAAC,cAAc,CAAoB;IAC1C,IAAI,aAAa,IAIQ,MAAM,CAF9B;IAED,IAAI,aAAa,CAAC,KAAK,EAAE,MAAM,EAG9B;IAED,OAAO,CAAC,kBAAkB,CAA4C;IACtE,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;;IAc3D,wBAAwB;IAIxB,cAAc;IAId,IAAI,QAAQ,WAcX;IAED,cAAc;IAqDd,OAAO;CAGR"}
|
|
@@ -37,7 +37,7 @@ let ElectronHeaderService = class ElectronHeaderService extends ide_core_browser
|
|
|
37
37
|
this.updateAppTitle();
|
|
38
38
|
}));
|
|
39
39
|
}
|
|
40
|
-
onResourceDidUpdateEvent(
|
|
40
|
+
onResourceDidUpdateEvent() {
|
|
41
41
|
this.updateAppTitle();
|
|
42
42
|
}
|
|
43
43
|
updateAppTitle() {
|
|
@@ -106,9 +106,9 @@ tslib_1.__decorate([
|
|
|
106
106
|
tslib_1.__metadata("design:type", browser_1.WorkbenchEditorService)
|
|
107
107
|
], ElectronHeaderService.prototype, "editorService", void 0);
|
|
108
108
|
tslib_1.__decorate([
|
|
109
|
-
(0, di_1.Autowired)(
|
|
110
|
-
tslib_1.__metadata("design:type",
|
|
111
|
-
], ElectronHeaderService.prototype, "
|
|
109
|
+
(0, di_1.Autowired)(ide_core_browser_1.PreferenceService),
|
|
110
|
+
tslib_1.__metadata("design:type", Object)
|
|
111
|
+
], ElectronHeaderService.prototype, "preferenceService", void 0);
|
|
112
112
|
tslib_1.__decorate([
|
|
113
113
|
(0, di_1.Autowired)(ide_core_browser_1.AppConfig),
|
|
114
114
|
tslib_1.__metadata("design:type", Object)
|
|
@@ -116,7 +116,7 @@ tslib_1.__decorate([
|
|
|
116
116
|
tslib_1.__decorate([
|
|
117
117
|
(0, ide_core_browser_1.OnEvent)(browser_1.ResourceDidUpdateEvent),
|
|
118
118
|
tslib_1.__metadata("design:type", Function),
|
|
119
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
119
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
120
120
|
tslib_1.__metadata("design:returntype", void 0)
|
|
121
121
|
], ElectronHeaderService.prototype, "onResourceDidUpdateEvent", null);
|
|
122
122
|
ElectronHeaderService = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.service.js","sourceRoot":"","sources":["../../../src/browser/header/header.service.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"header.service.js","sourceRoot":"","sources":["../../../src/browser/header/header.service.ts"],"names":[],"mappings":";;;;AAAA,qCAAqD;AACrD,iEAUoC;AACpC,8DAAkG;AAClG,uDAA2E;AAC3E,6DAA2D;AAI3D,OAAO;AACM,QAAA,WAAW,GAAG,SAAS,CAAC;AACxB,QAAA,SAAS,GAAG,KAAK,CAAC;AAEpB,QAAA,gBAAgB,GAAG,qDAAqD,CAAC;AAEpF,IAAI,8BAAW,EAAE;IACf,wBAAgB,GAAG,6CAA6C,CAAC;CAClE;AAGM,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,+BAAY;IAoBrD,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,IAAI,aAAa,CAAC,KAAa;QAC7B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAGD,oBAAoB,CAAC,GAAW,EAAE,KAAyB;QACzD,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACvC,CAAC;IAED;QACE,KAAK,EAAE,CAAC;QAlCV,yBAAoB,GAAG,IAAI,uCAAoB,EAAE,CAAC;QAW1C,oBAAe,GAAG,IAAI,0BAAO,EAAU,CAAC;QAChD,mBAAc,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;QAI5C,cAAS,GAAG,iBAAS,CAAC;QAEd,mBAAc,GAAG,wBAAgB,CAAC;QAUlC,uBAAkB,GAAG,EAAwC,CAAC;QAOpE,IAAI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BAEhB,iBAAiB;YACjB,kBAAkB;YAClB,gBAAgB;YAChB,iBAAiB;YACjB,kBAAkB;YAClB,gBAAgB;YAChB,UAAU;YACV,UAAU;YACV,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,UAAU;YACV,KAAK,IACF,IAAI,CAAC,kBAAkB,GAE5B;YACE,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CACF,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC;IACtC,CAAC;CACF,CAAA;AAzHC;IAAC,IAAA,cAAS,EAAC,gCAAsB,CAAC;sCACF,gCAAsB;4DAAC;AAEvD;IAAC,IAAA,cAAS,EAAC,oCAAiB,CAAC;;gEACyB;AAEtD;IAAC,IAAA,cAAS,EAAC,4BAAS,CAAC;;wDACiB;AAiCtC;IAAC,IAAA,0BAAO,EAAC,gCAAsB,CAAC;;;;qEAG/B;AA9CU,qBAAqB;IADjC,IAAA,eAAU,GAAE;;GACA,qBAAqB,CA4HjC;AA5HY,sDAAqB"}
|
package/lib/browser/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Provider, Injector } from '@opensumi/di';
|
|
|
2
2
|
import { BrowserModule, AppConfig, ClientAppContribution, CommandContribution, CommandRegistry, KeybindingContribution, KeybindingRegistry, ILogger, IEventBus } from '@opensumi/ide-core-browser';
|
|
3
3
|
import { ComponentContribution, ComponentRegistry } from '@opensumi/ide-core-browser/lib/layout';
|
|
4
4
|
import { IMenuRegistry, MenuContribution } from '@opensumi/ide-core-browser/lib/menu/next';
|
|
5
|
+
import '../common/i18n/setup';
|
|
5
6
|
export declare class ElectronBasicModule extends BrowserModule {
|
|
6
7
|
providers: Provider[];
|
|
7
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ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MAAM,EAAE,OAAO,CAAC;IAEhB,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB;IAqB7C,aAAa,CAAC,YAAY,EAAE,aAAa;IAqCzC,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IA4HjD,mBAAmB,CAAC,WAAW,EAAE,kBAAkB;IAgCnD,OAAO;CAwCR"}
|
package/lib/browser/index.js
CHANGED
|
@@ -13,9 +13,11 @@ const common_1 = require("@opensumi/ide-overlay/lib/common");
|
|
|
13
13
|
const header_1 = require("../common/header");
|
|
14
14
|
const clipboard_1 = require("./clipboard");
|
|
15
15
|
const dialog_1 = require("./dialog");
|
|
16
|
+
const electron_preference_contribution_1 = require("./electron-preference.contribution");
|
|
16
17
|
const header_service_1 = require("./header/header.service");
|
|
17
18
|
const header_view_1 = require("./header/header.view");
|
|
18
19
|
const contribution_1 = require("./welcome/contribution");
|
|
20
|
+
require("../common/i18n/setup");
|
|
19
21
|
let ElectronBasicModule = class ElectronBasicModule extends ide_core_browser_1.BrowserModule {
|
|
20
22
|
constructor() {
|
|
21
23
|
super(...arguments);
|
|
@@ -29,6 +31,7 @@ let ElectronBasicModule = class ElectronBasicModule extends ide_core_browser_1.B
|
|
|
29
31
|
useClass: header_service_1.ElectronHeaderService,
|
|
30
32
|
},
|
|
31
33
|
ElectronBasicContribution,
|
|
34
|
+
electron_preference_contribution_1.ElectronPreferenceContribution,
|
|
32
35
|
contribution_1.WelcomeContribution,
|
|
33
36
|
];
|
|
34
37
|
}
|
package/lib/browser/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAyF;AACzF,iEAuBoC;AACpC,kEAAiG;AACjG,mEAAmG;AACnG,iGAA6G;AAC7G,qEAA+G;AAE/G,8DAI0C;AAC1C,6DAAmE;AAEnE,6CAA0D;AAE1D,2CAAuD;AACvD,qCAAuD;AACvD,4DAAgE;AAChE,sDAAyD;AACzD,yDAA6D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAyF;AACzF,iEAuBoC;AACpC,kEAAiG;AACjG,mEAAmG;AACnG,iGAA6G;AAC7G,qEAA+G;AAE/G,8DAI0C;AAC1C,6DAAmE;AAEnE,6CAA0D;AAE1D,2CAAuD;AACvD,qCAAuD;AACvD,yFAAoF;AACpF,4DAAgE;AAChE,sDAAyD;AACzD,yDAA6D;AAE7D,gCAA8B;AAGvB,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,gCAAa;IAA/C;;QACL,cAAS,GAAe;YACtB;gBACE,KAAK,EAAE,+CAA4B;gBACnC,QAAQ,EAAE,oCAA2B;aACtC;YACD;gBACE,KAAK,EAAE,+BAAsB;gBAC7B,QAAQ,EAAE,sCAAqB;aAChC;YACD,yBAAyB;YACzB,iEAA8B;YAC9B,kCAAmB;SACpB,CAAC;IACJ,CAAC;CAAA,CAAA;AAdY,mBAAmB;IAD/B,IAAA,eAAU,GAAE;GACA,mBAAmB,CAc/B;AAdY,kDAAmB;AAgBhC,MAAM,WAAW,GAAG;IAClB;QACE,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,cAAc;KACrB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,iBAAiB;QACtB,IAAI,EAAE,cAAc;KACrB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,cAAc;KACrB;IACD;QACE,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,cAAc;KACrB;IACD;QACE,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,cAAc;KACrB;IACD;QACE,IAAI,EAAE,KAAK;QACX,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,cAAc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CAAC;;2DACD;AAEpB;IAAC,IAAA,cAAS,EAAC,kCAAuB,CAAC;;yEACqB;AAExD;IAAC,IAAA,cAAS,EAAC,2CAAwB,CAAC;;0EACsB;AAE1D;IAAC,IAAA,cAAS,EAAC,wCAA6B,CAAC;;+EAC2B;AAEpE;IAAC,IAAA,cAAS,EAAC,iCAAsB,CAAC;;wEACoB;AAEtD;IAAC,IAAA,cAAS,EAAC,wBAAe,CAAC;;iEACa;AAExC;IAAC,IAAA,cAAS,EAAC,0BAAO,CAAC;;yDACH;AAjCL,yBAAyB;IADrC,IAAA,yBAAM,EAAC,8BAAqB,EAAE,wCAAqB,EAAE,uBAAgB,EAAE,sCAAmB,EAAE,yCAAsB,CAAC;GACvG,yBAAyB,CAiSrC;AAjSY,8DAAyB"}
|
package/lib/common/header.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export interface IElectronHeaderService {
|
|
|
29
29
|
* - `${folderPath}`: file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder).
|
|
30
30
|
* - `${rootName}`: name of the opened workspace or folder (e.g. myFolder or myWorkspace).
|
|
31
31
|
* - `${rootPath}`: file path of the opened workspace or folder (e.g. /Users/Development/myWorkspace).
|
|
32
|
-
* - `${appName}`: e.g.
|
|
32
|
+
* - `${appName}`: e.g. OpenSumi.
|
|
33
33
|
* - `${remoteName}`: e.g. SSH
|
|
34
34
|
* - `${dirty}`: an indicator for when the active editor has unsaved changes.
|
|
35
35
|
* - `${separator}`: a conditional separator (" - ") that only shows when surrounded by variables with values or static text.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en-US.lang.d.ts","sourceRoot":"","sources":["../../../src/common/i18n/en-US.lang.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;;;CAuB9B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.localizationBundle = void 0;
|
|
4
|
+
exports.localizationBundle = {
|
|
5
|
+
languageId: 'en-US',
|
|
6
|
+
languageName: 'english',
|
|
7
|
+
localizedLanguageName: 'English',
|
|
8
|
+
contents: {
|
|
9
|
+
'window.title': [
|
|
10
|
+
'Controls the window title based on the active editor. Variables are substituted based on the context:',
|
|
11
|
+
'`${activeEditorShort}`: the file name (e.g. myFile.txt).',
|
|
12
|
+
'`${activeEditorMedium}`: the path of the file relative to the workspace folder (e.g. myFolder/myFileFolder/myFile.txt).',
|
|
13
|
+
'`${activeEditorLong}`: the full path of the file (e.g. /Users/Development/myFolder/myFileFolder/myFile.txt).',
|
|
14
|
+
'`${activeFolderShort}`: the name of the folder the file is contained in (e.g. myFileFolder).',
|
|
15
|
+
'`${activeFolderMedium}`: the path of the folder the file is contained in, relative to the workspace folder (e.g. myFolder/myFileFolder).',
|
|
16
|
+
'`${activeFolderLong}`: the full path of the folder the file is contained in (e.g. /Users/Development/myFolder/myFileFolder).',
|
|
17
|
+
'`${folderName}`: name of the workspace folder the file is contained in (e.g. myFolder).',
|
|
18
|
+
'`${folderPath}`: file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder).',
|
|
19
|
+
'`${rootName}`: name of the opened workspace or folder (e.g. myFolder or myWorkspace).',
|
|
20
|
+
'`${rootPath}`: file path of the opened workspace or folder (e.g. /Users/Development/myWorkspace).',
|
|
21
|
+
'`${appName}`: e.g. OpenSumi.',
|
|
22
|
+
'`${remoteName}`: e.g. SSH',
|
|
23
|
+
'`${dirty}`: an indicator for when the active editor has unsaved changes.',
|
|
24
|
+
'`${separator}`: a conditional separator (" - ") that only shows when surrounded by variables with values or static text.',
|
|
25
|
+
].join('\n- '),
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=en-US.lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en-US.lang.js","sourceRoot":"","sources":["../../../src/common/i18n/en-US.lang.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE,SAAS;IACvB,qBAAqB,EAAE,SAAS;IAChC,QAAQ,EAAE;QACR,cAAc,EAAE;YACd,uGAAuG;YACvG,0DAA0D;YAC1D,yHAAyH;YACzH,8GAA8G;YAC9G,8FAA8F;YAC9F,0IAA0I;YAC1I,8HAA8H;YAC9H,yFAAyF;YACzF,iHAAiH;YACjH,uFAAuF;YACvF,mGAAmG;YACnG,8BAA8B;YAC9B,2BAA2B;YAC3B,0EAA0E;YAC1E,0HAA0H;SAC3H,CAAC,IAAI,CAAC,MAAM,CAAC;KACf;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/common/i18n/setup.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const localize_1 = require("@opensumi/ide-core-common/lib/localize");
|
|
4
|
+
const en_US_lang_1 = require("./en-US.lang");
|
|
5
|
+
const zh_CN_lang_1 = require("./zh-CN.lang");
|
|
6
|
+
(0, localize_1.registerLocalizationBundle)(zh_CN_lang_1.localizationBundle);
|
|
7
|
+
(0, localize_1.registerLocalizationBundle)(en_US_lang_1.localizationBundle);
|
|
8
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/common/i18n/setup.ts"],"names":[],"mappings":";;AAAA,qEAAoF;AAEpF,6CAAwD;AACxD,6CAAwD;AAExD,IAAA,qCAA0B,EAAC,+BAAE,CAAC,CAAC;AAC/B,IAAA,qCAA0B,EAAC,+BAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-CN.lang.d.ts","sourceRoot":"","sources":["../../../src/common/i18n/zh-CN.lang.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;;;CAuB9B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.localizationBundle = void 0;
|
|
4
|
+
exports.localizationBundle = {
|
|
5
|
+
languageId: 'zh-CN',
|
|
6
|
+
languageName: 'Chinese',
|
|
7
|
+
localizedLanguageName: '中文(中国)',
|
|
8
|
+
contents: {
|
|
9
|
+
'window.title': [
|
|
10
|
+
'基于活跃文件控制窗口标题。变量根据上下文替换:',
|
|
11
|
+
'`${activeEditorShort}`: 活跃文件标题 (例如: myFile.txt).',
|
|
12
|
+
'`${activeEditorMedium}`: 活跃文件相对工作区的路径 (例如: myFolder/myFileFolder/myFile.txt).',
|
|
13
|
+
'`${activeEditorLong}`: 活跃文件的绝对路径 (例如: /Users/Development/myFolder/myFileFolder/myFile.txt).',
|
|
14
|
+
'`${activeFolderShort}`: 活跃文件的父目录 (例如: myFileFolder).',
|
|
15
|
+
'`${activeFolderMedium}`: 活跃文件的父目录相约对工作区的路径 (例如: myFolder/myFileFolder).',
|
|
16
|
+
'`${activeFolderLong}`: 活跃文件的父目录相约对工作区的绝对路径 (例如: /Users/Development/myFolder/myFileFolder).',
|
|
17
|
+
'`${folderName}`: 目录名称 (例如: myFolder).',
|
|
18
|
+
'`${folderPath}`: 目录绝对路径 (例如: /Users/Development/myFolder).',
|
|
19
|
+
'`${rootName}`: 工作区名称 (例如: myFolder or myWorkspace).',
|
|
20
|
+
'`${rootPath}`: 工作区绝对路径 (例如: /Users/Development/myWorkspace).',
|
|
21
|
+
'`${appName}`: 例如: OpenSumi.',
|
|
22
|
+
'`${remoteName}`: 例如: SSH',
|
|
23
|
+
'`${dirty}`: 有文件被修改的标记',
|
|
24
|
+
'`${separator}`: 分隔符只在两边都有值的变量中出现',
|
|
25
|
+
].join('\n- '),
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=zh-CN.lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-CN.lang.js","sourceRoot":"","sources":["../../../src/common/i18n/zh-CN.lang.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE,SAAS;IACvB,qBAAqB,EAAE,QAAQ;IAC/B,QAAQ,EAAE;QACR,cAAc,EAAE;YACd,yBAAyB;YACzB,kDAAkD;YAClD,+EAA+E;YAC/E,6FAA6F;YAC7F,sDAAsD;YACtD,yEAAyE;YACzE,4FAA4F;YAC5F,uCAAuC;YACvC,4DAA4D;YAC5D,qDAAqD;YACrD,8DAA8D;YAC9D,6BAA6B;YAC7B,0BAA0B;YAC1B,uBAAuB;YACvB,kCAAkC;SACnC,CAAC,IAAI,CAAC,MAAM,CAAC;KACf;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-electron-basic",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.10-rc-1678885769.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"lib",
|
|
6
6
|
"src"
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"url": "git@github.com:opensumi/core.git"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@opensumi/ide-core-common": "2.22.
|
|
21
|
-
"@opensumi/ide-core-node": "2.22.
|
|
22
|
-
"@opensumi/ide-file-service": "2.22.
|
|
23
|
-
"@opensumi/ide-utils": "2.22.
|
|
20
|
+
"@opensumi/ide-core-common": "2.22.10-rc-1678885769.0",
|
|
21
|
+
"@opensumi/ide-core-node": "2.22.10-rc-1678885769.0",
|
|
22
|
+
"@opensumi/ide-file-service": "2.22.10-rc-1678885769.0",
|
|
23
|
+
"@opensumi/ide-utils": "2.22.10-rc-1678885769.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@opensumi/ide-core-browser": "2.22.
|
|
26
|
+
"@opensumi/ide-core-browser": "2.22.10-rc-1678885769.0",
|
|
27
27
|
"@opensumi/ide-dev-tool": "1.3.1",
|
|
28
|
-
"@opensumi/ide-editor": "2.22.
|
|
29
|
-
"@opensumi/ide-overlay": "2.22.
|
|
30
|
-
"@opensumi/ide-workspace": "2.22.
|
|
28
|
+
"@opensumi/ide-editor": "2.22.10-rc-1678885769.0",
|
|
29
|
+
"@opensumi/ide-overlay": "2.22.10-rc-1678885769.0",
|
|
30
|
+
"@opensumi/ide-workspace": "2.22.10-rc-1678885769.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "ac7a88e165cc88070b63e96cd4f17ee6eec35aea"
|
|
33
33
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PreferenceSchema, PreferenceContribution, localize, Domain } from '@opensumi/ide-core-browser';
|
|
2
|
+
|
|
3
|
+
export const electronPreferencesSchema: PreferenceSchema = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
properties: {
|
|
6
|
+
'window.title': {
|
|
7
|
+
type: 'string',
|
|
8
|
+
description: localize('window.title'),
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const ElectronPreferences = Symbol('ElectronPreferences');
|
|
14
|
+
|
|
15
|
+
@Domain(PreferenceContribution)
|
|
16
|
+
export class ElectronPreferenceContribution implements PreferenceContribution {
|
|
17
|
+
schema: PreferenceSchema = electronPreferencesSchema;
|
|
18
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Injectable, Autowired
|
|
1
|
+
import { Injectable, Autowired } from '@opensumi/di';
|
|
2
2
|
import {
|
|
3
3
|
AppConfig,
|
|
4
4
|
localize,
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Emitter,
|
|
7
7
|
DisposableCollection,
|
|
8
8
|
isMacintosh,
|
|
9
|
+
PreferenceService,
|
|
9
10
|
WithEventBus,
|
|
10
11
|
OnEvent,
|
|
11
12
|
} from '@opensumi/ide-core-browser';
|
|
@@ -30,13 +31,13 @@ export class ElectronHeaderService extends WithEventBus implements IElectronHead
|
|
|
30
31
|
disposableCollection = new DisposableCollection();
|
|
31
32
|
|
|
32
33
|
@Autowired(WorkbenchEditorService)
|
|
33
|
-
editorService: WorkbenchEditorService;
|
|
34
|
+
private readonly editorService: WorkbenchEditorService;
|
|
34
35
|
|
|
35
|
-
@Autowired(
|
|
36
|
-
|
|
36
|
+
@Autowired(PreferenceService)
|
|
37
|
+
private readonly preferenceService: PreferenceService;
|
|
37
38
|
|
|
38
39
|
@Autowired(AppConfig)
|
|
39
|
-
appConfig: AppConfig;
|
|
40
|
+
private readonly appConfig: AppConfig;
|
|
40
41
|
|
|
41
42
|
private _onTitleChanged = new Emitter<string>();
|
|
42
43
|
onTitleChanged = this._onTitleChanged.event;
|
|
@@ -70,7 +71,7 @@ export class ElectronHeaderService extends WithEventBus implements IElectronHead
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
@OnEvent(ResourceDidUpdateEvent)
|
|
73
|
-
onResourceDidUpdateEvent(
|
|
74
|
+
onResourceDidUpdateEvent() {
|
|
74
75
|
this.updateAppTitle();
|
|
75
76
|
}
|
|
76
77
|
|
package/src/browser/index.ts
CHANGED
|
@@ -39,10 +39,13 @@ import { IElectronHeaderService } from '../common/header';
|
|
|
39
39
|
|
|
40
40
|
import { ElectronClipboardService } from './clipboard';
|
|
41
41
|
import { ElectronNativeDialogService } from './dialog';
|
|
42
|
+
import { ElectronPreferenceContribution } from './electron-preference.contribution';
|
|
42
43
|
import { ElectronHeaderService } from './header/header.service';
|
|
43
44
|
import { ElectronHeaderBar } from './header/header.view';
|
|
44
45
|
import { WelcomeContribution } from './welcome/contribution';
|
|
45
46
|
|
|
47
|
+
import '../common/i18n/setup';
|
|
48
|
+
|
|
46
49
|
@Injectable()
|
|
47
50
|
export class ElectronBasicModule extends BrowserModule {
|
|
48
51
|
providers: Provider[] = [
|
|
@@ -55,6 +58,7 @@ export class ElectronBasicModule extends BrowserModule {
|
|
|
55
58
|
useClass: ElectronHeaderService,
|
|
56
59
|
},
|
|
57
60
|
ElectronBasicContribution,
|
|
61
|
+
ElectronPreferenceContribution,
|
|
58
62
|
WelcomeContribution,
|
|
59
63
|
];
|
|
60
64
|
}
|
package/src/common/header.ts
CHANGED
|
@@ -31,7 +31,7 @@ export interface IElectronHeaderService {
|
|
|
31
31
|
* - `${folderPath}`: file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder).
|
|
32
32
|
* - `${rootName}`: name of the opened workspace or folder (e.g. myFolder or myWorkspace).
|
|
33
33
|
* - `${rootPath}`: file path of the opened workspace or folder (e.g. /Users/Development/myWorkspace).
|
|
34
|
-
* - `${appName}`: e.g.
|
|
34
|
+
* - `${appName}`: e.g. OpenSumi.
|
|
35
35
|
* - `${remoteName}`: e.g. SSH
|
|
36
36
|
* - `${dirty}`: an indicator for when the active editor has unsaved changes.
|
|
37
37
|
* - `${separator}`: a conditional separator (" - ") that only shows when surrounded by variables with values or static text.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const localizationBundle = {
|
|
2
|
+
languageId: 'en-US',
|
|
3
|
+
languageName: 'english',
|
|
4
|
+
localizedLanguageName: 'English',
|
|
5
|
+
contents: {
|
|
6
|
+
'window.title': [
|
|
7
|
+
'Controls the window title based on the active editor. Variables are substituted based on the context:',
|
|
8
|
+
'`${activeEditorShort}`: the file name (e.g. myFile.txt).',
|
|
9
|
+
'`${activeEditorMedium}`: the path of the file relative to the workspace folder (e.g. myFolder/myFileFolder/myFile.txt).',
|
|
10
|
+
'`${activeEditorLong}`: the full path of the file (e.g. /Users/Development/myFolder/myFileFolder/myFile.txt).',
|
|
11
|
+
'`${activeFolderShort}`: the name of the folder the file is contained in (e.g. myFileFolder).',
|
|
12
|
+
'`${activeFolderMedium}`: the path of the folder the file is contained in, relative to the workspace folder (e.g. myFolder/myFileFolder).',
|
|
13
|
+
'`${activeFolderLong}`: the full path of the folder the file is contained in (e.g. /Users/Development/myFolder/myFileFolder).',
|
|
14
|
+
'`${folderName}`: name of the workspace folder the file is contained in (e.g. myFolder).',
|
|
15
|
+
'`${folderPath}`: file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder).',
|
|
16
|
+
'`${rootName}`: name of the opened workspace or folder (e.g. myFolder or myWorkspace).',
|
|
17
|
+
'`${rootPath}`: file path of the opened workspace or folder (e.g. /Users/Development/myWorkspace).',
|
|
18
|
+
'`${appName}`: e.g. OpenSumi.',
|
|
19
|
+
'`${remoteName}`: e.g. SSH',
|
|
20
|
+
'`${dirty}`: an indicator for when the active editor has unsaved changes.',
|
|
21
|
+
'`${separator}`: a conditional separator (" - ") that only shows when surrounded by variables with values or static text.',
|
|
22
|
+
].join('\n- '),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerLocalizationBundle } from '@opensumi/ide-core-common/lib/localize';
|
|
2
|
+
|
|
3
|
+
import { localizationBundle as en } from './en-US.lang';
|
|
4
|
+
import { localizationBundle as zh } from './zh-CN.lang';
|
|
5
|
+
|
|
6
|
+
registerLocalizationBundle(zh);
|
|
7
|
+
registerLocalizationBundle(en);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const localizationBundle = {
|
|
2
|
+
languageId: 'zh-CN',
|
|
3
|
+
languageName: 'Chinese',
|
|
4
|
+
localizedLanguageName: '中文(中国)',
|
|
5
|
+
contents: {
|
|
6
|
+
'window.title': [
|
|
7
|
+
'基于活跃文件控制窗口标题。变量根据上下文替换:',
|
|
8
|
+
'`${activeEditorShort}`: 活跃文件标题 (例如: myFile.txt).',
|
|
9
|
+
'`${activeEditorMedium}`: 活跃文件相对工作区的路径 (例如: myFolder/myFileFolder/myFile.txt).',
|
|
10
|
+
'`${activeEditorLong}`: 活跃文件的绝对路径 (例如: /Users/Development/myFolder/myFileFolder/myFile.txt).',
|
|
11
|
+
'`${activeFolderShort}`: 活跃文件的父目录 (例如: myFileFolder).',
|
|
12
|
+
'`${activeFolderMedium}`: 活跃文件的父目录相约对工作区的路径 (例如: myFolder/myFileFolder).',
|
|
13
|
+
'`${activeFolderLong}`: 活跃文件的父目录相约对工作区的绝对路径 (例如: /Users/Development/myFolder/myFileFolder).',
|
|
14
|
+
'`${folderName}`: 目录名称 (例如: myFolder).',
|
|
15
|
+
'`${folderPath}`: 目录绝对路径 (例如: /Users/Development/myFolder).',
|
|
16
|
+
'`${rootName}`: 工作区名称 (例如: myFolder or myWorkspace).',
|
|
17
|
+
'`${rootPath}`: 工作区绝对路径 (例如: /Users/Development/myWorkspace).',
|
|
18
|
+
'`${appName}`: 例如: OpenSumi.',
|
|
19
|
+
'`${remoteName}`: 例如: SSH',
|
|
20
|
+
'`${dirty}`: 有文件被修改的标记',
|
|
21
|
+
'`${separator}`: 分隔符只在两边都有值的变量中出现',
|
|
22
|
+
].join('\n- '),
|
|
23
|
+
},
|
|
24
|
+
};
|