aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui/llpanel.cpp')
-rw-r--r--linden/indra/llui/llpanel.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp
index f1ccb01..0389590 100644
--- a/linden/indra/llui/llpanel.cpp
+++ b/linden/indra/llui/llpanel.cpp
@@ -540,7 +540,7 @@ void LLPanel::initChildrenXML(LLXMLNodePtr node, LLUICtrlFactory* factory)
540 child->getAttributeString("name", string_name); 540 child->getAttributeString("name", string_name);
541 if (!string_name.empty()) 541 if (!string_name.empty())
542 { 542 {
543 mUIStrings[string_name] = LLUIString(child->getTextContents()); 543 mUIStrings[string_name] = child->getTextContents();
544 } 544 }
545 } 545 }
546 else 546 else
@@ -612,7 +612,7 @@ std::string LLPanel::getString(const std::string& name, const LLStringUtil::form
612 if (found_it != mUIStrings.end()) 612 if (found_it != mUIStrings.end())
613 { 613 {
614 // make a copy as format works in place 614 // make a copy as format works in place
615 LLUIString formatted_string = found_it->second; 615 LLUIString formatted_string = LLUIString(found_it->second);
616 formatted_string.setArgList(args); 616 formatted_string.setArgList(args);
617 return formatted_string.getString(); 617 return formatted_string.getString();
618 } 618 }
@@ -630,15 +630,23 @@ std::string LLPanel::getString(const std::string& name, const LLStringUtil::form
630 return LLStringUtil::null; 630 return LLStringUtil::null;
631} 631}
632 632
633LLUIString LLPanel::getUIString(const std::string& name) const 633std::string LLPanel::getString(const std::string& name) const
634{ 634{
635 ui_string_map_t::const_iterator found_it = mUIStrings.find(name); 635 ui_string_map_t::const_iterator found_it = mUIStrings.find(name);
636 if (found_it != mUIStrings.end()) 636 if (found_it != mUIStrings.end())
637 { 637 {
638 return found_it->second; 638 return found_it->second;
639 } 639 }
640 llerrs << "Failed to find string " << name << " in panel " << getName() << llendl; 640 std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate
641 return LLUIString(LLStringUtil::null); 641 if(LLUI::sQAMode)
642 {
643 llerrs << err_str << llendl;
644 }
645 else
646 {
647 llwarns << err_str << llendl;
648 }
649 return LLStringUtil::null;
642} 650}
643 651
644 652