提交 b63ccefb 编写于 作者: S Sandeep Somavarapu

#100315 rename to Settings Sync

上级 320fbada
......@@ -45,7 +45,7 @@ class LogOutputChannels extends Disposable implements IWorkbenchContribution {
}
private registerCommonContributions(): void {
this.registerLogChannel(Constants.userDataSyncLogChannelId, nls.localize('userDataSyncLog', "Preferences Sync"), this.environmentService.userDataSyncLogResource);
this.registerLogChannel(Constants.userDataSyncLogChannelId, nls.localize('userDataSyncLog', "Settings Sync"), this.environmentService.userDataSyncLogResource);
this.registerLogChannel(Constants.rendererLogChannelId, nls.localize('rendererLog', "Window"), this.environmentService.logFile);
}
......
......@@ -1421,7 +1421,7 @@ class SyncControls extends Disposable {
DOM.hide(this.lastSyncedLabel);
this.turnOnSyncButton.enabled = true;
this.turnOnSyncButton.label = localize('turnOnSyncButton', "Turn on Preferences Sync");
this.turnOnSyncButton.label = localize('turnOnSyncButton', "Turn on Settings Sync");
DOM.hide(this.turnOnSyncButton.element);
this._register(this.turnOnSyncButton.onDidClick(async () => {
......
......@@ -28,7 +28,7 @@ class UserDataSyncReportIssueContribution extends Disposable implements IWorkben
case UserDataSyncErrorCode.LocalTooManyRequests:
case UserDataSyncErrorCode.TooManyRequests:
const operationId = error.operationId ? localize('operationId', "Operation Id: {0}", error.operationId) : undefined;
const message = localize('too many requests', "Turned off syncing preferences on this device because it is making too many requests.");
const message = localize('too many requests', "Turned off syncing settings on this device because it is making too many requests.");
this.notificationService.notify({
severity: Severity.Error,
message: operationId ? `${message} ${operationId}` : message,
......
......@@ -90,7 +90,7 @@ export class UserDataSyncMergesViewPane extends TreeViewPane {
this.buttonsContainer = DOM.append(container, DOM.$('.manual-sync-buttons-container'));
this.syncButton = this._register(new Button(this.buttonsContainer));
this.syncButton.label = localize('turn on sync', "Turn on Preferences Sync");
this.syncButton.label = localize('turn on sync', "Turn on Settings Sync");
this.updateSyncButtonEnablement();
this._register(attachButtonStyler(this.syncButton, this.themeService));
this._register(this.syncButton.onDidClick(() => this.apply()));
......
......@@ -30,7 +30,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
import { IAction, Action } from 'vs/base/common/actions';
import { IUserDataSyncWorkbenchService, CONTEXT_SYNC_STATE, getSyncAreaLabel, CONTEXT_ACCOUNT_STATE, AccountStatus, CONTEXT_ENABLE_ACTIVITY_VIEWS, SHOW_SYNC_LOG_COMMAND_ID, CONFIGURE_SYNC_COMMAND_ID, SYNC_MERGES_VIEW_ID, CONTEXT_ENABLE_SYNC_MERGES_VIEW } from 'vs/workbench/services/userDataSync/common/userDataSync';
import { IUserDataSyncWorkbenchService, CONTEXT_SYNC_STATE, getSyncAreaLabel, CONTEXT_ACCOUNT_STATE, AccountStatus, CONTEXT_ENABLE_ACTIVITY_VIEWS, SHOW_SYNC_LOG_COMMAND_ID, CONFIGURE_SYNC_COMMAND_ID, SYNC_MERGES_VIEW_ID, CONTEXT_ENABLE_SYNC_MERGES_VIEW, SYNC_TITLE } from 'vs/workbench/services/userDataSync/common/userDataSync';
import { IUserDataSyncMachinesService, IUserDataSyncMachine } from 'vs/platform/userDataSync/common/userDataSyncMachines';
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
......@@ -161,7 +161,7 @@ export class UserDataSyncDataViews extends Disposable {
constructor() {
super({
id: `workbench.actions.sync.turnOffSyncOnMachine`,
title: localize('workbench.actions.sync.turnOffSyncOnMachine', "Turn off Preferences Sync"),
title: localize('workbench.actions.sync.turnOffSyncOnMachine', "Turn off Settings Sync"),
menu: {
id: MenuId.ViewItemContext,
when: ContextKeyExpr.and(ContextKeyEqualsExpr.create('view', id), ContextKeyEqualsExpr.create('viewItem', 'sync-machine')),
......@@ -247,7 +247,7 @@ export class UserDataSyncDataViews extends Disposable {
const result = await dialogService.confirm({
message: localize({ key: 'confirm replace', comment: ['A confirmation message to replace current user data (settings, extensions, keybindings, snippets) with selected version'] }, "Would you like to replace your current {0} with selected?", getSyncAreaLabel(syncResource)),
type: 'info',
title: localize('preferences sync', "Preferences Sync")
title: SYNC_TITLE
});
if (result.confirmed) {
return userDataSyncService.replace(URI.parse(resource));
......
......@@ -20,7 +20,7 @@ import { Action } from 'vs/base/common/actions';
import { IWorkbenchIssueService } from 'vs/workbench/contrib/issue/electron-browser/issue';
import { Disposable } from 'vs/base/common/lifecycle';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { CONTEXT_SYNC_STATE, SHOW_SYNC_LOG_COMMAND_ID } from 'vs/workbench/services/userDataSync/common/userDataSync';
import { CONTEXT_SYNC_STATE, SHOW_SYNC_LOG_COMMAND_ID, SYNC_TITLE } from 'vs/workbench/services/userDataSync/common/userDataSync';
class UserDataSyncServicesContribution implements IWorkbenchContribution {
......@@ -49,11 +49,11 @@ class UserDataSyncReportIssueContribution extends Disposable implements IWorkben
case UserDataSyncErrorCode.LocalTooManyRequests:
case UserDataSyncErrorCode.TooManyRequests:
const operationId = error.operationId ? localize('operationId', "Operation Id: {0}", error.operationId) : undefined;
const message = localize({ key: 'too many requests', comment: ['Preferences Sync is the name of the feature'] }, "Preferences sync is disabled because the current device is making too many requests. Please report an issue by providing the sync logs.");
const message = localize({ key: 'too many requests', comment: ['Settings Sync is the name of the feature'] }, "Settings sync is disabled because the current device is making too many requests. Please report an issue by providing the sync logs.");
this.notificationService.notify({
severity: Severity.Error,
message: operationId ? `${message} ${operationId}` : message,
source: error.operationId ? localize('preferences sync', "Preferences Sync. Operation Id: {0}", error.operationId) : undefined,
source: error.operationId ? localize('settings sync', "Settings Sync. Operation Id: {0}", error.operationId) : undefined,
actions: {
primary: [
new Action('Show Sync Logs', localize('show sync logs', "Show Log"), undefined, true, () => this.commandService.executeCommand(SHOW_SYNC_LOG_COMMAND_ID)),
......@@ -75,7 +75,7 @@ registerAction2(class OpenSyncBackupsFolder extends Action2 {
super({
id: 'workbench.userData.actions.openSyncBackupsFolder',
title: { value: localize('Open Backup folder', "Open Local Backups Folder"), original: 'Open Local Backups Folder' },
category: { value: localize('sync preferences', "Preferences Sync"), original: `Preferences Sync` },
category: { value: SYNC_TITLE, original: `Settings Sync` },
menu: {
id: MenuId.CommandPalette,
when: CONTEXT_SYNC_STATE.notEqualsTo(SyncStatus.Uninitialized),
......
......@@ -6,7 +6,7 @@
import { IUserDataSyncService, IAuthenticationProvider, getUserDataSyncStore, isAuthenticationProvider, IUserDataAutoSyncService, SyncResource, IResourcePreview, ISyncResourcePreview, Change, IManualSyncTask } from 'vs/platform/userDataSync/common/userDataSync';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IUserDataSyncWorkbenchService, IUserDataSyncAccount, AccountStatus, CONTEXT_SYNC_ENABLEMENT, CONTEXT_SYNC_STATE, CONTEXT_ACCOUNT_STATE, SHOW_SYNC_LOG_COMMAND_ID, getSyncAreaLabel, IUserDataSyncPreview, IUserDataSyncResource, CONTEXT_ENABLE_SYNC_MERGES_VIEW, SYNC_MERGES_VIEW_ID, CONTEXT_ENABLE_ACTIVITY_VIEWS, SYNC_VIEW_CONTAINER_ID } from 'vs/workbench/services/userDataSync/common/userDataSync';
import { IUserDataSyncWorkbenchService, IUserDataSyncAccount, AccountStatus, CONTEXT_SYNC_ENABLEMENT, CONTEXT_SYNC_STATE, CONTEXT_ACCOUNT_STATE, SHOW_SYNC_LOG_COMMAND_ID, getSyncAreaLabel, IUserDataSyncPreview, IUserDataSyncResource, CONTEXT_ENABLE_SYNC_MERGES_VIEW, SYNC_MERGES_VIEW_ID, CONTEXT_ENABLE_ACTIVITY_VIEWS, SYNC_VIEW_CONTAINER_ID, SYNC_TITLE } from 'vs/workbench/services/userDataSync/common/userDataSync';
import { AuthenticationSession, AuthenticationSessionsChangeEvent } from 'vs/editor/common/modes';
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
import { Emitter, Event } from 'vs/base/common/event';
......@@ -203,9 +203,9 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
let value: { token: string, authenticationProviderId: string } | undefined = undefined;
if (current) {
try {
this.logService.trace('Preferences Sync: Updating the token for the account', current.accountName);
this.logService.trace('Settings Sync: Updating the token for the account', current.accountName);
const token = current.token;
this.logService.trace('Preferences Sync: Token updated for the account', current.accountName);
this.logService.trace('Settings Sync: Token updated for the account', current.accountName);
value = { token, authenticationProviderId: current.authenticationProviderId };
} catch (e) {
this.logService.error(e);
......@@ -236,8 +236,8 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
throw new Error(localize('no account', "No account available"));
}
const preferencesSyncTitle = localize('preferences sync', "Preferences Sync");
const title = `${preferencesSyncTitle} [(${localize('details', "details")})](command:${SHOW_SYNC_LOG_COMMAND_ID})`;
const syncTitle = SYNC_TITLE;
const title = `${syncTitle} [(${localize('details', "details")})](command:${SHOW_SYNC_LOG_COMMAND_ID})`;
await this.syncBeforeTurningOn(title);
await this.userDataAutoSyncService.turnOn();
this.notificationService.info(localize('sync turned on', "{0} is turned on", title));
......@@ -432,7 +432,7 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
const quickPick = this.quickInputService.createQuickPick<AccountQuickPickItem>();
disposables.add(quickPick);
quickPick.title = localize('pick an account', "Preferences Sync");
quickPick.title = SYNC_TITLE;
quickPick.ok = false;
quickPick.placeholder = localize('choose account placeholder', "Select an account");
quickPick.ignoreFocusOut = true;
......@@ -501,7 +501,7 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
this.notificationService.notify({
severity: Severity.Error,
message: localize('successive auth failures', "Preferences sync was turned off because of successive authorization failures. Please sign in again to continue synchronizing"),
message: localize('successive auth failures', "Settings sync was turned off because of successive authorization failures. Please sign in again to continue synchronizing"),
actions: {
primary: [new Action('sign in', localize('sign in', "Sign in"), undefined, true, () => this.signIn())]
}
......
......@@ -79,6 +79,8 @@ export const enum AccountStatus {
Available = 'available',
}
export const SYNC_TITLE = localize('sync category', "Settings Sync");
// Contexts
export const CONTEXT_SYNC_STATE = new RawContextKey<string>('syncStatus', SyncStatus.Uninitialized);
export const CONTEXT_SYNC_ENABLEMENT = new RawContextKey<boolean>('syncEnabled', false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册