Localize xterm.js strings

This commit is contained in:
Daniel Imms 2018-01-28 13:18:47 -08:00
parent 62fc2a1230
commit 9cfbdd0abf
4 changed files with 33 additions and 4 deletions

View file

@ -46,7 +46,7 @@
"vscode-debugprotocol": "1.25.0",
"vscode-ripgrep": "^0.7.1-patch.0",
"vscode-textmate": "^3.2.0",
"vscode-xterm": "3.1.0-beta12",
"vscode-xterm": "3.1.0-beta13",
"yauzl": "2.8.0"
},
"devDependencies": {

View file

@ -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.
*

View file

@ -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);

View file

@ -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"