Skip to content

Commit f836340

Browse files
authored
Edit Sessions -> Cloud Changes (microsoft#165877)
1 parent ebeccc9 commit f836340

File tree

4 files changed

+35
-35
lines changed

4 files changed

+35
-35
lines changed

src/vs/workbench/contrib/editSessions/browser/editSessions.contribution.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
131131
this.shouldShowViewsContext = EDIT_SESSIONS_SHOW_VIEW.bindTo(this.contextKeyService);
132132

133133
this._register(this.fileService.registerProvider(EditSessionsFileSystemProvider.SCHEMA, new EditSessionsFileSystemProvider(this.editSessionsStorageService)));
134-
this.lifecycleService.onWillShutdown((e) => e.join(this.autoStoreEditSession(), { id: 'autoStoreEditSession', label: localize('autoStoreEditSession', 'Storing current edit session...') }));
134+
this.lifecycleService.onWillShutdown((e) => e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: localize('autoStoreWorkingChanges', 'Storing current working changes...') }));
135135
this._register(this.editSessionsStorageService.onDidSignIn(() => this.updateAccountsMenuBadge()));
136136
this._register(this.editSessionsStorageService.onDidSignOut(() => this.updateAccountsMenuBadge()));
137137
}
@@ -149,10 +149,10 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
149149
const shouldAutoResumeOnReload = this.configurationService.getValue('workbench.editSessions.autoResume') === 'onReload';
150150

151151
if (this.environmentService.editSessionId !== undefined) {
152-
this.logService.info(`Resuming edit session, reason: found editSessionId ${this.environmentService.editSessionId} in environment service...`);
152+
this.logService.info(`Resuming cloud changes, reason: found editSessionId ${this.environmentService.editSessionId} in environment service...`);
153153
await this.resumeEditSession(this.environmentService.editSessionId).finally(() => this.environmentService.editSessionId = undefined);
154154
} else if (shouldAutoResumeOnReload && this.editSessionsStorageService.isSignedIn) {
155-
this.logService.info('Resuming edit session, reason: edit sessions enabled...');
155+
this.logService.info('Resuming cloud changes, reason: cloud changes enabled...');
156156
// Attempt to resume edit session based on edit workspace identifier
157157
// Note: at this point if the user is not signed into edit sessions,
158158
// we don't want them to be prompted to sign in and should just return early
@@ -203,7 +203,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
203203
return this.accountsMenuBadgeDisposable.clear();
204204
}
205205

206-
const badge = new NumberBadge(1, () => localize('check for pending edit sessions', 'Check for pending edit sessions'));
206+
const badge = new NumberBadge(1, () => localize('check for pending cloud changes', 'Check for pending cloud changes'));
207207
this.accountsMenuBadgeDisposable.value = this.activityService.showAccountsActivity({ badge, priority: 1 });
208208
}
209209

@@ -212,7 +212,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
212212
await this.progressService.withProgress({
213213
location: ProgressLocation.Window,
214214
type: 'syncing',
215-
title: localize('store edit session', 'Storing edit session...')
215+
title: localize('store working changes', 'Storing working changes...')
216216
}, async () => this.storeEditSession(false));
217217
}
218218
}
@@ -264,7 +264,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
264264
constructor() {
265265
super({
266266
id: 'workbench.editSessions.actions.showEditSessions',
267-
title: { value: localize('show edit session', "Show Edit Sessions"), original: 'Show Edit Sessions' },
267+
title: { value: localize('show cloud changes', "Show Cloud Changes"), original: 'Show Cloud Changes' },
268268
category: EDIT_SESSION_SYNC_CATEGORY,
269269
f1: true
270270
});
@@ -311,7 +311,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
311311
ref = await that.progressService.withProgress({
312312
location: ProgressLocation.Notification,
313313
type: 'syncing',
314-
title: localize('store your edit session', 'Storing your edit session...')
314+
title: localize('store your working changes', 'Storing your working changes...')
315315
}, async () => that.storeEditSession(false));
316316
}
317317

