Update application name to Azure Data Studio (#24510)

This commit is contained in:
Cheena Malhotra
2023-09-26 10:15:32 -07:00
committed by GitHub
parent 306eb42ae7
commit dce130c5af
25 changed files with 67 additions and 47 deletions

View File

@@ -95,4 +95,11 @@ export const experimentalCustomizationDescription = localize('notebook.editorOpt
export const download = localize('azuredatastudio.download', 'Download');
export const downloadTooltip = localize('azuredatastudio.downloadTooltip', "Download this extension from an external source");
export const installTooltip = localize('azuredatastudio.installTooltip', "Install this extension");
export function getThemeUpdatedNotification(label: string): string {
return localize({ key: 'azuredatastudio.themeUpdatedNotification', comment: ['{0} is the name of the new default theme'] }, "Azure Data Studio now ships with a new default theme '{0}'. If you prefer, you can switch back to the old theme or try one of the many other color themes available.", label);
}
export function getNewThemeNotification(label: string): string {
return localize({ key: 'newThemeNotification', comment: ['{0} is the name of the new default theme'] }, "Azure Data Studio now ships with a new default theme '{0}'. Do you want to give it a try?", label);
}
//#endregion

View File

@@ -131,16 +131,18 @@ suite('Labels', () => {
// real world example (other)
t = '${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}';
// {{SQL CARBON EDIT}} Update application name to Azure Data Studio
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: '', rootName: '', appName: '', separator: { label: ' - ' } }), '');
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: '', rootName: '', appName: 'Visual Studio Code', separator: { label: ' - ' } }), 'Visual Studio Code');
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: 'Untitled-1', rootName: '', appName: 'Visual Studio Code', separator: { label: ' - ' } }), 'Untitled-1 - Visual Studio Code');
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: '', rootName: 'monaco', appName: 'Visual Studio Code', separator: { label: ' - ' } }), 'monaco - Visual Studio Code');
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: 'somefile.txt', rootName: 'monaco', appName: 'Visual Studio Code', separator: { label: ' - ' } }), 'somefile.txt - monaco - Visual Studio Code');
assert.strictEqual(labels.template(t, { dirty: '* ', activeEditorShort: 'somefile.txt', rootName: 'monaco', appName: 'Visual Studio Code', separator: { label: ' - ' } }), '* somefile.txt - monaco - Visual Studio Code');
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: '', rootName: '', appName: 'Azure Data Studio', separator: { label: ' - ' } }), 'Azure Data Studio');
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: 'Untitled-1', rootName: '', appName: 'Azure Data Studio', separator: { label: ' - ' } }), 'Untitled-1 - Azure Data Studio');
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: '', rootName: 'monaco', appName: 'Azure Data Studio', separator: { label: ' - ' } }), 'monaco - Azure Data Studio');
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: 'somefile.txt', rootName: 'monaco', appName: 'Azure Data Studio', separator: { label: ' - ' } }), 'somefile.txt - monaco - Azure Data Studio');
assert.strictEqual(labels.template(t, { dirty: '* ', activeEditorShort: 'somefile.txt', rootName: 'monaco', appName: 'Azure Data Studio', separator: { label: ' - ' } }), '* somefile.txt - monaco - Azure Data Studio');
// real world example (other)
t = '${dirty}${activeEditorShort}${separator}${rootNameShort}${separator}${appName}';
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: '', rootName: 'monaco (Workspace)', rootNameShort: 'monaco', appName: 'Visual Studio Code', separator: { label: ' - ' } }), 'monaco - Visual Studio Code');
// {{SQL CARBON EDIT}} Update application name to Azure Data Studio
assert.strictEqual(labels.template(t, { dirty: '', activeEditorShort: '', rootName: 'monaco (Workspace)', rootNameShort: 'monaco', appName: 'Azure Data Studio', separator: { label: ' - ' } }), 'monaco - Azure Data Studio');
});
test('mnemonicButtonLabel', () => {

View File

@@ -7,7 +7,8 @@
<!-- Disable pinch zooming -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<title>Visual Studio Code</title>
<!-- {{SQL CARBON EDIT}} Update application name to Azure Data Studio -->
<title>Azure Data Studio</title>
<!-- Scripts -->
<script>
@@ -111,8 +112,9 @@
</style>
</head>
<body>
<!-- {{SQL CARBON EDIT}} Update application name to Azure Data Studio -->
<span class="branding">
Visual Studio Code
Azure Data Studio
</span>
<div class="message-container">
<div class="message">

View File

@@ -44,6 +44,7 @@ import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storag
import { isWeb } from 'vs/base/common/platform';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IHostService } from 'vs/workbench/services/host/browser/host';
import { getNewThemeNotification, getThemeUpdatedNotification } from 'sql/base/common/locConstants';
export const manageExtensionIcon = registerIcon('theme-selection-manage-extension', Codicon.gear, localize('manageExtensionIcon', 'Icon for the \'Manage\' action in the theme selection quick pick.'));
@@ -768,7 +769,8 @@ class DefaultThemeUpdatedNotificationContribution implements IWorkbenchContribut
];
await this._notificationService.prompt(
Severity.Info,
localize({ key: 'themeUpdatedNotification', comment: ['{0} is the name of the new default theme'] }, "Visual Studio Code now ships with a new default theme '{0}'. If you prefer, you can switch back to the old theme or try one of the many other color themes available.", newTheme.label),
// {{SQL CARBON EDIT}} Update application name to Azure Data Studio, use custom localized string.
getThemeUpdatedNotification(newTheme.label),
choices,
{
onCancel: () => this._writeTelemetry('cancel')
@@ -796,7 +798,8 @@ class DefaultThemeUpdatedNotificationContribution implements IWorkbenchContribut
}];
await this._notificationService.prompt(
Severity.Info,
localize({ key: 'newThemeNotification', comment: ['{0} is the name of the new default theme'] }, "Visual Studio Code now ships with a new default theme '{0}'. Do you want to give it a try?", theme.label),
// {{SQL CARBON EDIT}} Update application name to Azure Data Studio, use custom localized string.
getNewThemeNotification(theme.label),
choices,
{ onCancel: () => this._writeTelemetry('cancel') }
);