From 2ea456aa824015ce52a0cae6c2eaac12dc95c12e Mon Sep 17 00:00:00 2001 From: sienori Date: Thu, 22 Aug 2019 14:23:25 +0900 Subject: [PATCH] Fix second language switching not working --- src/common/translate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/translate.js b/src/common/translate.js index a0ad712..cca7932 100644 --- a/src/common/translate.js +++ b/src/common/translate.js @@ -64,7 +64,7 @@ const formatResult = result => { } resultData.sourceLanguage = result.response.src; - resultData.percentage = result.response.confidence; + resultData.percentage = result.response.ld_result.srclangs_confidences[0]; resultData.resultText = result.response.sentences.map(sentence => sentence.trans).join(""); if (result.response.dict) { resultData.candidateText = result.response.dict