From b2a06908859caa3d816ab1791fe2062142e2ccce Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 28 Feb 2023 00:51:25 +0200 Subject: SL-19209 Add default text for region field --- indra/newview/llfloatertranslationsettings.cpp | 5 +++-- indra/newview/lltranslate.cpp | 4 +--- indra/newview/skins/default/xui/en/floater_translation_settings.xml | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp index c99de47da0..e14227f490 100644 --- a/indra/newview/llfloatertranslationsettings.cpp +++ b/indra/newview/llfloatertranslationsettings.cpp @@ -94,11 +94,11 @@ void LLFloaterTranslationSettings::onOpen(const LLSD& key) mTranslationServiceRadioGroup->setSelectedByValue(gSavedSettings.getString("TranslationService"), TRUE); LLSD azure_key = gSavedSettings.getLLSD("AzureTranslateAPIKey"); - if (azure_key.isMap()) + if (azure_key.isMap() && !azure_key["id"].asString().empty()) { mAzureAPIKeyEditor->setText(azure_key["id"].asString()); mAzureAPIKeyEditor->setTentative(false); - if (azure_key.has("region")) + if (azure_key.has("region") && !azure_key["region"].asString().empty()) { mAzureAPIRegionEditor->setText(azure_key["region"].asString()); mAzureAPIRegionEditor->setTentative(false); @@ -113,6 +113,7 @@ void LLFloaterTranslationSettings::onOpen(const LLSD& key) else { mAzureAPIKeyEditor->setTentative(TRUE); + mAzureAPIRegionEditor->setTentative(true); mAzureKeyVerified = FALSE; } diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index b0c4418ae9..f84c660c0d 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -229,8 +229,6 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s LL_INFOS("Translate") << "No translation URL" << LL_ENDL; return; } - LL_DEBUGS("Translate") << "Message: " << msg << LL_ENDL; - LL_DEBUGS("Translate") << "Requesting: " << url << LL_ENDL; LLSD result = sendMessageAndSuspend(httpAdapter, httpRequest, httpOpts, httpHeaders, url, msg); @@ -646,7 +644,7 @@ bool LLAzureTranslationHandler::checkVerificationResponse( } // Expected: "{\"error\":{\"code\":400000,\"message\":\"One of the request inputs is not valid.\"}}" - // But for now just verify response is a valid json with an error + // But for now just verify response is a valid json Json::Value root; Json::Reader reader; diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml index d095451685..a5154d99ec 100644 --- a/indra/newview/skins/default/xui/en/floater_translation_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml @@ -246,6 +246,7 @@ Region: