summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellandmarkinfo.cpp
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-03-16 15:27:51 +0200
committerYuri Chebotarev <ychebotarev@productengine.com>2010-03-16 15:27:51 +0200
commit7e6e69a1cc341532ef01d6f437bbe7a2853b9973 (patch)
treebb6da385270573764137ab4ccc33007ef4a1d759 /indra/newview/llpanellandmarkinfo.cpp
parent13710336cb46a26f00751b1badac2f2dfc14350a (diff)
parenta872814de964ebcbf40e812f79319a13a54e2336 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpanellandmarkinfo.cpp')
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp37
1 files changed, 28 insertions, 9 deletions
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 56d52ccc65..143a64d08b 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -383,22 +383,41 @@ std::string LLPanelLandmarkInfo::getFullFolderName(const LLViewerInventoryCatego
if (cat)
{
name = cat->getName();
-
- // translate category name, if it's right below the root
- // FIXME: it can throw notification about non existent string in strings.xml
- if (cat->getParentUUID().notNull() && cat->getParentUUID() == gInventory.getRootFolderID())
- {
- LLTrans::findString(name, "InvFolder " + name);
- }
+ parent_id = cat->getParentUUID();
+ bool is_under_root_category = parent_id == gInventory.getRootFolderID();
// we don't want "My Inventory" to appear in the name
- while ((parent_id = cat->getParentUUID()).notNull() && parent_id != gInventory.getRootFolderID())
+ while ((parent_id = cat->getParentUUID()).notNull())
{
cat = gInventory.getCategory(parent_id);
llassert(cat);
if (cat)
{
- name = cat->getName() + "/" + name;
+ if (is_under_root_category || cat->getParentUUID() == gInventory.getRootFolderID())
+ {
+ std::string localized_name;
+ 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);
+ 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());
+
+ // add translated category name to folder's full name
+ name = (is_found ? localized_name : cat->getName()) + "/" + name;
+ }
+
+ break;
+ }
+ else
+ {
+ name = cat->getName() + "/" + name;
+ }
}
}
}