mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Expose strings through the API
This commit is contained in:
+5
-1
@@ -47,7 +47,7 @@ import { DEFAULT_ANSI_COLORS } from './renderer/ColorManager';
|
||||
import { MouseZoneManager } from './input/MouseZoneManager';
|
||||
import { AccessibilityManager } from './AccessibilityManager';
|
||||
import { ScreenDprMonitor } from './utils/ScreenDprMonitor';
|
||||
import { ITheme } from 'xterm';
|
||||
import { ITheme, ILocalizableStrings } from 'xterm';
|
||||
|
||||
// Let it work inside Node.js for automated testing purposes.
|
||||
const document = (typeof window !== 'undefined') ? window.document : null;
|
||||
@@ -313,6 +313,10 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
||||
return this.buffers.active;
|
||||
}
|
||||
|
||||
public static get strings(): ILocalizableStrings {
|
||||
return Strings;
|
||||
}
|
||||
|
||||
/**
|
||||
* back_color_erase feature for xterm.
|
||||
*/
|
||||
|
||||
@@ -10,6 +10,7 @@ import * as Browser from '../shared/utils/Browser';
|
||||
import { ITheme, IDisposable } from 'xterm';
|
||||
|
||||
export class MockTerminal implements ITerminal {
|
||||
static string: any;
|
||||
getOption(key: any): any {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
Vendored
+12
-1
@@ -207,12 +207,18 @@ declare module 'xterm' {
|
||||
}
|
||||
|
||||
/**
|
||||
* An object that can be disposed via a dipose function.
|
||||
* 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.
|
||||
*/
|
||||
@@ -237,6 +243,11 @@ declare module 'xterm' {
|
||||
*/
|
||||
cols: number;
|
||||
|
||||
/**
|
||||
* Natural language strings that can be localized.
|
||||
*/
|
||||
static strings: ILocalizableStrings;
|
||||
|
||||
/**
|
||||
* Creates a new `Terminal` object.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user