diff options
Diffstat (limited to 'indra/newview/llpanellandmarkinfo.cpp')
-rw-r--r-- | indra/newview/llpanellandmarkinfo.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 702d9a55ab..c03bc82904 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" @@ -403,31 +404,34 @@ 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); + // translate category name, if it's right below the root + 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; - } + } break; } else - { - name = cat->getName() + "/" + name; + { + name = cat->getName() + "/" + name; + } } } } - } return name; } |