From 5f46430a1aa16212838dd7a9493a42fcb5e92ec3 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 24 Mar 2010 15:47:37 +0200 Subject: 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 --- indra/newview/llpanellandmarkinfo.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra') 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; -- cgit v1.2.3