summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellandmarkinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanellandmarkinfo.cpp')
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 143a64d08b..4ffd43cb0f 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -36,6 +36,7 @@
#include "llcombobox.h"
#include "lliconctrl.h"
+#include "llinventoryfunctions.h"
#include "lllineeditor.h"
#include "lltextbox.h"
#include "lltexteditor.h"
@@ -396,17 +397,20 @@ std::string LLPanelLandmarkInfo::getFullFolderName(const LLViewerInventoryCatego
if (is_under_root_category || cat->getParentUUID() == gInventory.getRootFolderID())
{
std::string localized_name;
+
+ // Looking for translation only for protected type categories
+ // to avoid warnings about non existent string in strings.xml.
+ bool is_protected_type = LLFolderType::lookupIsProtectedType(cat->getPreferredType());
+
if (is_under_root_category)
{
// translate category name, if it's right below the root
- // FIXME: it can throw notification about non existent string in strings.xml
- bool is_found = LLTrans::findString(localized_name, "InvFolder " + name);
+ bool is_found = is_protected_type && LLTrans::findString(localized_name, "InvFolder " + name);
name = is_found ? localized_name : name;
}
else
{
- // FIXME: it can throw notification about non existent string in strings.xml
- bool is_found = LLTrans::findString(localized_name, "InvFolder " + cat->getName());
+ bool is_found = is_protected_type && LLTrans::findString(localized_name, "InvFolder " + cat->getName());
// add translated category name to folder's full name
name = (is_found ? localized_name : cat->getName()) + "/" + name;