karl.hudgell 4 лет назад
Родитель
Сommit
64fea32966
4 измененных файлов с 8 добавлено и 12 удалено
  1. 4 1
      lang/en.json
  2. 3 3
      lib/common.js
  3. 0 7
      lib/inquirer.js
  4. 1 1
      package.json

+ 4 - 1
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"
 }

+ 3 - 3
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) => {

+ 0 - 7
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 = [{

+ 1 - 1
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",