SL-19209 Add default text for region field
parent
f7210db06e
commit
b2a0690885
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -246,6 +246,7 @@
|
|||
Region:
|
||||
</text>
|
||||
<line_editor
|
||||
default_text="Can be left empty for global services"
|
||||
follows="top|left"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
|
|
|
|||
Loading…
Reference in New Issue