Carbon Edit Strings moved to Sql Folder (#15884)

* added first strings

* added more localized files

* translated all strings in vscode

* added exported strings to editStrings

* updated files

* more changes

* moved to base
This commit is contained in:
Alex Ma
2021-06-25 15:08:29 -07:00
committed by GitHub
parent 768bf47aec
commit 7c6368b4b6
15 changed files with 103 additions and 44 deletions

View File

@@ -0,0 +1,46 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { localize } from 'vs/nls';
// Contains vs strings that are nonnative to vscode that need to be translated.
export const issueReporterMainAzuredatastudio = localize('azuredatastudio', "Azure Data Studio");
export const updateConfigContributionDefault = localize('default', "Enable automatic update checks. Azure Data Studio will check for updates automatically and periodically.");
export const updateConfigContributionEnableWindowsBackgroundUpdates = localize('enableWindowsBackgroundUpdates', "Enable to download and install new Azure Data Studio Versions in the background on Windows");
export const updateConfigContributionShowReleaseNotes = localize('showReleaseNotes', "Show Release Notes after an update. The Release Notes are opened in a new web browser window.");
export const menusExtensionPointDashboardToolbar = localize('dashboard.toolbar', "The dashboard toolbar action menu");
export const menusExtensionPointNotebookCellTitle = localize('notebook.cellTitle', "The notebook cell title menu");
export const menusExtensionPointNotebookTitle = localize('notebook.title', "The notebook title menu");
export const menusExtensionPointNotebookToolbar = localize('notebook.toolbar', "The notebook toolbar menu");
export const menusExtensionPointDataExplorerAction = localize('dataExplorer.action', "The dataexplorer view container title action menu");
export const menusExtensionPointDataExplorerContext = localize('dataExplorer.context', "The dataexplorer item context menu");
export const menusExtensionPointObjectExplorerContext = localize('objectExplorer.context', "The object explorer item context menu");
export const menusExtensionPointConnectionDialogBrowseTreeContext = localize('connectionDialogBrowseTree.context', "The connection dialog's browse tree context menu");
export const menusExtensionPointDataGridContext = localize('dataGrid.context', "The data grid item context menu");
export const extensionsContributionExtensionsPolicy = localize('extensionsPolicy', "Sets the security policy for downloading extensions.");
export const extensionsContributionInstallVSIXActionAllowNone = localize('InstallVSIXAction.allowNone', 'Your extension policy does not allow installing extensions. Please change your extension policy and try again.');
export function extensionsContributionInstallVSIXActionSuccessReload(extension: string): string { return localize('InstallVSIXAction.successReload', "Completed installing {0} extension from VSIX. Please reload Azure Data Studio to enable it.", extension); }
export const extensionsActionsPostUninstallTooltip = localize('postUninstallTooltip', "Please reload Azure Data Studio to complete the uninstallation of this extension.");
export const extensionsActionsPostUpdateTooltip = localize('postUpdateTooltip', "Please reload Azure Data Studio to enable the updated extension.");
export const extensionsActionsEnableLocally = localize('enable locally', "Please reload Azure Data Studio to enable this extension locally.");
export const extensionsActionsPostEnableTooltip = localize('postEnableTooltip', "Please reload Azure Data Studio to enable this extension.");
export const extensionsActionsPostDisableTooltip = localize('postDisableTooltip', "Please reload Azure Data Studio to disable this extension.");
export function extensionsActionsUninstallExtensionComplete(extension: string): string { return localize('uninstallExtensionComplete', "Please reload Azure Data Studio to complete the uninstallation of the extension {0}.", extension); }
export function extensionsActionsEnableRemote(remoteServer: string): string { return localize('enable remote', "Please reload Azure Data Studio to enable this extension in {0}.", remoteServer); }
export function extensionsActionsInstallExtensionCompletedAndReloadRequired(extension: string): string { return localize('installExtensionCompletedAndReloadRequired', "Installing extension {0} is completed. Please reload Azure Data Studio to enable it.", extension); }
export function extensionsActionsReinstallActionSuccessReload(extension: string): string { return localize('ReinstallAction.successReload', "Please reload Azure Data Studio to complete reinstalling the extension {0}.", extension); }
export const extensionsViewletRecommendedExtensions = localize('recommendedExtensions', "Marketplace");
export const extensionsViewsScenarioTypeUndefined = localize('scenarioTypeUndefined', 'The scenario type for extension recommendations must be provided.');
export function extensionsWorkbenchServiceIncompatible(extension: string, version: string) { return localize('incompatible', "Unable to install extension '{0}' as it is not compatible with Azure Data Studio '{1}'.", extension, version); }
export const fileActionsContributionNewQuery = localize('newQuery', "New Query");
export const fileActionsContributionMiNewQuery = localize({ key: 'miNewQuery', comment: ['&& denotes a mnemonic'] }, "New &&Query");
export const fileActionsContributionMiNewNotebook = localize({ key: 'miNewNotebook', comment: ['&& denotes a mnemonic'] }, "&&New Notebook");
export const filesContributionMaxMemoryForLargeFilesMB = localize('maxMemoryForLargeFilesMB', "Controls the memory available to Azure Data Studio after restart when trying to open large files. Same effect as specifying `--max-memory=NEWSIZE` on the command line.");
export function localizationsContributionUpdateLocale(locale: string): string { return localize('updateLocale', "Would you like to change Azure Data Studio's UI language to {0} and restart?", locale); }
export function localizationsContributionActivateLanguagePack(locale: string): string { return localize('activateLanguagePack', "In order to use Azure Data Studio in {0}, Azure Data Studio needs to restart.", locale); }
export const watermarkNewSqlFile = localize('watermark.newSqlFile', "New SQL File");
export const watermarkNewNotebook = localize('watermark.newNotebook', "New Notebook");
export const desktopContributionMiinstallVsix = localize({ key: 'miinstallVsix', comment: ['&& denotes a mnemonic'] }, "Install Extension from VSIX Package");

View File

@@ -79,7 +79,7 @@ export interface IProductConfiguration {
readonly recommendedExtensions: string[]; // {{SQL CARBON EDIT}} readonly recommendedExtensions: string[]; // {{SQL CARBON EDIT}}
readonly recommendedExtensionsByScenario: { [area: string]: Array<string> }; // {{SQL CARBON EDIT}} readonly recommendedExtensionsByScenario: { [area: string]: Array<string> }; // {{SQL CARBON EDIT}}
readonly vscodeVersion: string; // {{SQL CARBON EDIT}} add vscode version readonly vscodeVersion: string; // {{SQL CARBON EDIT}} add vscode version
readonly gettingStartedUrl: string; // {SQL CARBON EDIT} readonly gettingStartedUrl: string; // {{SQL CARBON EDIT}}
readonly disabledFeatures?: string[]; // {{SQL CARBON EDIT}} readonly disabledFeatures?: string[]; // {{SQL CARBON EDIT}}
readonly crashReporter?: { readonly crashReporter?: {

View File

@@ -27,6 +27,7 @@ import { IssueReporterWindowConfiguration, IssueReporterData, IssueReporterExten
import { Codicon } from 'vs/base/common/codicons'; import { Codicon } from 'vs/base/common/codicons';
import { renderIcon } from 'vs/base/browser/ui/iconLabel/iconLabels'; import { renderIcon } from 'vs/base/browser/ui/iconLabel/iconLabels';
import { ElectronIPCMainProcessService } from 'vs/platform/ipc/electron-sandbox/mainProcessService'; import { ElectronIPCMainProcessService } from 'vs/platform/ipc/electron-sandbox/mainProcessService';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
const MAX_URL_LENGTH = 2045; const MAX_URL_LENGTH = 2045;
@@ -672,7 +673,7 @@ export class IssueReporter extends Disposable {
sourceSelect.innerText = ''; sourceSelect.innerText = '';
sourceSelect.append(this.makeOption('', localize('selectSource', "Select source"), true)); sourceSelect.append(this.makeOption('', localize('selectSource', "Select source"), true));
sourceSelect.append(this.makeOption('azuredatastudio', localize('azuredatastudio', "Azure Data Studio"), false)); // {{SQL CARBON EDIT}} Update name sourceSelect.append(this.makeOption('azuredatastudio', locConstants.issueReporterMainAzuredatastudio, false)); // {{SQL CARBON EDIT}} Update name
sourceSelect.append(this.makeOption('extension', localize('extension', "An extension"), false)); sourceSelect.append(this.makeOption('extension', localize('extension', "An extension"), false));
if (this.configuration.product.reportMarketplaceIssueUrl) { if (this.configuration.product.reportMarketplaceIssueUrl) {
sourceSelect.append(this.makeOption('marketplace', localize('marketplace', "Extensions marketplace"), false)); sourceSelect.append(this.makeOption('marketplace', localize('marketplace', "Extensions marketplace"), false));

View File

@@ -7,6 +7,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry';
import { localize } from 'vs/nls'; import { localize } from 'vs/nls';
import { isWindows, isWeb } from 'vs/base/common/platform'; import { isWindows, isWeb } from 'vs/base/common/platform';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
const configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration); const configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration);
configurationRegistry.registerConfiguration({ configurationRegistry.registerConfiguration({
@@ -26,7 +27,7 @@ configurationRegistry.registerConfiguration({
localize('none', "Disable updates."), localize('none', "Disable updates."),
localize('manual', "Disable automatic background update checks. Updates will be available if you manually check for updates."), localize('manual', "Disable automatic background update checks. Updates will be available if you manually check for updates."),
localize('start', "Check for updates only on startup. Disable automatic background update checks."), localize('start', "Check for updates only on startup. Disable automatic background update checks."),
localize('default', "Enable automatic update checks. Azure Data Studio will check for updates automatically and periodically.") // {{SQL CARBON EDIT}} Change product name to ADS locConstants.updateConfigContributionDefault // {{SQL CARBON EDIT}} Change product name to ADS
] ]
}, },
'update.channel': { 'update.channel': {
@@ -41,14 +42,14 @@ configurationRegistry.registerConfiguration({
default: true, default: true,
scope: ConfigurationScope.APPLICATION, scope: ConfigurationScope.APPLICATION,
title: localize('enableWindowsBackgroundUpdatesTitle', "Enable Background Updates on Windows"), title: localize('enableWindowsBackgroundUpdatesTitle', "Enable Background Updates on Windows"),
description: localize('enableWindowsBackgroundUpdates', "Enable to download and install new Azure Data Studio Versions in the background on Windows"), // {{SQL CARBON EDIT}} Change product name to ADS description: locConstants.updateConfigContributionEnableWindowsBackgroundUpdates, // {{SQL CARBON EDIT}} Change product name to ADS
included: isWindows && !isWeb included: isWindows && !isWeb
}, },
'update.showReleaseNotes': { 'update.showReleaseNotes': {
type: 'boolean', type: 'boolean',
default: true, default: true,
scope: ConfigurationScope.APPLICATION, scope: ConfigurationScope.APPLICATION,
description: localize('showReleaseNotes', "Show Release Notes after an update. The Release Notes are opened in a new web browser window."), // {{SQL CARBON EDIT}} Update text to be correct for ADS description: locConstants.updateConfigContributionShowReleaseNotes, // {{SQL CARBON EDIT}} Update text to be correct for ADS
tags: ['usesOnlineServices'] tags: ['usesOnlineServices']
} }
} }

View File

@@ -16,6 +16,7 @@ import { DisposableStore } from 'vs/base/common/lifecycle';
import { ThemeIcon } from 'vs/platform/theme/common/themeService'; import { ThemeIcon } from 'vs/platform/theme/common/themeService';
import { Iterable } from 'vs/base/common/iterator'; import { Iterable } from 'vs/base/common/iterator';
import { index } from 'vs/base/common/arrays'; import { index } from 'vs/base/common/arrays';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
interface IAPIMenu { interface IAPIMenu {
readonly key: string; readonly key: string;
@@ -230,47 +231,47 @@ const apiMenus: IAPIMenu[] = [
{ {
key: 'dashboard/toolbar', key: 'dashboard/toolbar',
id: MenuId.DashboardToolbar, id: MenuId.DashboardToolbar,
description: localize('dashboard.toolbar', "The dashboard toolbar action menu") description: locConstants.menusExtensionPointDashboardToolbar
}, },
{ {
key: 'notebook/cell/title', key: 'notebook/cell/title',
id: MenuId.NotebookCellTitle, id: MenuId.NotebookCellTitle,
description: localize('notebook.cellTitle', "The notebook cell title menu") description: locConstants.menusExtensionPointNotebookCellTitle
}, },
{ {
key: 'notebooks/title', key: 'notebooks/title',
id: MenuId.NotebookTitle, id: MenuId.NotebookTitle,
description: localize('notebook.title', "The notebook title menu") description: locConstants.menusExtensionPointNotebookTitle
}, },
{ {
key: 'notebook/toolbar', key: 'notebook/toolbar',
id: MenuId.NotebookToolbar, id: MenuId.NotebookToolbar,
description: localize('notebook.toolbar', "The notebook toolbar menu") description: locConstants.menusExtensionPointNotebookToolbar
}, },
{ {
key: 'dataExplorer/action', key: 'dataExplorer/action',
id: MenuId.DataExplorerAction, id: MenuId.DataExplorerAction,
description: localize('dataExplorer.action', "The dataexplorer view container title action menu") description: locConstants.menusExtensionPointDataExplorerAction
}, },
{ {
key: 'dataExplorer/context', key: 'dataExplorer/context',
id: MenuId.DataExplorerContext, id: MenuId.DataExplorerContext,
description: localize('dataExplorer.context', "The dataexplorer item context menu") description: locConstants.menusExtensionPointDataExplorerContext
}, },
{ {
key: 'objectExplorer/item/context', key: 'objectExplorer/item/context',
id: MenuId.ObjectExplorerItemContext, id: MenuId.ObjectExplorerItemContext,
description: localize('objectExplorer.context', "The object explorer item context menu") description: locConstants.menusExtensionPointObjectExplorerContext
}, },
{ {
key: 'connectionDialog/browseTree', key: 'connectionDialog/browseTree',
id: MenuId.ConnectionDialogBrowseTreeContext, id: MenuId.ConnectionDialogBrowseTreeContext,
description: localize('connectionDialogBrowseTree.context', "The connection dialog's browse tree context menu") description: locConstants.menusExtensionPointConnectionDialogBrowseTreeContext
}, },
{ {
key: 'dataGrid/item/context', key: 'dataGrid/item/context',
id: MenuId.DataGridItemContext, id: MenuId.DataGridItemContext,
description: localize('dataGrid.context', "The data grid item context menu") description: locConstants.menusExtensionPointDataGridContext
} }
// {{SQL CARBON EDIT}} end menu entries // {{SQL CARBON EDIT}} end menu entries
]; ];

View File

@@ -73,6 +73,7 @@ import { Promises } from 'vs/base/common/async';
import { EditorExtensions } from 'vs/workbench/common/editor'; import { EditorExtensions } from 'vs/workbench/common/editor';
import { WORKSPACE_TRUST_EXTENSION_SUPPORT } from 'vs/workbench/services/workspaces/common/workspaceTrust'; import { WORKSPACE_TRUST_EXTENSION_SUPPORT } from 'vs/workbench/services/workspaces/common/workspaceTrust';
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; // {{SQL CARBON EDIT}} import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; // {{SQL CARBON EDIT}}
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
// Singletons // Singletons
registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService); registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService);
@@ -169,7 +170,7 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
}, },
'extensions.extensionsPolicy': { // {{SQL CARBON EDIT}} 'extensions.extensionsPolicy': { // {{SQL CARBON EDIT}}
type: 'string', type: 'string',
description: localize('extensionsPolicy', "Sets the security policy for downloading extensions."), description: locConstants.extensionsContributionExtensionsPolicy,
scope: ConfigurationScope.APPLICATION, scope: ConfigurationScope.APPLICATION,
default: ExtensionsPolicy.allowAll default: ExtensionsPolicy.allowAll
}, },
@@ -695,7 +696,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
const isExtensionInstallationAllowed = (configurationService: IConfigurationService, notificationService: INotificationService): boolean => { const isExtensionInstallationAllowed = (configurationService: IConfigurationService, notificationService: INotificationService): boolean => {
const allowAll = configurationService.getValue<string>(ExtensionsPolicyKey) === ExtensionsPolicy.allowAll; const allowAll = configurationService.getValue<string>(ExtensionsPolicyKey) === ExtensionsPolicy.allowAll;
if (!allowAll) { if (!allowAll) {
notificationService.error(localize('InstallVSIXAction.allowNone', 'Your extension policy does not allow installing extensions. Please change your extension policy and try again.')); notificationService.error(locConstants.extensionsContributionInstallVSIXActionAllowNone);
} }
return allowAll; return allowAll;
}; };
@@ -800,7 +801,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
continue; continue;
} }
const requireReload = !(extension.local && extensionService.canAddExtension(toExtensionDescription(extension.local))); const requireReload = !(extension.local && extensionService.canAddExtension(toExtensionDescription(extension.local)));
const message = requireReload ? localize('InstallVSIXAction.successReload', "Completed installing {0} extension from VSIX. Please reload Azure Data Studio to enable it.", extension.displayName || extension.name) // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio const message = requireReload ? locConstants.extensionsContributionInstallVSIXActionSuccessReload(extension.displayName || extension.name) // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
: localize('InstallVSIXAction.success', "Completed installing {0} extension from VSIX.", extension.displayName || extension.name); : localize('InstallVSIXAction.success', "Completed installing {0} extension from VSIX.", extension.displayName || extension.name);
const actions = requireReload ? [{ const actions = requireReload ? [{
label: localize('InstallVSIXAction.reloadNow', "Reload Now"), label: localize('InstallVSIXAction.reloadNow', "Reload Now"),

View File

@@ -61,6 +61,7 @@ import { infoIcon, manageExtensionIcon, syncEnabledIcon, syncIgnoredIcon, trustI
import { isWeb } from 'vs/base/common/platform'; import { isWeb } from 'vs/base/common/platform';
import { isWorkspaceTrustEnabled } from 'vs/workbench/services/workspaces/common/workspaceTrust'; import { isWorkspaceTrustEnabled } from 'vs/workbench/services/workspaces/common/workspaceTrust';
import { IExtensionManifestPropertiesService } from 'vs/workbench/services/extensions/common/extensionManifestPropertiesService'; import { IExtensionManifestPropertiesService } from 'vs/workbench/services/extensions/common/extensionManifestPropertiesService';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
function getRelativeDateLabel(date: Date): string { function getRelativeDateLabel(date: Date): string {
const delta = new Date().getTime() - date.getTime(); const delta = new Date().getTime() - date.getTime();
@@ -688,7 +689,7 @@ export class UninstallAction extends ExtensionAction {
alert(localize('uninstallExtensionStart', "Uninstalling extension {0} started.", this.extension.displayName)); alert(localize('uninstallExtensionStart', "Uninstalling extension {0} started.", this.extension.displayName));
return this.extensionsWorkbenchService.uninstall(this.extension).then(() => { return this.extensionsWorkbenchService.uninstall(this.extension).then(() => {
alert(localize('uninstallExtensionComplete', "Please reload Azure Data Studio to complete the uninstallation of the extension {0}.", this.extension!.displayName)); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio alert(locConstants.extensionsActionsUninstallExtensionComplete(this.extension!.displayName)); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
}); });
} }
} }
@@ -1293,8 +1294,8 @@ export class ReloadAction extends ExtensionAction {
this.enabled = true; this.enabled = true;
this.label = localize('reloadRequired', "Reload Required"); this.label = localize('reloadRequired', "Reload Required");
// {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
this.tooltip = localize('postUninstallTooltip', "Please reload Azure Data Studio to complete the uninstallation of this extension."); this.tooltip = locConstants.extensionsActionsPostUninstallTooltip;
alert(localize('uninstallExtensionComplete', "Please reload Azure Data Studio to complete the uninstallation of the extension {0}.", this.extension.displayName)); alert(locConstants.extensionsActionsUninstallExtensionComplete(this.extension.displayName));
} }
return; return;
} }
@@ -1316,7 +1317,7 @@ export class ReloadAction extends ExtensionAction {
if (this.extension.version !== runningExtension.version) { if (this.extension.version !== runningExtension.version) {
this.enabled = true; this.enabled = true;
this.label = localize('reloadRequired', "Reload Required"); this.label = localize('reloadRequired', "Reload Required");
this.tooltip = localize('postUpdateTooltip', "Please reload Azure Data Studio to enable the updated extension."); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio this.tooltip = locConstants.extensionsActionsPostUpdateTooltip; // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
return; return;
} }
@@ -1326,7 +1327,7 @@ export class ReloadAction extends ExtensionAction {
if (runningExtensionServer === this.extensionManagementServerService.remoteExtensionManagementServer && this.extensionManifestPropertiesService.prefersExecuteOnUI(this.extension.local!.manifest)) { if (runningExtensionServer === this.extensionManagementServerService.remoteExtensionManagementServer && this.extensionManifestPropertiesService.prefersExecuteOnUI(this.extension.local!.manifest)) {
this.enabled = true; this.enabled = true;
this.label = localize('reloadRequired', "Reload Required"); this.label = localize('reloadRequired', "Reload Required");
this.tooltip = localize('enable locally', "Please reload Visual Studio Code to enable this extension locally."); this.tooltip = locConstants.extensionsActionsEnableLocally; // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
return; return;
} }
@@ -1334,7 +1335,7 @@ export class ReloadAction extends ExtensionAction {
if (runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer && this.extensionManifestPropertiesService.prefersExecuteOnWorkspace(this.extension.local!.manifest)) { if (runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer && this.extensionManifestPropertiesService.prefersExecuteOnWorkspace(this.extension.local!.manifest)) {
this.enabled = true; this.enabled = true;
this.label = localize('reloadRequired', "Reload Required"); this.label = localize('reloadRequired', "Reload Required");
this.tooltip = localize('enable remote', "Please reload Visual Studio Code to enable this extension in {0}.", this.extensionManagementServerService.remoteExtensionManagementServer?.label); this.tooltip = locConstants.extensionsActionsEnableRemote(this.extensionManagementServerService.remoteExtensionManagementServer?.label); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
return; return;
} }
} }
@@ -1346,7 +1347,7 @@ export class ReloadAction extends ExtensionAction {
if (this.extensionManifestPropertiesService.prefersExecuteOnUI(this.extension.local!.manifest)) { if (this.extensionManifestPropertiesService.prefersExecuteOnUI(this.extension.local!.manifest)) {
this.enabled = true; this.enabled = true;
this.label = localize('reloadRequired', "Reload Required"); this.label = localize('reloadRequired', "Reload Required");
this.tooltip = localize('postEnableTooltip', "Please reload Azure Data Studio to enable this extension."); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio this.tooltip = locConstants.extensionsActionsPostEnableTooltip; // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
} }
} }
if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer && runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer) { if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer && runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer) {
@@ -1354,7 +1355,7 @@ export class ReloadAction extends ExtensionAction {
if (this.extensionManifestPropertiesService.prefersExecuteOnWorkspace(this.extension.local!.manifest)) { if (this.extensionManifestPropertiesService.prefersExecuteOnWorkspace(this.extension.local!.manifest)) {
this.enabled = true; this.enabled = true;
this.label = localize('reloadRequired', "Reload Required"); this.label = localize('reloadRequired', "Reload Required");
this.tooltip = localize('postEnableTooltip', "Please reload Azure Data Studio to enable this extension."); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio this.tooltip = locConstants.extensionsActionsPostEnableTooltip; // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
} }
} }
} }
@@ -1364,7 +1365,7 @@ export class ReloadAction extends ExtensionAction {
this.enabled = true; this.enabled = true;
this.label = localize('reloadRequired', "Reload Required"); this.label = localize('reloadRequired', "Reload Required");
// {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
this.tooltip = localize('postDisableTooltip', "Please reload Azure Data Studio to disable this extension."); this.tooltip = locConstants.extensionsActionsPostDisableTooltip;
} }
} }
return; return;
@@ -1375,7 +1376,7 @@ export class ReloadAction extends ExtensionAction {
if (isEnabled && !this.extensionService.canAddExtension(toExtensionDescription(this.extension.local))) { if (isEnabled && !this.extensionService.canAddExtension(toExtensionDescription(this.extension.local))) {
this.enabled = true; this.enabled = true;
this.label = localize('reloadRequired', "Reload Required"); this.label = localize('reloadRequired', "Reload Required");
this.tooltip = localize('postEnableTooltip', "Please reload Azure Data Studio to enable this extension."); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio this.tooltip = locConstants.extensionsActionsPostEnableTooltip; // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
return; return;
} }
@@ -1386,8 +1387,8 @@ export class ReloadAction extends ExtensionAction {
if (extensionInOtherServer && extensionInOtherServer.local && this.extensionEnablementService.isEnabled(extensionInOtherServer.local)) { if (extensionInOtherServer && extensionInOtherServer.local && this.extensionEnablementService.isEnabled(extensionInOtherServer.local)) {
this.enabled = true; this.enabled = true;
this.label = localize('reloadRequired', "Reload Required"); this.label = localize('reloadRequired', "Reload Required");
this.tooltip = localize('postEnableTooltip', "Please reload Azure Data Studio to enable this extension."); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio this.tooltip = locConstants.extensionsActionsPostEnableTooltip; // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
alert(localize('installExtensionCompletedAndReloadRequired', "Installing extension {0} is completed. Please reload Azure Data Studio to enable it.", this.extension.displayName)); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio alert(locConstants.extensionsActionsInstallExtensionCompletedAndReloadRequired(this.extension.displayName)); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
return; return;
} }
} }
@@ -2396,7 +2397,7 @@ export class ReinstallAction extends Action {
.then(extension => { .then(extension => {
const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local))); const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local)));
// {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
const message = requireReload ? localize('ReinstallAction.successReload', "Please reload Azure Data Studio to complete reinstalling the extension {0}.", extension.identifier.id) const message = requireReload ? locConstants.extensionsActionsReinstallActionSuccessReload(extension.identifier.id)
: localize('ReinstallAction.success', "Reinstalling the extension {0} is completed.", extension.identifier.id); : localize('ReinstallAction.success', "Reinstalling the extension {0} is completed.", extension.identifier.id);
const actions = requireReload ? [{ const actions = requireReload ? [{
label: localize('InstallVSIXAction.reloadNow', "Reload Now"), label: localize('InstallVSIXAction.reloadNow', "Reload Now"),

View File

@@ -59,6 +59,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands';
import { isWeb } from 'vs/base/common/platform'; import { isWeb } from 'vs/base/common/platform';
import { installLocalInRemoteIcon } from 'vs/workbench/contrib/extensions/browser/extensionsIcons'; import { installLocalInRemoteIcon } from 'vs/workbench/contrib/extensions/browser/extensionsIcons';
import { registerAction2, Action2, MenuId } from 'vs/platform/actions/common/actions'; import { registerAction2, Action2, MenuId } from 'vs/platform/actions/common/actions';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
const SearchMarketplaceExtensionsContext = new RawContextKey<boolean>('searchMarketplaceExtensions', false); const SearchMarketplaceExtensionsContext = new RawContextKey<boolean>('searchMarketplaceExtensions', false);
const SearchIntalledExtensionsContext = new RawContextKey<boolean>('searchInstalledExtensions', false); const SearchIntalledExtensionsContext = new RawContextKey<boolean>('searchInstalledExtensions', false);
@@ -249,7 +250,7 @@ export class ExtensionsViewletViewsContribution implements IWorkbenchContributio
*/ */
viewDescriptors.push({ viewDescriptors.push({
id: 'extensions.recommendedList', id: 'extensions.recommendedList',
name: localize('recommendedExtensions', "Marketplace"), // {{SQL CARBON EDIT}} - change name to marketplace name: locConstants.extensionsViewletRecommendedExtensions, // {{SQL CARBON EDIT}} - change name to marketplace
ctorDescriptor: new SyncDescriptor(DefaultRecommendedExtensionsView, [{}]), ctorDescriptor: new SyncDescriptor(DefaultRecommendedExtensionsView, [{}]),
when: ContextKeyExpr.and(DefaultViewsContext, ContextKeyExpr.not('config.extensions.showRecommendationsOnlyOnDemand')), when: ContextKeyExpr.and(DefaultViewsContext, ContextKeyExpr.not('config.extensions.showRecommendationsOnlyOnDemand')),
weight: 40, weight: 40,

View File

@@ -49,6 +49,7 @@ import { IPreferencesService } from 'vs/workbench/services/preferences/common/pr
import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget'; import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
import { IExtensionManifestPropertiesService } from 'vs/workbench/services/extensions/common/extensionManifestPropertiesService'; import { IExtensionManifestPropertiesService } from 'vs/workbench/services/extensions/common/extensionManifestPropertiesService';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
// Extensions that are automatically classified as Programming Language extensions, but should be Feature extensions // Extensions that are automatically classified as Programming Language extensions, but should be Feature extensions
const FORCE_FEATURE_EXTENSIONS = ['vscode.git', 'vscode.search-result']; const FORCE_FEATURE_EXTENSIONS = ['vscode.git', 'vscode.search-result'];
@@ -772,7 +773,7 @@ export class ExtensionsListView extends ViewPane {
// {{SQL CARBON EDIT}} // {{SQL CARBON EDIT}}
private getRecommendedExtensionsByScenario(token: CancellationToken, scenarioType: string): Promise<IPagedModel<IExtension>> { private getRecommendedExtensionsByScenario(token: CancellationToken, scenarioType: string): Promise<IPagedModel<IExtension>> {
if (!scenarioType) { if (!scenarioType) {
return Promise.reject(new Error(localize('scenarioTypeUndefined', 'The scenario type for extension recommendations must be provided.'))); return Promise.reject(new Error(locConstants.extensionsViewsScenarioTypeUndefined));
} }
return this.extensionsWorkbenchService.queryLocal() return this.extensionsWorkbenchService.queryLocal()
.then(result => result.filter(e => e.type === ExtensionType.User)) .then(result => result.filter(e => e.type === ExtensionType.User))

View File

@@ -46,6 +46,7 @@ import { IOpenerService } from 'vs/platform/opener/common/opener'; // {{SQL CARB
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { isBoolean } from 'vs/base/common/types'; import { isBoolean } from 'vs/base/common/types';
import { IExtensionManifestPropertiesService } from 'vs/workbench/services/extensions/common/extensionManifestPropertiesService'; import { IExtensionManifestPropertiesService } from 'vs/workbench/services/extensions/common/extensionManifestPropertiesService';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
interface IExtensionStateProvider<T> { interface IExtensionStateProvider<T> {
(extension: Extension): T; (extension: Extension): T;
@@ -1045,7 +1046,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
return this.galleryService.getCompatibleExtension(extension.gallery.identifier, version) return this.galleryService.getCompatibleExtension(extension.gallery.identifier, version)
.then(gallery => { .then(gallery => {
if (!gallery) { if (!gallery) {
return Promise.reject(new Error(nls.localize('incompatible', "Unable to install extension '{0}' as it is not compatible with Azure Data Studio '{1}'.", extension.gallery!.identifier.id, version))); // {{SQL CARBON EDIT}} Change vscode to ads return Promise.reject(new Error(locConstants.extensionsWorkbenchServiceIncompatible(extension.gallery!.identifier.id, version))); // {{SQL CARBON EDIT}} Change vscode to ads
} }
return this.installWithProgress(async () => { return this.installWithProgress(async () => {
const installed = await this.installFromGallery(extension, gallery); const installed = await this.installFromGallery(extension, gallery);

View File

@@ -31,6 +31,7 @@ import { SidebarFocusContext } from 'vs/workbench/common/viewlet';
import { ThemeIcon } from 'vs/platform/theme/common/themeService'; import { ThemeIcon } from 'vs/platform/theme/common/themeService';
import { IExplorerService } from 'vs/workbench/contrib/files/browser/files'; import { IExplorerService } from 'vs/workbench/contrib/files/browser/files';
import { Codicon } from 'vs/base/common/codicons'; import { Codicon } from 'vs/base/common/codicons';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
// Contribute Global Actions // Contribute Global Actions
const category = { value: nls.localize('filesCategory', "File"), original: 'File' }; const category = { value: nls.localize('filesCategory', "File"), original: 'File' };
@@ -576,8 +577,8 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
// Empty Editor Group Context Menu // Empty Editor Group Context Menu
// {{SQL CARBON EDIT}} - Use "New Query" instead of "New File" // {{SQL CARBON EDIT}} - Use "New Query" instead of "New File"
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: NEW_UNTITLED_FILE_COMMAND_ID, title: nls.localize('newFile', "New Query") }, group: '1_file', order: 10 }); MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: NEW_UNTITLED_FILE_COMMAND_ID, title: locConstants.fileActionsContributionNewQuery }, group: '1_file', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: NEW_UNTITLED_PLAIN_FILE_COMMAND_ID, title: nls.localize('newPlainFile', "New File") }, group: '1_file', order: 15 }); MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: NEW_UNTITLED_PLAIN_FILE_COMMAND_ID, title: nls.localize('newFile', "New File") }, group: '1_file', order: 15 });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: 'workbench.action.quickOpen', title: nls.localize('openFile', "Open File...") }, group: '1_file', order: 20 }); MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: 'workbench.action.quickOpen', title: nls.localize('openFile', "Open File...") }, group: '1_file', order: 20 });
// File menu // File menu
@@ -587,7 +588,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
group: '1_new', group: '1_new',
command: { command: {
id: NEW_UNTITLED_FILE_COMMAND_ID, id: NEW_UNTITLED_FILE_COMMAND_ID,
title: nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "New &&Query") title: locConstants.fileActionsContributionMiNewQuery
}, },
order: 1 order: 1
}); });
@@ -597,7 +598,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
group: '1_new', group: '1_new',
command: { command: {
id: NEW_UNTITLED_PLAIN_FILE_COMMAND_ID, id: NEW_UNTITLED_PLAIN_FILE_COMMAND_ID,
title: nls.localize({ key: 'miNewPlainFile', comment: ['&& denotes a mnemonic'] }, "New &&File") title: nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "New &&File")
}, },
order: 1.1 order: 1.1
}); });
@@ -607,7 +608,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
group: '1_new', group: '1_new',
command: { command: {
id: 'notebook.command.new', id: 'notebook.command.new',
title: nls.localize({ key: 'miNewNotebook', comment: ['&& denotes a mnemonic'] }, "&&New Notebook") title: locConstants.fileActionsContributionMiNewNotebook
}, },
order: 1.2 order: 1.2
}); });

