Skip to content

Commit

Permalink
Merge pull request #387 from CodinGame/fix-localization-issues2
Browse files Browse the repository at this point in the history
Fix localization issues second attempt
  • Loading branch information
CGNonofr committed Apr 10, 2024
2 parents ba94138 + 87a8fa6 commit cf3e9ea
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 48 deletions.
12 changes: 2 additions & 10 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"clean": "tsc -b -c",
"start": "NODE_OPTIONS=--experimental-import-meta-resolve vite --config vite.config.ts",
"start": "vite --config vite.config.ts",
"start:debug": "vite --config vite.config.ts --debug --force",
"lint": "eslint '{src/**/*.ts,rollup/*.ts,*.ts}'",
"typecheck": "tsc --noEmit",
Expand Down Expand Up @@ -98,6 +98,7 @@
"@codingame/monaco-vscode-layout-service-override": "file:../dist/service-override-layout",
"@codingame/monaco-vscode-less-default-extension": "file:../dist/default-extension-less",
"@codingame/monaco-vscode-lifecycle-service-override": "file:../dist/service-override-lifecycle",
"@codingame/monaco-vscode-localization-service-override": "file:../dist/service-override-localization",
"@codingame/monaco-vscode-log-default-extension": "file:../dist/default-extension-log",
"@codingame/monaco-vscode-log-service-override": "file:../dist/service-override-log",
"@codingame/monaco-vscode-lua-default-extension": "file:../dist/default-extension-lua",
Expand Down Expand Up @@ -180,7 +181,6 @@
"@codingame/monaco-vscode-workspace-trust-service-override": "file:../dist/service-override-workspace-trust",
"@codingame/monaco-vscode-xml-default-extension": "file:../dist/default-extension-xml",
"@codingame/monaco-vscode-yaml-default-extension": "file:../dist/default-extension-yaml",
"@codingame/monaco-vscode-localization-service-override": "file:../dist/service-override-localization",
"ansi-colors": "^4.1.3",
"dockerode": "^4.0.2",
"express": "^4.19.2",
Expand Down
6 changes: 3 additions & 3 deletions src/service-override/localization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { localize, localizeWithPath } from 'vs/nls'
import { Language, language } from 'vs/base/common/platform'
import { URI } from 'vs/base/common/uri'
import { getBuiltInExtensionTranslationsUris, setAvailableLocales } from '../l10n'
import 'vs/workbench/contrib/localization/common/localization.contribution'
import 'vs/workbench/contrib/localization/browser/localization.contribution'

interface AvailableLanguage {
export interface AvailableLanguage {
locale: string
languageName?: string
}

interface LocalizationOptions {
export interface LocalizationOptions {
setLocale (id: string): Promise<void>
clearLocale(): Promise<void>
availableLanguages: AvailableLanguage[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Subject: [PATCH] feat: export some classes and make some methods accessible
.../extensions/browser/extensionUrlHandler.ts | 2 +-
.../extensions/browser/webWorkerExtensionHost.ts | 2 +-
.../extensions/common/abstractExtensionService.ts | 10 +++++-----
.../services/issue/browser/issueTroubleshoot.ts | 4 ++--
.../services/issue/browser/issueTroubleshoot.ts | 6 +++---
.../services/keybinding/browser/keybindingService.ts | 2 +-
.../languageStatus/common/languageStatusService.ts | 2 +-
.../services/localization/browser/localeService.ts | 2 +-
Expand All @@ -27,7 +27,7 @@ Subject: [PATCH] feat: export some classes and make some methods accessible
.../terminal/common/embedderTerminalService.ts | 2 +-
.../userDataProfile/common/remoteUserDataProfiles.ts | 2 +-
.../services/userDataSync/common/userDataSyncUtil.ts | 2 +-
23 files changed, 39 insertions(+), 39 deletions(-)
23 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.ts b/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.ts
index fdefc170db0..1d3bc4affc5 100644
Expand Down Expand Up @@ -300,18 +300,21 @@ index 4b2a585afc3..70b20e8fd08 100644
public readonly toAdd: IExtension[],
public readonly toRemove: string[] | IExtension[]
diff --git a/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts b/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts
index 86f84f2af22..c6ac789265b 100644
index 86f84f2af22..089333e2c9f 100644
--- a/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts
+++ b/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts
@@ -30,7 +30,7 @@ import { URI } from 'vs/base/common/uri';
@@ -30,9 +30,9 @@ import { URI } from 'vs/base/common/uri';
import { RemoteNameContext } from 'vs/workbench/common/contextkeys';
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';

-const ITroubleshootIssueService = createDecorator<ITroubleshootIssueService>('ITroubleshootIssueService');
+export const ITroubleshootIssueService = createDecorator<ITroubleshootIssueService>('ITroubleshootIssueService');

interface ITroubleshootIssueService {
-interface ITroubleshootIssueService {
+export interface ITroubleshootIssueService {
_serviceBrand: undefined;
isActive(): boolean;
start(): Promise<void>;
@@ -72,7 +72,7 @@ class TroubleShootState {
) { }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ to make it work in ESM context
2 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts
index 869f44526b4..296ac140860 100644
index 869f44526b4..c2149139c66 100644
--- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts
+++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts
@@ -17,6 +17,7 @@ import { IFileService } from 'vs/platform/files/common/files';
Expand Down Expand Up @@ -42,7 +42,7 @@ index 869f44526b4..296ac140860 100644

const transformUri = (src: string, base: URI) => {
- const path = joinPath(base, src);
+ const path = FileAccess.asBrowserUri(joinPath(base, src).fsPath.slice(1) as AppResourcePath);
+ const path = FileAccess.asBrowserUri(joinPath(base, src).path.slice(1) as AppResourcePath);
return asWebviewUri(path).toString(true);
};

Expand Down

This file was deleted.

1 comment on commit cf3e9ea

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.