summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-02-28 00:51:25 +0200
committerakleshchev <117672381+akleshchev@users.noreply.github.com>2023-02-28 21:46:43 +0200
commitb2a06908859caa3d816ab1791fe2062142e2ccce (patch)
tree83b6663979de588b9a611f86a9bba4f2d010f95c /indra
parentf7210db06ee677231b93b750c205cd0317a9901f (diff)
SL-19209 Add default text for region field
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatertranslationsettings.cpp5
-rw-r--r--indra/newview/lltranslate.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/floater_translation_settings.xml1
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:
</text>
<line_editor
+ default_text="Can be left empty for global services"
follows="top|left"
height="20"
layout="topleft"