@@ -335,7 +335,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
335335
that.logService.info(`Opening ${uri.toString()}`);
336336
await that.openerService.open(uri, { openExternal: true });
337337
} else if (ref === undefined && shouldStoreEditSession) {
338-
that.logService.warn(`Failed to store edit session when invoking ${continueWorkingOnCommand.id}.`);
338+
that.logService.warn(`Failed to store working changes when invoking ${continueWorkingOnCommand.id}.`);
339339
}
340340
}
341341
}));
@@ -347,7 +347,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
347347
constructor() {
348348
super({
349349
id: 'workbench.editSessions.actions.resumeLatest',
350-
title: { value: localize('resume latest.v2', "Resume Latest Edit Session"), original: 'Resume Latest Edit Session' },
350+
title: { value: localize('resume latest cloud changes', "Resume Latest Changes from Cloud"), original: 'Resume Latest Changes from Cloud' },
351351
category: EDIT_SESSION_SYNC_CATEGORY,
352352
f1: true,
353353
});
@@ -373,7 +373,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
373373
constructor() {
374374
super({
375375
id: 'workbench.editSessions.actions.storeCurrent',
376-
title: { value: localize('store current.v2', "Store Current Edit Session"), original: 'Store Current Edit Session' },
376+
title: { value: localize('store working changes in cloud', "Store Working Changes in Cloud"), original: 'Store Working Changes in Cloud' },
377377
category: EDIT_SESSION_SYNC_CATEGORY,
378378
f1: true,
379379
});
@@ -382,7 +382,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
382382
async run(accessor: ServicesAccessor): Promise<void> {
383383
await that.progressService.withProgress({
384384
location: ProgressLocation.Notification,
385-
title: localize('storing edit session', 'Storing edit session...')
385+
title: localize('storing working changes', 'Storing working changes...')
386386
}, async () => {
387387
type StoreEvent = {};
388388
type StoreClassification = {
@@ -403,7 +403,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
403403
return;
404404
}
405405

406-
this.logService.info(ref !== undefined ? `Resuming edit session with ref ${ref}...` : 'Resuming edit session...');
406+
this.logService.info(ref !== undefined ? `Resuming changes from cloud with ref ${ref}...` : 'Resuming changes from cloud...');
407407

408408
if (silent && !(await this.editSessionsStorageService.initialize(false, true))) {
409409
return;
@@ -412,18 +412,18 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
412412
const data = await this.editSessionsStorageService.read(ref);
413413
if (!data) {
414414
if (ref === undefined && !silent) {
415-
this.notificationService.info(localize('no edit session', 'There are no edit sessions to resume.'));
415+
this.notificationService.info(localize('no cloud changes', 'There are no changes to resume from the cloud.'));
416416
} else if (ref !== undefined) {
417-
this.notificationService.warn(localize('no edit session content for ref', 'Could not resume edit session contents for ID {0}.', ref));
417+
this.notificationService.warn(localize('no cloud changes for ref', 'Could not resume changes from the cloud for ID {0}.', ref));
418418
}
419-
this.logService.info(ref !== undefined ? `Aborting resuming edit session as no edit session content is available to be applied from ref ${ref}.` : `Aborting resuming edit session as no edit session content is available to be applied`);
419+
this.logService.info(ref !== undefined ? `Aborting resuming changes from cloud as no edit session content is available to be applied from ref ${ref}.` : `Aborting resuming edit session as no edit session content is available to be applied`);
420420
return;
421421
}
422422
const editSession = data.editSession;
423423
ref = data.ref;
424424

425425
if (editSession.version > EditSessionSchemaVersion) {
426-
this.notificationService.error(localize('client too old', "Please upgrade to a newer version of {0} to resume this edit session.", this.productService.nameLong));
426+
this.notificationService.error(localize('client too old', "Please upgrade to a newer version of {0} to resume your working changes from the cloud.", this.productService.nameLong));
427427
return;
428428
}
429429

@@ -442,8 +442,8 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
442442
const result = await this.dialogService.show(
443443
Severity.Warning,
444444
conflictingChanges.length > 1 ?
445-
localize('resume edit session warning many', 'Resuming your edit session will overwrite the following {0} files. Do you want to proceed?', conflictingChanges.length) :
446-
localize('resume edit session warning 1', 'Resuming your edit session will overwrite {0}. Do you want to proceed?', basename(conflictingChanges[0].uri)),
445+
localize('resume edit session warning many', 'Resuming your working changes from the cloud will overwrite the following {0} files. Do you want to proceed?', conflictingChanges.length) :
446+
localize('resume edit session warning 1', 'Resuming your working changes from the cloud will overwrite {0}. Do you want to proceed?', basename(conflictingChanges[0].uri)),
447447
[cancel, yes],
448448
{
449449
detail: conflictingChanges.length > 1 ? getFileNamesMessage(conflictingChanges.map((c) => c.uri)) : undefined,
@@ -468,7 +468,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
468468
this.logService.info(`Deleted edit session with ref ${ref}.`);
469469
} catch (ex) {
470470
this.logService.error('Failed to resume edit session, reason: ', (ex as Error).toString());
471-
this.notificationService.error(localize('resume failed', "Failed to resume your edit session."));
471+
this.notificationService.error(localize('resume failed', "Failed to resume your working changes from the cloud."));
472472
}
473473
}
474474

@@ -504,7 +504,7 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
504504
// Surface partially matching edit session
505505
this.notificationService.prompt(
506506
Severity.Info,
507-
localize('editSessionPartialMatch', 'You have a pending edit session for this workspace. Would you like to resume it?'),
507+
localize('editSessionPartialMatch', 'You have pending working changes in the cloud for this workspace. Would you like to resume them?'),
508508
[{ label: localize('resume', 'Resume'), run: () => this.resumeEditSession(ref, false, true) }]
509509
);
510510
} else {
@@ -618,9 +618,9 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
618618
}
619619

620620
if (!hasEdits) {
621-
this.logService.info('Skipping storing edit session as there are no edits to store.');
621+
this.logService.info('Skipped storing working changes in the cloud as there are no edits to store.');
622622
if (fromStoreCommand) {
623-
this.notificationService.info(localize('no edits to store', 'Skipped storing edit session as there are no edits to store.'));
623+
this.notificationService.info(localize('no working changes to store', 'Skipped storing working changes in the cloud as there are no edits to store.'));
624624
}
625625
return undefined;
626626
}
@@ -646,11 +646,11 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
646646
case UserDataSyncErrorCode.TooLarge:
647647
// Uploading a payload can fail due to server size limits
648648
this.telemetryService.publicLog2<UploadFailedEvent, UploadFailedClassification>('editSessions.upload.failed', { reason: 'TooLarge' });
649-
this.notificationService.error(localize('payload too large', 'Your edit session exceeds the size limit and cannot be stored.'));
649+
this.notificationService.error(localize('payload too large', 'Your working changes exceed the size limit and cannot be stored.'));
650650
break;
651651
default:
652652
this.telemetryService.publicLog2<UploadFailedEvent, UploadFailedClassification>('editSessions.upload.failed', { reason: 'unknown' });
653-
this.notificationService.error(localize('payload failed', 'Your edit session cannot be stored.'));
653+
this.notificationService.error(localize('payload failed', 'Your working changes cannot be stored.'));
654654
break;
655655
}
656656
}

src/vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
295295
private async getAccountPreference(fromContinueOn: boolean): Promise<AuthenticationSession & { providerId: string } | undefined> {
296296
const quickpick = this.quickInputService.createQuickPick<ExistingSession | AuthenticationProviderOption | IQuickPickItem>();
297297
quickpick.ok = false;
298-
quickpick.placeholder = localize('choose account placeholder', "Select an account to turn on Edit Sessions");
298+
quickpick.placeholder = localize('choose account placeholder', "Select an account to store your working changes in the cloud");
299299
quickpick.ignoreFocusOut = true;
300300
quickpick.items = await this.createQuickpickItems(fromContinueOn);
301301

@@ -459,7 +459,7 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
459459
constructor() {
460460
super({
461461
id: 'workbench.editSessions.actions.signIn',
462-
title: localize('sign in', 'Turn on Edit Sessions...'),
462+
title: localize('sign in', 'Turn on Cloud Changes...'),
463463
category: EDIT_SESSION_SYNC_CATEGORY,
464464
precondition: ContextKeyExpr.equals(EDIT_SESSIONS_SIGNED_IN_KEY, false),
465465
menu: [{
@@ -485,7 +485,7 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
485485
constructor() {
486486
super({
487487
id: 'workbench.editSessions.actions.resetAuth',
488-
title: localize('reset auth.v3', 'Turn off Edit Sessions...'),
488+
title: localize('reset auth.v3', 'Turn off Cloud Changes...'),
489489
category: EDIT_SESSION_SYNC_CATEGORY,
490490
precondition: ContextKeyExpr.equals(EDIT_SESSIONS_SIGNED_IN_KEY, true),
491491
menu: [{
@@ -502,8 +502,8 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
502502
async run() {
503503
const result = await that.dialogService.confirm({
504504
type: 'info',
505-
message: localize('sign out of edit sessions clear data prompt.v2', 'Do you want to turn off Edit Sessions?'),
506-
checkbox: { label: localize('delete all edit sessions.v2', 'Delete all stored data from the cloud.') },
505+
message: localize('sign out of cloud changes clear data prompt', 'Do you want to disable storing working changes in the cloud?'),
506+
checkbox: { label: localize('delete all cloud changes', 'Delete all stored data from the cloud.') },
507507
primaryButton: localize('clear data confirm', 'Yes'),
508508
});
509509
if (result.confirmed) {

src/vs/workbench/contrib/editSessions/browser/editSessionsViews.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export class EditSessionsDataViews extends Disposable {
140140
constructor() {
141141
super({
142142
id: 'workbench.editSessions.actions.deleteAll',
143-
title: localize('workbench.editSessions.actions.deleteAll', "Delete All Edit Sessions"),
143+
title: localize('workbench.editSessions.actions.deleteAll', "Delete All Working Changes from Cloud"),
144144
icon: Codicon.trash,
145145
menu: {
146146
id: MenuId.ViewTitle,
@@ -153,7 +153,7 @@ export class EditSessionsDataViews extends Disposable {
153153
const dialogService = accessor.get(IDialogService);
154154
const editSessionStorageService = accessor.get(IEditSessionsStorageService);
155155
const result = await dialogService.confirm({
156-
message: localize('confirm delete all', 'Are you sure you want to permanently delete all edit sessions? You cannot undo this action.'),
156+
message: localize('confirm delete all', 'Are you sure you want to permanently delete all stored changes from the cloud? You cannot undo this action.'),
157157
type: 'warning',
158158
title: EDIT_SESSIONS_TITLE
159159
});

src/vs/workbench/contrib/editSessions/common/editSessions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import { IResourceRefHandle } from 'vs/platform/userDataSync/common/userDataSync
1515
import { Event } from 'vs/base/common/event';
1616

1717
export const EDIT_SESSION_SYNC_CATEGORY: ILocalizedString = {
18-
original: 'Edit Sessions',
19-
value: localize('session sync', 'Edit Sessions')
18+
original: 'Cloud Changes',
19+
value: localize('cloud changes', 'Cloud Changes')
2020
};
2121

2222
export const IEditSessionsStorageService = createDecorator<IEditSessionsStorageService>('IEditSessionsStorageService');
@@ -82,9 +82,9 @@ export const EDIT_SESSIONS_SIGNED_IN = new RawContextKey<boolean>(EDIT_SESSIONS_
8282

8383
export const EDIT_SESSIONS_CONTAINER_ID = 'workbench.view.editSessions';
8484
export const EDIT_SESSIONS_DATA_VIEW_ID = 'workbench.views.editSessions.data';
85-
export const EDIT_SESSIONS_TITLE = localize('edit sessions', 'Edit Sessions');
85+
export const EDIT_SESSIONS_TITLE = localize('cloud changes', 'Cloud Changes');
8686

87-
export const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, localize('editSessionViewIcon', 'View icon of the edit sessions view.'));
87+
export const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, localize('editSessionViewIcon', 'View icon of the cloud changes view.'));
8888

8989
export const EDIT_SESSIONS_SHOW_VIEW = new RawContextKey<boolean>('editSessionsShowView', false);
9090

0 commit comments

Comments
 (0)