Skip to content

Commit bf72dc2

Browse files
committed
Add GoToLine translations to TypeScript declarations and i18n test
1 parent fca52ff commit bf72dc2

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

code-input.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ export namespace plugins {
178178
instructionTranslations?: {
179179
closeDialog?: string;
180180
input?: string;
181+
guidanceFormat?: string;
182+
guidanceLineRange?: (current:Number, max: Number) => string;
183+
guidanceColumnRange?: (line: Number, current: Number, max: Number) => string;
184+
guidanceValidLine?: (line: Number) => string;
185+
guidanceValidColumn?: (line: Number, column: Number) => string;
181186
});
182187
/**
183188
* Show a search-like dialog prompting line number.

plugins/go-to-line.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ codeInput.plugins.GoToLine = class extends codeInput.Plugin {
1111
closeDialog: "Close Dialog and Return to Editor",
1212
input: "Line:Column / Line no. then Enter",
1313
guidanceFormat: "Wrong format. Enter a line number (e.g. 1) or a line number then colon then column number (e.g. 1:3).",
14-
guidanceLineRange: (current, max) => { return `Line number (currently ${current}) should be between 1 and ${max} inclusive.` },
15-
guidanceColumnRange: (line, current, max) => { return `On line ${line}, column number (currently ${current}) should be between 1 and ${max} inclusive.` },
16-
guidanceValidLine: (line, column) => { return `Press Enter to go to line ${line}.` },
17-
guidanceValidColumn: (line, column) => { return `Press Enter to go to line ${line}, column ${column}.` },
14+
guidanceLineRange: (current, max) => `Line number (currently ${current}) should be between 1 and ${max} inclusive.`,
15+
guidanceColumnRange: (line, current, max) => `On line ${line}, column number (currently ${current}) should be between 1 and ${max} inclusive.`,
16+
guidanceValidLine: (line) => `Press Enter to go to line ${line}.`,
17+
guidanceValidColumn: (line, column) => `Press Enter to go to line ${line}, column ${column}.`,
1818
};
1919

2020
/**

tests/i18n.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@
8585
let goToLineTranslations = {
8686
closeDialog: "Cerrar el Diálogo y Regresar al Editor",
8787
input: "Línea:Columno o Línea luego Retorno",
88+
guidanceFormat: "Formato incorrecto. Ingresa un número de línea (por ej. 1) o un número de línea luego dos puntos luego un número de columno (por ej. 1:3).",
89+
guidanceLineRange: (current, max) => `Número de línea (actualmente ${current}) debería ser entre 1 y ${max}.`,
90+
guidanceColumnRange: (line, current, max) => `En la línea número ${line}, número de columno (actualmente ${current}) debería ser entre 1 y ${max}.`,
91+
guidanceValidLine: (line) => `Tecla Retorno para ir a línea número ${line}.`,
92+
guidanceValidColumn: (line, column) => `Tecla Retorno para ir a línea número ${line}, columno número ${column}.`,
8893
};
8994
let indentTranslations = {
9095
tabForIndentation: "Tabulador y Mayús-Tabulador actualmente para la indentación. Tecla Escape para activar la navegación por el teclado.",

0 commit comments

Comments
 (0)