diff --git a/dump_js_lang.php b/dump_js_lang.php index d577f16..6c85fa7 100755 --- a/dump_js_lang.php +++ b/dump_js_lang.php @@ -8,6 +8,12 @@ $selected = [ 'wifi.connected_ip_is', 'wifi.not_conn', 'wifi.enter_passwd', + 'term_nav.fullscreen', + 'term_conn.connecting', + 'term_conn.waiting_content', + 'term_conn.disconnected', + 'term_conn.waiting_server', + 'term_conn.reconnecting' ]; $out = []; diff --git a/js/lang.js b/js/lang.js index 31117a3..429f1ac 100644 --- a/js/lang.js +++ b/js/lang.js @@ -2,7 +2,13 @@ let _tr = { "wifi.connected_ip_is": "Connected, IP is ", "wifi.not_conn": "Not connected.", - "wifi.enter_passwd": "Enter password for \":ssid:\"" + "wifi.enter_passwd": "Enter password for \":ssid:\"", + "term_nav.fullscreen": "Fullscreen", + "term_conn.connecting": "Connecting", + "term_conn.waiting_content": "Waiting for content", + "term_conn.disconnected": "Disconnected", + "term_conn.waiting_server": "Waiting for server", + "term_conn.reconnecting": "Reconnecting" }; module.exports = function tr (key) { return _tr[key] || '?' + key + '?' } diff --git a/js/term/index.js b/js/term/index.js index 7f4337c..a382d1a 100644 --- a/js/term/index.js +++ b/js/term/index.js @@ -1,4 +1,5 @@ const { qs, mk } = require('../utils') +const localize = require('../lang') const Notify = require('../notif') const TermScreen = require('./screen') const TermConnection = require('./connection') @@ -35,11 +36,11 @@ module.exports = function (opts) { conn.on('open', () => { // console.log('*open') - showSplash({ title: 'Connecting', loading: true }) + showSplash({ title: localize('term_conn.connecting'), loading: true }) }) conn.on('connect', () => { // console.log('*connect') - showSplash({ title: 'Waiting for content', loading: true }) + showSplash({ title: localize('term_conn.waiting_content'), loading: true }) }) conn.on('load', () => { // console.log('*load') @@ -48,7 +49,7 @@ module.exports = function (opts) { }) conn.on('disconnect', () => { // console.log('*disconnect') - showSplash({ title: 'Disconnected' }, 500) + showSplash({ title: localize('term_conn.disconnected') }, 500) screen.screen = [] screen.screenFG = [] screen.screenBG = [] @@ -56,12 +57,12 @@ module.exports = function (opts) { }) conn.on('silence', () => { // console.log('*silence') - showSplash({ title: 'Waiting for server', loading: true }, 0) + showSplash({ title: localize('term_conn.waiting_server'), loading: true }, 0) }) // conn.on('ping-fail', () => { screen.window.statusScreen = { title: 'Disconnected' } }) conn.on('ping-success', () => { // console.log('*ping-success') - showSplash({ title: 'Re-connecting', loading: true }, 0) + showSplash({ title: localize('term_conn.reconnecting'), loading: true }, 0) }) conn.init() @@ -171,7 +172,7 @@ module.exports = function (opts) { fullscreenIcon.className = 'icn-resize-full' button.appendChild(fullscreenIcon) let span = mk('span') - span.textContent = 'Fullscreen' + span.textContent = localize('term_nav.fullscreen') button.appendChild(span) qs('#term-nav').insertBefore(button, qs('#term-nav').firstChild) diff --git a/lang/de.php b/lang/de.php index 829e83d..e939585 100644 --- a/lang/de.php +++ b/lang/de.php @@ -31,6 +31,7 @@ return [ 'title.term' => 'Terminal', // page title of the terminal page + 'term_nav.fullscreen' => 'Vollbild', 'term_nav.config' => 'Konfiguration', 'term_nav.wifi' => 'WLAN', 'term_nav.help' => 'Hilfe', @@ -40,6 +41,12 @@ return [ 'term_nav.keybd' => 'Tastatur', 'term_nav.paste_prompt' => 'Text einfügen zum Versenden:', + 'term_conn.connecting' => 'Verbinden', + 'term_conn.waiting_content' => 'Warten auf Inhalt', + 'term_conn.disconnected' => 'Nicht verbunden', + 'term_conn.waiting_server' => 'Warten auf Server', + 'term_conn.reconnecting' => 'Verbinden', + // Terminal settings page 'term.defaults' => 'Anfangseinstellungen', @@ -162,9 +169,9 @@ return [ 'pwlock.title' => 'Zugriffsbeschränkungen', 'pwlock.explain' => ' - Manche, oder alle Teile Web-Interface können mit einem Passwort geschützt werden. + Manche, oder alle Teile des Web-Interface können mit einem Passwort geschützt werden. Lass die Passwortfelder leer wenn du es sie verändern möchtest.
- Das voreingestellte Passwort ist "%def_access_pw%".". + Das voreingestellte Passwort ist "%def_access_pw%". ', 'pwlock.region' => 'Geschützte Seiten', 'pwlock.region.none' => 'Keine, alles offen', diff --git a/lang/en.php b/lang/en.php index a4b4ccf..7de63a2 100644 --- a/lang/en.php +++ b/lang/en.php @@ -31,6 +31,7 @@ return [ 'title.term' => 'Terminal', // page title of the terminal page + 'term_nav.fullscreen' => 'Fullscreen', 'term_nav.config' => 'Config', 'term_nav.wifi' => 'WiFi', 'term_nav.help' => 'Help', @@ -40,14 +41,18 @@ return [ 'term_nav.keybd' => 'Keyboard', 'term_nav.paste_prompt' => 'Paste text to send:', + 'term_conn.connecting' => 'Connecting', + 'term_conn.waiting_content' => 'Waiting for content', + 'term_conn.disconnected' => 'Disconnected', + 'term_conn.waiting_server' => 'Waiting for server', + 'term_conn.reconnecting' => 'Reconnecting', + // Terminal settings page 'term.defaults' => 'Initial Settings', 'term.expert' => 'Expert Options', 'term.explain_initials' => ' - Those are the initial settings used after ESPTerm powers on, or when the screen - reset command is received (\ec). They can be changed by the - terminal application using escape sequences. + Those are the initial settings used after ESPTerm powers on, or when the screen reset command is received (\ec). They can be changed by the terminal application using escape sequences. ', 'term.explain_expert' => ' Those are advanced config options that usually don\'t need to be changed. @@ -56,9 +61,7 @@ return [ 'term.example' => 'Default colors preview', 'term.explain_scheme' => ' - To select default text and background color, click on the - preview palette. Alternatively, use numbers 0-15 for theme colors, 16-255 for standard - colors and hex (#FFFFFF) for True Color (24-bit). + To select default text and background color, click on the preview palette. Alternatively, use numbers 0-15 for theme colors, 16-255 for standard colors and hex (#FFFFFF) for True Color (24-bit). ', 'term.fgbg_presets' => 'Defaults Presets', @@ -152,15 +155,10 @@ return [ 'wificonn.back_to_config' => 'Back to WiFi config', 'wificonn.telemetry_lost' => 'Telemetry lost; something went wrong, or your device disconnected.', 'wificonn.explain_android_sucks' => ' - If you\'re configuring ESPTerm via a smartphone, or were connected - from another external network, your device may lose connection and this - progress indicator won\'t work. Please wait a while (~ 15 seconds), - then check if the connection succeeded.', + If you\'re configuring ESPTerm via a smartphone, or were connected from another external network, your device may lose connection and this progress indicator won\'t work. Please wait a while (~ 15 seconds), then check if the connection succeeded.', 'wificonn.explain_reset' => ' - To force enable the built-in AP, hold the BOOT - button until the blue LED starts flashing. Hold the button longer (until the LED - flashes rapidly) for a "factory reset".', + To force enable the built-in AP, hold the BOOT button until the blue LED starts flashing. Hold the button longer (until the LED flashes rapidly) for a "factory reset".', 'wificonn.disabled' =>"Station mode is disabled.", 'wificonn.idle' =>"Idle, not connected and has no IP.", @@ -192,11 +190,7 @@ return [ 'adminpw.title' => 'Change Admin Password', 'adminpw.explain' => ' - The "admin password" is used to manipulate the stored default settings - and to change access restrictions. This password is not saved as part - of the main config, i.e. using save / restore does not affect this - password. When the admin password is forgotten, the easiest way to - re-gain access is to wipe and re-flash the chip.
+ The "admin password" is used to manipulate the stored default settings and to change access restrictions. This password is not saved as part of the main config, i.e. using save / restore does not affect this password. When the admin password is forgotten, the easiest way to re-gain access is to wipe and re-flash the chip.
The default admin password is "%def_admin_pw%". ', 'adminpw.new_admin_pw' => 'New admin password', @@ -226,8 +220,7 @@ return [ 'uart.title' => 'Serial Port Parameters', 'uart.explain' => ' - This form controls the communication UART. The debug UART is fixed - at 115.200 baud, one stop-bit and no parity. + This form controls the communication UART. The debug UART is fixed at 115.200 baud, one stop-bit and no parity. ', 'uart.baud' => 'Baud rate', 'uart.parity' => 'Parity', @@ -243,10 +236,7 @@ return [ 'hwtuning.title' => 'Hardware Tuning', 'hwtuning.explain' => ' - ESP8266 can be overclocked from 80 MHz to 160 MHz. - This will make it more responsive and allow faster screen updates - at the expense of slightly higher power consumption. This can also make - it more susceptible to interference. Use with care. + ESP8266 can be overclocked from 80 MHz to 160 MHz. This will make it more responsive and allow faster screen updates at the expense of slightly higher power consumption. This can also make it more susceptible to interference. Use with care. ', 'hwtuning.overclock' => 'Overclock to 160MHz',