mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-26 10:16:01 +01:00
fix issue with accessibility provider, #88554
This commit is contained in:
@@ -118,38 +118,44 @@ export class BulkEditAccessibilityProvider implements IAccessibilityProvider<Bul
|
||||
if (element.edit.textEdits.length > 0) {
|
||||
if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
|
||||
return localize(
|
||||
'area.renameAndEdit', "Renaming {0} to {1}, also making text edits",
|
||||
'aria.renameAndEdit', "Renaming {0} to {1}, also making text edits",
|
||||
this._labelService.getUriLabel(element.edit.uri, { relative: true }), this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
||||
);
|
||||
|
||||
} else if (element.edit.type & BulkFileOperationType.Create) {
|
||||
return localize(
|
||||
'area.createAndEdit', "Creating {0}, also making text edits",
|
||||
'aria.createAndEdit', "Creating {0}, also making text edits",
|
||||
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
||||
);
|
||||
|
||||
} else if (element.edit.type & BulkFileOperationType.Delete) {
|
||||
return localize(
|
||||
'area.deleteAndEdit', "Deleting {0}, also making text edits",
|
||||
'aria.deleteAndEdit', "Deleting {0}, also making text edits",
|
||||
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
||||
);
|
||||
} else {
|
||||
return localize(
|
||||
'aria.editOnly', "{0}, making text edits",
|
||||
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
||||
);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
|
||||
return localize(
|
||||
'area.rename', "Renaming {0} to {1}",
|
||||
'aria.rename', "Renaming {0} to {1}",
|
||||
this._labelService.getUriLabel(element.edit.uri, { relative: true }), this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
||||
);
|
||||
|
||||
} else if (element.edit.type & BulkFileOperationType.Create) {
|
||||
return localize(
|
||||
'area.create', "Creating {0}",
|
||||
'aria.create', "Creating {0}",
|
||||
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
||||
);
|
||||
|
||||
} else if (element.edit.type & BulkFileOperationType.Delete) {
|
||||
return localize(
|
||||
'area.delete', "Deleting {0}",
|
||||
'aria.delete', "Deleting {0}",
|
||||
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
||||
);
|
||||
}
|
||||
@@ -159,7 +165,7 @@ export class BulkEditAccessibilityProvider implements IAccessibilityProvider<Bul
|
||||
if (element instanceof TextEditElement) {
|
||||
if (element.selecting.length > 0 && element.inserting.length > 0) {
|
||||
// edit: replace
|
||||
return localize('aria.replace', "line {0}, replacing {1} with {0}", element.edit.edit.range.startLineNumber, element.selecting, element.inserting);
|
||||
return localize('aria.replace', "line {0}, replacing {1} with {2}", element.edit.edit.range.startLineNumber, element.selecting, element.inserting);
|
||||
} else if (element.selecting.length > 0 && element.inserting.length === 0) {
|
||||
// edit: delete
|
||||
return localize('aria.del', "line {0}, removing {1}", element.edit.edit.range.startLineNumber, element.selecting);
|
||||
|
||||
Reference in New Issue
Block a user