You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2021/05/26 19:22:00 UTC

[echarts-bot] branch master updated (3a8f529 -> db7a01f)

This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-bot.git.


    from 3a8f529  chore: terminate the node process on unhandled promise rejection.
     new 6d3c906  chore: upgrade bing-translate-api to v2.
     new db7a01f  chore: log to file when failed to translate.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 package-lock.json | 14 +++++++-------
 package.json      |  2 +-
 src/translator.js |  9 ++++++---
 3 files changed, 14 insertions(+), 11 deletions(-)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[echarts-bot] 01/02: chore: upgrade bing-translate-api to v2.

Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-bot.git

commit 6d3c9062adcecf82ce3505fdde136eb090e57ac7
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Thu May 27 03:20:43 2021 +0800

    chore: upgrade bing-translate-api to v2.
---
 package-lock.json | 14 +++++++-------
 package.json      |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 7b7649c..8cd95b5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,7 +10,7 @@
       "license": "Apache-2.0",
       "dependencies": {
         "@plainheart/google-translate-api": "^1.1.0",
-        "bing-translate-api": "^1.2.0",
+        "bing-translate-api": "^2.0.0",
         "franc-min": "^5.0.0",
         "probot": "^11.3.0"
       },
@@ -2126,9 +2126,9 @@
       }
     },
     "node_modules/bing-translate-api": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/bing-translate-api/-/bing-translate-api-1.2.0.tgz",
-      "integrity": "sha512-1Q4zV6XYbCmv0jpyVwIjAnsUM71BhpteSqKtFXazPYdCtbDhbuEpWdvXOLwDcHj1ZKIdzkSC9F73OnI2G0Kd0g==",
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/bing-translate-api/-/bing-translate-api-2.0.0.tgz",
+      "integrity": "sha512-7TbFEEph8tozc6RXQO/Z53sxiBeGxlpjeHFohu7IHnTuqn7NdvgMjQoA7CDCBNzVBgUHa8X3Rpu94ePhNGG2/Q==",
       "dependencies": {
         "got": "^11.8.2",
         "qs": "^6.9.6"
@@ -13459,9 +13459,9 @@
       "dev": true
     },
     "bing-translate-api": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/bing-translate-api/-/bing-translate-api-1.2.0.tgz",
-      "integrity": "sha512-1Q4zV6XYbCmv0jpyVwIjAnsUM71BhpteSqKtFXazPYdCtbDhbuEpWdvXOLwDcHj1ZKIdzkSC9F73OnI2G0Kd0g==",
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/bing-translate-api/-/bing-translate-api-2.0.0.tgz",
+      "integrity": "sha512-7TbFEEph8tozc6RXQO/Z53sxiBeGxlpjeHFohu7IHnTuqn7NdvgMjQoA7CDCBNzVBgUHa8X3Rpu94ePhNGG2/Q==",
       "requires": {
         "got": "^11.8.2",
         "qs": "^6.9.6"
diff --git a/package.json b/package.json
index 8ab5346..fb22110 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
   },
   "dependencies": {
     "@plainheart/google-translate-api": "^1.1.0",
-    "bing-translate-api": "^1.2.0",
+    "bing-translate-api": "^2.0.0",
     "franc-min": "^5.0.0",
     "probot": "^11.3.0"
   },

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[echarts-bot] 02/02: chore: log to file when failed to translate.

Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-bot.git

commit db7a01f176892a214041bbf769610a4f9aed636a
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Thu May 27 03:21:21 2021 +0800

    chore: log to file when failed to translate.
---
 src/translator.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/translator.js b/src/translator.js
index 4eca28c..67384db 100644
--- a/src/translator.js
+++ b/src/translator.js
@@ -1,6 +1,7 @@
 const googleTranslate = require('@plainheart/google-translate-api');
-const { translate: bingTranslate } = require('bing-translate-api')
+const { translate: bingTranslate } = require('bing-translate-api');
 const franc = require('franc-min');
+const logger = require('./logger');
 
 async function translateByGoogle(rawContent) {
     try {
@@ -20,7 +21,8 @@ async function translateByGoogle(rawContent) {
         };
     }
     catch (e) {
-        console.error('failed to translate by google', e);
+        logger.error('failed to translate by google');
+        logger.error(e);
     }
 }
 
@@ -34,7 +36,8 @@ async function translateByBing(rawContent) {
         };
     }
     catch (e) {
-        console.error('failed to translate by bing', e);
+        logger.error('failed to translate by bing');
+        logger.error(e);
     }
 }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org