summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-03-24 15:47:37 +0200
committerSergei Litovchuk <slitovchuk@productengine.com>2010-03-24 15:47:37 +0200
commit5f46430a1aa16212838dd7a9493a42fcb5e92ec3 (patch)
tree124749873442f195c8076bc17cd5b8b708a1b3be /indra/newview
parentc0ea363c86a1a2182754b201622bc78bdbea787e (diff)
Normal task (EXT-6251) [HARD CODED]? Side bar: Landmarks > + button > Create Landmark > Landmark location dropdown > Landmarks/Japanese
- Fixed translating category name in Landmark location dropdown list for cases when localized name is a part of folder's full name. Reviewed by Mike Antipov https://codereview.productengine.com/secondlife/r/32/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 143a64d08b..a60c69f169 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -396,17 +396,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;