Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6ea8d6

Browse files
committed
fix: missing translations of remote built-in extensions
1 parent6209ba2 commite6ea8d6

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

‎build/gulpfile.reh.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const serverResourceIncludes = [
5858

5959
// NLS
6060
'out-build/nls.messages.json',
61+
'out-build/nls.keys.json',
6162

6263
// Process monitor
6364
'out-build/vs/base/node/cpuUsage.sh',

‎src/vs/base/node/nls.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,27 @@ export async function resolveNLSConfiguration({ userLocale, osLocale, userDataPa
108108
_corruptedFile:languagePackCorruptMarkerFile
109109
};
110110

111-
if(awaitPromises.exists(commitLanguagePackCachePath)){
111+
if(awaitPromises.exists(languagePackMessagesFile)){
112112
touch(commitLanguagePackCachePath).catch(()=>{});// We don't wait for this. No big harm if we can't touch
113113
mark('code/didGenerateNls');
114114
returnresult;
115115
}
116116

117117
const[
118-
,
119118
nlsDefaultKeys,
120119
nlsDefaultMessages,
121120
nlsPackdata
122121
]:
123-
[unknown,Array<[string,string[]]>,string[],{contents:Record<string,Record<string,string>>}]
124-
//^moduleId ^nlsKeys ^moduleId ^nlsKey ^nlsValue
122+
[Array<[string,string[]]>,string[],{contents:Record<string,Record<string,string>>}]
123+
// ^moduleId ^nlsKeys ^moduleId ^nlsKey ^nlsValue
125124
=awaitPromise.all([
126-
promises.mkdir(commitLanguagePackCachePath,{recursive:true}),
127125
promises.readFile(join(nlsMetadataPath,'nls.keys.json'),'utf-8').then(content=>JSON.parse(content)),
128126
promises.readFile(join(nlsMetadataPath,'nls.messages.json'),'utf-8').then(content=>JSON.parse(content)),
129127
promises.readFile(mainLanguagePackPath,'utf-8').then(content=>JSON.parse(content)),
130128
]);
131129

130+
awaitpromises.mkdir(commitLanguagePackCachePath,{recursive:true});
131+
132132
constnlsResult:string[]=[];
133133

134134
// We expect NLS messages to be in a flat array in sorted order as they

‎src/vs/platform/extensionManagement/common/extensionManagement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ export interface IExtensionManagementService {
615615
uninstall(extension:ILocalExtension,options?:UninstallOptions):Promise<void>;
616616
uninstallExtensions(extensions:UninstallExtensionInfo[]):Promise<void>;
617617
toggleApplicationScope(extension:ILocalExtension,fromProfileLocation:URI):Promise<ILocalExtension>;
618-
getInstalled(type?:ExtensionType,profileLocation?:URI,productVersion?:IProductVersion):Promise<ILocalExtension[]>;
618+
getInstalled(type?:ExtensionType,profileLocation?:URI,productVersion?:IProductVersion,language?:string):Promise<ILocalExtension[]>;
619619
getExtensionsControlManifest():Promise<IExtensionsControlManifest>;
620620
copyExtensions(fromProfileLocation:URI,toProfileLocation:URI):Promise<void>;
621621
updateMetadata(local:ILocalExtension,metadata:Partial<Metadata>,profileLocation:URI):Promise<ILocalExtension>;

‎src/vs/platform/extensionManagement/common/extensionManagementIpc.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
import{ExtensionType,IExtensionManifest,TargetPlatform}from'../../extensions/common/extensions.js';
1818
import{IProductService}from'../../product/common/productService.js';
1919
import{CommontExtensionManagementService}from'./abstractExtensionManagementService.js';
20+
import{language}from'../../../base/common/platform.js';
2021

2122
functiontransformIncomingURI(uri:UriComponents,transformer:IURITransformer|null):URI;
2223
functiontransformIncomingURI(uri:UriComponents|undefined,transformer:IURITransformer|null):URI|undefined;
@@ -145,7 +146,7 @@ export class ExtensionManagementChannel implements IServerChannel {
145146
returnthis.service.uninstallExtensions(arg.map(({ extension, options})=>({extension:transformIncomingExtension(extension,uriTransformer),options:transformIncomingOptions(options,uriTransformer)})));
146147
}
147148
case'getInstalled':{
148-
constextensions=awaitthis.service.getInstalled(args[0],transformIncomingURI(args[1],uriTransformer),args[2]);
149+
constextensions=awaitthis.service.getInstalled(args[0],transformIncomingURI(args[1],uriTransformer),args[2],args[3]);
149150
returnextensions.map(e=>transformOutgoingExtension(e,uriTransformer));
150151
}
151152
case'toggleApplicationScope':{
@@ -297,7 +298,7 @@ export class ExtensionManagementChannelClient extends CommontExtensionManagement
297298
}
298299

299300
getInstalled(type:ExtensionType|null=null,extensionsProfileResource?:URI,productVersion?:IProductVersion):Promise<ILocalExtension[]>{
300-
returnPromise.resolve(this.channel.call<ILocalExtension[]>('getInstalled',[type,extensionsProfileResource,productVersion]))
301+
returnPromise.resolve(this.channel.call<ILocalExtension[]>('getInstalled',[type,extensionsProfileResource,productVersion,language]))
301302
.then(extensions=>extensions.map(extension=>transformIncomingExtension(extension,null)));
302303
}
303304

‎src/vs/platform/extensionManagement/node/extensionManagementService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ export class ExtensionManagementService extends AbstractExtensionManagementServi
130130
}
131131
}
132132

133-
getInstalled(type?:ExtensionType,profileLocation:URI=this.userDataProfilesService.defaultProfile.extensionsResource,productVersion:IProductVersion={version:this.productService.version,date:this.productService.date}):Promise<ILocalExtension[]>{
134-
returnthis.extensionsScanner.scanExtensions(type??null,profileLocation,productVersion);
133+
getInstalled(type?:ExtensionType,profileLocation:URI=this.userDataProfilesService.defaultProfile.extensionsResource,productVersion:IProductVersion={version:this.productService.version,date:this.productService.date},language?:string):Promise<ILocalExtension[]>{
134+
returnthis.extensionsScanner.scanExtensions(type??null,profileLocation,productVersion,language);
135135
}
136136

137137
scanAllUserInstalledExtensions():Promise<ILocalExtension[]>{
@@ -554,14 +554,14 @@ export class ExtensionsScanner extends Disposable {
554554
awaitthis.initializeExtensionSize();
555555
}
556556

557-
asyncscanExtensions(type:ExtensionType|null,profileLocation:URI,productVersion:IProductVersion):Promise<ILocalExtension[]>{
557+
asyncscanExtensions(type:ExtensionType|null,profileLocation:URI,productVersion:IProductVersion,language?:string):Promise<ILocalExtension[]>{
558558
try{
559559
constuserScanOptions:UserExtensionsScanOptions={includeInvalid:true, profileLocation, productVersion};
560560
letscannedExtensions:IScannedExtension[]=[];
561561
if(type===null||type===ExtensionType.System){
562562
letscanAllExtensionsPromise=this.scanAllExtensionPromise.get(profileLocation);
563563
if(!scanAllExtensionsPromise){
564-
scanAllExtensionsPromise=this.extensionsScannerService.scanAllExtensions({},userScanOptions)
564+
scanAllExtensionsPromise=this.extensionsScannerService.scanAllExtensions({ language},userScanOptions)
565565
.finally(()=>this.scanAllExtensionPromise.delete(profileLocation));
566566
this.scanAllExtensionPromise.set(profileLocation,scanAllExtensionsPromise);
567567
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp