Skip to content

Commit

Permalink
Merge pull request #386 from CodinGame/fix-localization-issues
Browse files Browse the repository at this point in the history
Fix localization issues
  • Loading branch information
CGNonofr authored Apr 9, 2024
2 parents 689fcbc + e0b1fa4 commit ba94138
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 209 deletions.
3 changes: 1 addition & 2 deletions demo/src/features/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ const { getApi } = registerExtension({
version: '1.0.0',
engines: {
vscode: '*'
},
enabledApiProposals: ['testCoverage']
}
}, ExtensionHostKind.LocalProcess, {
system: true
})
Expand Down
13 changes: 11 additions & 2 deletions src/missing-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ import { ICustomEditorLabelService } from 'vs/workbench/services/editor/common/c
import { IExtensionsProfileScannerService } from 'vs/platform/extensionManagement/common/extensionsProfileScannerService'
import { createInstanceCapabilityEventMultiplexer } from 'vs/workbench/contrib/terminal/browser/terminalEvents'
import { TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities'
import { ITroubleshootIssueService } from 'vs/workbench/services/issue/browser/issueTroubleshoot'
import { getBuiltInExtensionTranslationsUris, getExtensionIdProvidingCurrentLocale } from './l10n'
import { unsupported } from './tools'

Expand Down Expand Up @@ -3189,8 +3190,8 @@ registerSingleton(IEditSessionsStorageService, class EditSessionsWorkbenchServic

registerSingleton(IMultiDiffSourceResolverService, class MultiDiffSourceResolverService implements IMultiDiffSourceResolverService {
_serviceBrand: undefined
registerResolver = unsupported
resolve = unsupported
registerResolver = () => Disposable.None
resolve = async () => undefined
}, InstantiationType.Delayed)

registerSingleton(IWorkspaceTagsService, NoOpWorkspaceTagsService, InstantiationType.Delayed)
Expand Down Expand Up @@ -3233,3 +3234,11 @@ registerSingleton(ICustomEditorLabelService, class CustomEditorLabelService impl
onDidChange = Event.None
getName = () => undefined
}, InstantiationType.Delayed)

registerSingleton(ITroubleshootIssueService, class TroubleshootIssueService implements ITroubleshootIssueService {
_serviceBrand: undefined
isActive = () => false
start = unsupported
resume = unsupported
stop = unsupported
}, InstantiationType.Delayed)
4 changes: 3 additions & 1 deletion src/service-override/issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standalone
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'
import { IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue'
import { WebIssueService } from 'vs/workbench/services/issue/browser/issueService'
import { ITroubleshootIssueService, TroubleshootIssueService } from 'vs/workbench/services/issue/browser/issueTroubleshoot'
import 'vs/workbench/contrib/issue/browser/issue.contribution'

export default function getServiceOverride (): IEditorOverrideServices {
return {
[IWorkbenchIssueService.toString()]: new SyncDescriptor(WebIssueService, [], false)
[IWorkbenchIssueService.toString()]: new SyncDescriptor(WebIssueService, [], false),
[ITroubleshootIssueService.toString()]: new SyncDescriptor(TroubleshootIssueService, [], false)
}
}
2 changes: 1 addition & 1 deletion src/service-override/localization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standalone
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'
import { ILanguagePackItem, ILanguagePackService } from 'vs/platform/languagePacks/common/languagePacks'
import { ILocaleService } from 'vs/workbench/services/localization/common/locale'
import { URI } from 'vs/workbench/workbench.web.main'
import { IDialogService } from 'vs/platform/dialogs/common/dialogs'
import { IHostService } from 'vs/workbench/services/host/browser/host'
import { IProductService } from 'vs/platform/product/common/productService'
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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ 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/keybinding/browser/keybindingService.ts | 2 +-
.../languageStatus/common/languageStatusService.ts | 2 +-
.../services/localization/browser/localeService.ts | 2 +-
.../services/outline/browser/outlineService.ts | 2 +-
.../workbench/services/path/browser/pathService.ts | 2 +-
.../services/remote/common/remoteExplorerService.ts | 2 +-
.../remote/common/remoteExtensionsScanner.ts | 2 +-
.../terminal/common/embedderTerminalService.ts | 2 +-
.../userDataProfile/common/remoteUserDataProfiles.ts | 2 +-
.../services/userDataSync/common/userDataSyncUtil.ts | 2 +-
21 files changed, 36 insertions(+), 36 deletions(-)
23 files changed, 39 insertions(+), 39 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 @@ -297,6 +299,28 @@ index 4b2a585afc3..70b20e8fd08 100644
constructor(
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
--- 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';
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 {
_serviceBrand: undefined;
@@ -72,7 +72,7 @@ class TroubleShootState {
) { }
}

-class TroubleshootIssueService extends Disposable implements ITroubleshootIssueService {
+export class TroubleshootIssueService extends Disposable implements ITroubleshootIssueService {

readonly _serviceBrand: undefined;

diff --git a/src/vs/workbench/services/keybinding/browser/keybindingService.ts b/src/vs/workbench/services/keybinding/browser/keybindingService.ts
index 3c98bf9aec0..3ab26183771 100644
--- a/src/vs/workbench/services/keybinding/browser/keybindingService.ts
Expand All @@ -323,6 +347,19 @@ index e10d2a3ef1e..6dd88102a64 100644

declare _serviceBrand: undefined;

diff --git a/src/vs/workbench/services/localization/browser/localeService.ts b/src/vs/workbench/services/localization/browser/localeService.ts
index 0d9c51c72cf..ec2aeac2149 100644
--- a/src/vs/workbench/services/localization/browser/localeService.ts
+++ b/src/vs/workbench/services/localization/browser/localeService.ts
@@ -74,7 +74,7 @@ export class WebLocaleService implements ILocaleService {
}
}

-class WebActiveLanguagePackService implements IActiveLanguagePackService {
+export class WebActiveLanguagePackService implements IActiveLanguagePackService {
_serviceBrand: undefined;

constructor(
diff --git a/src/vs/workbench/services/outline/browser/outlineService.ts b/src/vs/workbench/services/outline/browser/outlineService.ts
index f4707432371..7c5cdde39cc 100644
--- a/src/vs/workbench/services/outline/browser/outlineService.ts
Expand Down
Loading

1 comment on commit ba94138

@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.