support rename for login, user and a few other types (#22331)

* rename object

* add comment

* use URN property

* vbump STS

* revert loc string change

* fix name check

* pr comments
This commit is contained in:
Alan Ren
2023-03-16 15:00:07 -07:00
committed by GitHub
parent f5628ed8e3
commit 20cf2489a2
12 changed files with 164 additions and 10 deletions

View File

@@ -11,6 +11,10 @@ export const LoginTypeDisplayName: string = localize('objectManagement.LoginType
export const UserTypeDisplayName: string = localize('objectManagement.UserDisplayName', "user");
export const LoginTypeDisplayNameInTitle: string = localize('objectManagement.LoginTypeDisplayNameInTitle', "Login");
export const UserTypeDisplayNameInTitle: string = localize('objectManagement.UserTypeDisplayNameInTitle', "User");
export const TableTypeDisplayName: string = localize('objectManagement.TableDisplayName', "table");
export const ViewTypeDisplayName: string = localize('objectManagement.ViewDisplayName', "view");
export const ColumnTypeDisplayName: string = localize('objectManagement.ColumnDisplayName', "column");
export const DatabaseTypeDisplayName: string = localize('objectManagement.DatabaseDisplayName', "database");
// Shared Strings
export const HelpText: string = localize('objectManagement.helpText', "Help");
@@ -18,6 +22,7 @@ export const YesText: string = localize('objectManagement.yesText', "Yes");
export const OkText: string = localize('objectManagement.OkText', "OK");
export const LoadingDialogText: string = localize('objectManagement.loadingDialog', "Loading dialog...");
export const FailedToRetrieveConnectionInfoErrorMessage: string = localize('objectManagement.noConnectionUriError', "Failed to retrieve the connection information, please reconnect and try again.")
export const RenameObjectDialogTitle: string = localize('objectManagement.renameObjectDialogTitle', "Enter new name");
export function RefreshObjectExplorerError(error: string): string {
return localize({
@@ -89,6 +94,20 @@ export function ObjectPropertiesDialogTitle(objectType: string, objectName: stri
}, '{0} - {1} (Preview)', objectType, objectName);
}
export function RenameObjectOperationDisplayName(objectType: string, originalName: string, newName: string): string {
return localize({
key: 'objectManagement.renameObjectOperationName',
comment: ['{0} object type, {1}: original name, {2}: new name']
}, "Rename {0} '{1}' to '{2}'", objectType, originalName, newName);
}
export function RenameObjectError(objectType: string, originalName: string, newName: string, error: string): string {
return localize({
key: 'objectManagement.renameObjectError',
comment: ['{0} object type, {1}: original name, {2}: new name, {3}: error message.']
}, "An error occurred while renaming {0} '{1}' to '{2}'. {3}", objectType, originalName, newName, error);
}
export const NameText = localize('objectManagement.nameLabel', "Name");
export const SelectedText = localize('objectManagement.selectedLabel', "Selected");
export const GeneralSectionHeader = localize('objectManagement.generalSectionHeader', "General");