From 6e3b0261ecfdf2fd80c31e796fe6da3c5a7041b6 Mon Sep 17 00:00:00 2001 From: Ovear Date: Sun, 8 Apr 2018 19:34:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D#1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1)修复因为OmetaT默认大写LanguageCode导致腾讯云API报错。 --- .../indi/yoyicue/machinetranslators/TencentTranslate.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/indi/yoyicue/machinetranslators/TencentTranslate.java b/src/main/java/indi/yoyicue/machinetranslators/TencentTranslate.java index b2bcb3a..6693407 100644 --- a/src/main/java/indi/yoyicue/machinetranslators/TencentTranslate.java +++ b/src/main/java/indi/yoyicue/machinetranslators/TencentTranslate.java @@ -85,7 +85,7 @@ private String tmtLang(Language language) { } else if (lang.equalsIgnoreCase("ko")) { return "kr"; } else { - return language.getLanguageCode(); + return language.getLanguageCode().toLowerCase(); } } @@ -115,4 +115,4 @@ protected void onConfirm() { dialog.panel.temporaryCheckBox.setSelected(isCredentialStoredTemporarily(PROPERTY_API_SECRET_KEY)); dialog.show(); } -} \ No newline at end of file +}