From 64fea32966cd2dde5c9398f0649adc441d7132f6 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Fri, 28 Aug 2020 17:50:31 +0100 Subject: [PATCH] 3.1.0 muilti --- lang/en.json | 5 ++++- lib/common.js | 6 +++--- lib/inquirer.js | 7 ------- package.json | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lang/en.json b/lang/en.json index 8261bfc..43ce9ef 100644 --- a/lang/en.json +++ b/lang/en.json @@ -39,5 +39,8 @@ "failed": "Failed", "restoring-apps-complete": "Restoring Apps Complete", "batch-install-apps-complete": "Batch Install Apps Complete", - "connect-to-watch": "Connect to watch" + "connect-to-watch": "Connect to watch", + "connected-via-usb": "Connected via USB", + "connected-via-wifi": "Connected via Wifi", + "not-connected": "Not Connected" } \ No newline at end of file diff --git a/lib/common.js b/lib/common.js index 6dfd52d..944e36c 100644 --- a/lib/common.js +++ b/lib/common.js @@ -37,13 +37,13 @@ module.exports = { }, connectionCheck: async () => { if (globalVariables.localUSB === "X") { - console.log(chalk.white('MiWatch: ') + chalk.green('Connected via USB')) + console.log(chalk.white('MiWatch: ') + chalk.green(await Language.get('connected-via-usb'))) } if (globalVariables.miWatchIpaddress != "") { - console.log(chalk.white('MiWatch: ') + chalk.green('Connected via Wifi - ' + chalk.white(globalVariables.miWatchIpaddress))) + console.log(chalk.white('MiWatch: ') + chalk.green(await Language.get('connected-via-wifi') + ' ' + chalk.white(globalVariables.miWatchIpaddress))) } if (globalVariables.localUSB === "" && globalVariables.miWatchIpaddress === "") { - console.log(chalk.white('MiWatch: ') + chalk.red('Not Connected')) + console.log(chalk.white('MiWatch: ') + chalk.red(await Language.get('not-connected'))) } }, downloadFile: async (url, path) => { diff --git a/lib/inquirer.js b/lib/inquirer.js index aa3e392..15c92dc 100644 --- a/lib/inquirer.js +++ b/lib/inquirer.js @@ -4,13 +4,6 @@ const common = require("./common"); const Language = require("@shypes/language-translator"); -Language._({ - default_lang: "en", - ext: ".json", - __basedir: "./", - langFolder: 'lang' -}) - module.exports = { mainMenu: async () => { const questions = [{ diff --git a/package.json b/package.json index 82c7a2b..357f0d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "miwatchkleaner", - "version": "3.0.0", + "version": "3.1.0", "description": "MiWatch Cleaning Tool", "main": "app.js", "bin": "app.js",