Hooked LLTrans into LLNotification stuffs. Also, fixed [CURRENCY] showing up in several places on the buy land window.

This commit is contained in:
Shyotl
2012-01-11 00:49:14 -06:00
parent e847b105f2
commit 68bc6749e5
24 changed files with 363 additions and 302 deletions

View File

@@ -44,6 +44,7 @@
#include "lliconctrl.h"
#include "lltextbox.h"
#include "lltexteditor.h"
#include "lltrans.h"
#include "lluiconstants.h"
#include "llui.h"
#include "llxmlnode.h"
@@ -581,14 +582,15 @@ void LLNotifyBox::close()
void LLNotifyBox::format(std::string& msg, const LLStringUtil::format_map_t& args)
{
// XUI:translate!
// add default substitutions
LLStringUtil::format_map_t targs = args;
targs["[SECOND_LIFE]"] = gHippoGridManager->getConnectedGrid()->getGridName();
targs["[GRID_NAME]"] = gHippoGridManager->getConnectedGrid()->getGridName();
targs["[GRID_OWNER]"] = gHippoGridManager->getConnectedGrid()->getGridOwner();
targs["[GRID_SITE]"] = gHippoGridManager->getConnectedGrid()->getWebSite();
targs["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
targs["[VIEWER_NAME]"] = "Singularity Viewer";
const LLStringUtil::format_map_t& default_args = LLTrans::getDefaultArgs();
for (LLStringUtil::format_map_t::const_iterator iter = default_args.begin();
iter != default_args.end(); ++iter)
{
targs[iter->first] = iter->second;
}
LLStringUtil::format(msg, targs);
}