From ae4e5cdfa12d3ae414a6d2a5eb3e0220dcb8ab5c Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Mon, 27 Nov 2023 17:57:12 -0500 Subject: [PATCH] Fix some hard coded strings in the compile queue --- indra/newview/llcompilequeue.cpp | 14 ++++++-------- indra/newview/skins/default/xui/en/strings.xml | 2 ++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 6773fd7f892..d68dc313073 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -391,8 +391,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat if (!item->getPermissions().allowModifyBy(gAgent.getID(), gAgent.getGroupID()) || !item->getPermissions().allowCopyBy(gAgent.getID(), gAgent.getGroupID())) { - std::string buffer = "Skipping: " + item->getName() + "(Permissions)"; - floater->addStringMessage(buffer); + floater->addProcessingMessage("CompilePermissions", LLSDMap("ITEM_NAME", item->getName())); return true; } @@ -538,14 +537,13 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat { std::string buffer = std::string("Compilation of \"") + inventory->getName() + std::string("\" succeeded"); - floater->addStringMessage(buffer); LL_INFOS() << buffer << LL_ENDL; + floater->addProcessingMessage("CompileSuccess", LLSDMap("SCRIPT", inventory->getName())); } else { LLSD compile_errors = result["errors"]; - std::string buffer = std::string("Compilation of \"") + inventory->getName() + std::string("\" failed:"); - floater->addStringMessage(buffer); + floater->addProcessingMessage("CompileFailure", LLSDMap("SCRIPT", inventory->getName())); for (LLSD::array_const_iterator line = compile_errors.beginArray(); line < compile_errors.endArray(); line++) { @@ -576,7 +574,7 @@ bool LLFloaterCompileQueue::startQueue() LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpGet(lookup_url, success, failure); - return TRUE; + return true; } else { @@ -906,7 +904,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L floater.check(); } - floater->addStringMessage("Done"); + floater->addStringMessage(floater->getString("Done")); floater->getChildView("close")->setEnabled(TRUE); } catch (const LLCheckedHandleBase::Stale &) @@ -997,7 +995,7 @@ void LLFloaterCompileQueue::scriptPreprocComplete(const LLUUID& asset_id, LLScri if (object) { std::string scriptName = data->mItem->getName(); - std::string url = object->getRegion()->getCapability("UpdateScriptTask"); + const std::string url = object->getRegion() ? object->getRegion()->getCapability("UpdateScriptTask") : std::string(); if (!url.empty()) { queue->addProcessingMessage("CompileQueuePreprocessingComplete", LLSD().with("SCRIPT", scriptName)); diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index ead78f2c884..58913858472 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2683,6 +2683,8 @@ If you continue to receive this message, please contact Second Life support for <string name="CompileQueuePreprocessingComplete">Preprocessing of script [SCRIPT] completed</string> <string name="CompileQueueCompiling">Compiling "[SCRIPT]"...</string> <string name="CompileSuccess">Compilation of "[SCRIPT]" succeeded</string> + <string name="CompileFailure">Compilation of "[SCRIPT]" failed:</string> + <string name="CompilePermissions">Skipping: [ITEM_NAME] (Permissions)</string> <string name="ResetQueueTitle">Reset Progress</string> <string name="ResetQueueStart">reset</string> <string name="RunQueueTitle">Set Running Progress</string> -- GitLab