View File

@@ -32,6 +32,7 @@ import { DirtyFilesIndicator } from 'vs/workbench/contrib/files/common/dirtyFile
import { UndoCommand, RedoCommand } from 'vs/editor/browser/editorExtensions'; import { UndoCommand, RedoCommand } from 'vs/editor/browser/editorExtensions';
import { IUndoRedoService } from 'vs/platform/undoRedo/common/undoRedo'; import { IUndoRedoService } from 'vs/platform/undoRedo/common/undoRedo';
import { FileEditorInputSerializer, IExplorerService } from 'vs/workbench/contrib/files/browser/files'; import { FileEditorInputSerializer, IExplorerService } from 'vs/workbench/contrib/files/browser/files';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
class FileUriLabelContribution implements IWorkbenchContribution { class FileUriLabelContribution implements IWorkbenchContribution {
@@ -249,7 +250,7 @@ configurationRegistry.registerConfiguration({
'files.maxMemoryForLargeFilesMB': { 'files.maxMemoryForLargeFilesMB': {
'type': 'number', 'type': 'number',
'default': 4096, 'default': 4096,
'markdownDescription': nls.localize('maxMemoryForLargeFilesMB', "Controls the memory available to Azure Data Studio after restart when trying to open large files. Same effect as specifying `--max-memory=NEWSIZE` on the command line."), // {{SQL CARBON EDIT}} Change product name to ADS 'markdownDescription': locConstants.filesContributionMaxMemoryForLargeFilesMB, // {{SQL CARBON EDIT}} Change product name to ADS
included: platform.isNative included: platform.isNative
}, },
'files.restoreUndoStack': { 'files.restoreUndoStack': {

View File

@@ -25,6 +25,7 @@ import { VIEWLET_ID as EXTENSIONS_VIEWLET_ID, IExtensionsViewPaneContainer } fro
import { minimumTranslatedStrings } from 'vs/workbench/contrib/localizations/browser/minimalTranslations'; import { minimumTranslatedStrings } from 'vs/workbench/contrib/localizations/browser/minimalTranslations';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { CancellationToken } from 'vs/base/common/cancellation'; import { CancellationToken } from 'vs/base/common/cancellation';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
// Register action to configure locale and related settings // Register action to configure locale and related settings
const registry = Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions); const registry = Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions);
@@ -58,8 +59,8 @@ export class LocalizationWorkbenchContribution extends Disposable implements IWo
this.notificationService.prompt( this.notificationService.prompt(
Severity.Info, Severity.Info,
// {{SQL CARBON EDIT}} - Update 'VS Code' to 'Azure Data Studio' // {{SQL CARBON EDIT}} - Update 'VS Code' to 'Azure Data Studio'
updateAndRestart ? localize('updateLocale', "Would you like to change Azure Data Studio's UI language to {0} and restart?", e.local.manifest.contributes.localizations[0].languageName || e.local.manifest.contributes.localizations[0].languageId) updateAndRestart ? locConstants.localizationsContributionUpdateLocale(e.local.manifest.contributes.localizations[0].languageName || e.local.manifest.contributes.localizations[0].languageId)
: localize('activateLanguagePack', "In order to use Azure Data Studio in {0}, Azure Data Studio needs to restart.", e.local.manifest.contributes.localizations[0].languageName || e.local.manifest.contributes.localizations[0].languageId), : locConstants.localizationsContributionActivateLanguagePack(e.local.manifest.contributes.localizations[0].languageName || e.local.manifest.contributes.localizations[0].languageId),
[{ [{
label: updateAndRestart ? localize('changeAndRestart', "Change Language and Restart") : localize('restart', "Restart"), label: updateAndRestart ? localize('changeAndRestart', "Change Language and Restart") : localize('restart', "Restart"),
run: () => { run: () => {

View File

@@ -30,6 +30,7 @@ import { attachKeybindingLabelStyler } from 'vs/platform/theme/common/styler';
// {{SQL CARBON EDIT}} // {{SQL CARBON EDIT}}
import { NewNotebookAction } from 'sql/workbench/contrib/notebook/browser/notebookActions'; import { NewNotebookAction } from 'sql/workbench/contrib/notebook/browser/notebookActions';
import * as locConstants from 'sql/base/common/locConstants';
const $ = dom.$; const $ = dom.$;
@@ -40,8 +41,8 @@ interface WatermarkEntry {
} }
// {{SQL CARBON EDIT}} // {{SQL CARBON EDIT}}
const newSqlFile: WatermarkEntry = { text: nls.localize('watermark.newSqlFile', "New SQL File"), id: NEW_UNTITLED_FILE_COMMAND_ID }; const newSqlFile: WatermarkEntry = { text: locConstants.watermarkNewSqlFile, id: NEW_UNTITLED_FILE_COMMAND_ID };
const newNotebook: WatermarkEntry = { text: nls.localize('watermark.newNotebook', "New Notebook"), id: NewNotebookAction.ID }; const newNotebook: WatermarkEntry = { text: locConstants.watermarkNewNotebook, id: NewNotebookAction.ID };
/*const showCommands: WatermarkEntry = { text: nls.localize('watermark.showCommands', "Show All Commands"), id: ShowAllCommandsAction.ID }; /*const showCommands: WatermarkEntry = { text: nls.localize('watermark.showCommands', "Show All Commands"), id: ShowAllCommandsAction.ID };
const quickAccess: WatermarkEntry = { text: nls.localize('watermark.quickAccess', "Go to File"), id: 'workbench.action.quickOpen' }; const quickAccess: WatermarkEntry = { text: nls.localize('watermark.quickAccess', "Go to File"), id: 'workbench.action.quickOpen' };

View File

@@ -25,6 +25,7 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
// eslint-disable-next-line code-import-patterns // eslint-disable-next-line code-import-patterns
import { SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID } from 'vs/workbench/contrib/extensions/common/extensions'; import { SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID } from 'vs/workbench/contrib/extensions/common/extensions';
import * as locConstants from 'sql/base/common/locConstants'; // {{SQL CARBON EDIT}}
// Actions // Actions
(function registerActions(): void { (function registerActions(): void {
@@ -113,7 +114,7 @@ import { SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID } from 'vs/workbench/contrib/e
group: '5.1_installExtension', group: '5.1_installExtension',
command: { command: {
id: SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID, id: SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID,
title: localize({ key: 'miinstallVsix', comment: ['&& denotes a mnemonic'] }, "Install Extension from VSIX Package") title: locConstants.desktopContributionMiinstallVsix
} }
}); });