Skip to content

Commit 88b4c04

Browse files
committed
localize
1 parent 599c7e7 commit 88b4c04

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/vs/editor/common/languages.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { LanguageId } from 'vs/editor/common/encodedTokenAttributes';
2121
import * as model from 'vs/editor/common/model';
2222
import { TokenizationRegistry as TokenizationRegistryImpl } from 'vs/editor/common/tokenizationRegistry';
2323
import { ContiguousMultilineTokens } from 'vs/editor/common/tokens/contiguousMultilineTokens';
24+
import { localize } from 'vs/nls';
2425
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
2526
import { IMarkerData } from 'vs/platform/markers/common/markers';
2627

@@ -1191,7 +1192,7 @@ export namespace SymbolKinds {
11911192
}
11921193

11931194
export function asAriaLabel(label: string, kind: SymbolKind): string {
1194-
return `${label} Symbol: ${SymbolKinds.toIcon(kind).id.replaceAll('symbol-', '')} `;
1195+
return localize('symbolAriaLabel', "{0} Symbol: {1}", label, SymbolKinds.toIcon(kind).id.replaceAll('symbol-', ''));
11951196
}
11961197
}
11971198

src/vs/monaco.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7459,6 +7459,8 @@ declare namespace monaco.languages {
74597459
Deprecated = 1
74607460
}
74617461

7462+
function asAriaLabel(label: string, kind: SymbolKind): string;
7463+
74627464
export interface DocumentSymbol {
74637465
name: string;
74647466
detail: string;

src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class DocumentSymbolAccessibilityProvider implements IListAccessibilityPr
4949
if (element instanceof OutlineGroup) {
5050
return element.label;
5151
} else {
52-
return localize('document-symbol-aria-label', "{0}", SymbolKinds.asAriaLabel(element.symbol.name, element.symbol.kind));
52+
return SymbolKinds.asAriaLabel(element.symbol.name, element.symbol.kind);
5353
}
5454
}
5555
}
@@ -195,7 +195,7 @@ export class DocumentSymbolRenderer implements ITreeRenderer<OutlineElement, Fuz
195195
}
196196
}
197197

198-
private static _symbolKindNames: { [symbol: number]: string } = {
198+
public static _symbolKindNames: { [symbol: number]: string } = {
199199
[SymbolKind.Array]: localize('Array', "array"),
200200
[SymbolKind.Boolean]: localize('Boolean', "boolean"),
201201
[SymbolKind.Class]: localize('Class', "class"),

0 commit comments

Comments
 (0)