summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-03-16 14:30:30 +0200
committerSergei Litovchuk <slitovchuk@productengine.com>2010-03-16 14:30:30 +0200
commit5bfb3d5c26e4000adce08a61c577e3ee1abe5aae (patch)
tree78768ab5ccc6708009bfd2f7c03fed31782154c6 /indra
parent28b1264c57bfca2d88b9e64c0fdfe64c22189ebf (diff)
Implemented normal task (EXT-6251) [HARD CODED]? Side bar: Landmarks > + button > Create Landmark > Landmark location dropdown > Landmarks/Japanese.
Normal task (EXT-6251) [HARD CODED]? Side bar: Landmarks > + button > Create Landmark > Landmark location dropdown > Landmarks/Japanese. Reviewed by Richard Nelson https://codereview.productengine.com/secondlife/r/32/ --HG-- branch : product-engine
Diffstat (limited to 'indra')
-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;
+ }
}
}
}