提交 9cfbdd0a 编写于 作者: D Daniel Imms

Localize xterm.js strings

上级 62fc2a12
......@@ -199,6 +199,26 @@ declare module 'vscode-xterm' {
priority?: number;
}
export interface IEventEmitter {
on(type: string, listener: (...args: any[]) => void): void;
off(type: string, listener: (...args: any[]) => void): void;
emit(type: string, data?: any): void;
addDisposableListener(type: string, handler: (...args: any[]) => void): IDisposable;
}
/**
* An object that can be disposed via a dispose function.
*/
export interface IDisposable {
dispose(): void;
}
export interface ILocalizableStrings {
blankLine: string;
promptLabel: string;
tooMuchOutput: string;
}
/**
* The class that represents an xterm.js terminal.
*/
......@@ -223,6 +243,11 @@ declare module 'vscode-xterm' {
*/
cols: number;
/**
* Natural language strings that can be localized.
*/
static strings: ILocalizableStrings;
/**
* Creates a new `Terminal` object.
*
......
......@@ -271,6 +271,10 @@ export class TerminalInstance implements ITerminalInstance {
Terminal.applyAddon(require.__$__nodeRequire('vscode-xterm/lib/addons/search/search'));
// Enable the winpty compatibility addon which will simulate wraparound mode
Terminal.applyAddon(require.__$__nodeRequire('vscode-xterm/lib/addons/winptyCompat/winptyCompat'));
// Localize strings
Terminal.strings.blankLine = nls.localize('terminal.integrated.a11yBlankLine', 'Blank line');
Terminal.strings.promptLabel = nls.localize('terminal.integrated.a11yPromptLabel', 'Terminal input');
Terminal.strings.tooMuchOutput = nls.localize('terminal.integrated.a11yTooMuchOutput', 'Too much output to announce,navigate to rows manually to read');
}
const accessibilitySupport = this._configurationService.getValue<IEditorOptions>('editor').accessibilitySupport;
const font = this._configHelper.getFont(true);
......
......@@ -5915,9 +5915,9 @@ vscode-textmate@^3.2.0:
fast-plist "^0.1.2"
oniguruma "^6.0.1"
vscode-xterm@3.1.0-beta12:
version "3.1.0-beta12"
resolved "https://registry.yarnpkg.com/vscode-xterm/-/vscode-xterm-3.1.0-beta12.tgz#79e56664c8f360adc48855f2047e6f386f4634bc"
vscode-xterm@3.1.0-beta13:
version "3.1.0-beta13"
resolved "https://registry.yarnpkg.com/vscode-xterm/-/vscode-xterm-3.1.0-beta13.tgz#6f32cd108c2fac59a0e48a859c51101266d8ce97"
vso-node-api@^6.1.2-preview:
version "6.1.2-preview"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册