summaryrefslogtreecommitdiff
path: root/indra/newview/llfriendcard.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-05 11:16:34 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-05 11:16:34 +0000
commitb27ce5bc88af7195f18b1d8752056d80620be702 (patch)
tree92f76557b6be33c3b32c2011393df1875f225eeb /indra/newview/llfriendcard.cpp
parentac2dc19029d0b17292beadc834fdf41330eb88d8 (diff)
parenta5c202dcfd1eb8240e1f03d3a9d42a360b41bab2 (diff)
merge from viewer-2-0
Diffstat (limited to 'indra/newview/llfriendcard.cpp')
-rw-r--r--indra/newview/llfriendcard.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index ac060cef15..18f81fe506 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -44,24 +44,28 @@
// Constants;
-static const std::string INVENTORY_STRING_FRIENDS_SUBFOLDER = "InvFolder Friends";
-static const std::string INVENTORY_STRING_FRIENDS_ALL_SUBFOLDER = "InvFolder All";
+static const std::string INVENTORY_STRING_FRIENDS_SUBFOLDER = "Friends";
+static const std::string INVENTORY_STRING_FRIENDS_ALL_SUBFOLDER = "All";
// helper functions
-// NOTE: Usage of LLTrans::getString(); in next two functions to set localized
-// folders' names is caused by a hack in the LLFolderViewItem::refreshFromListener()
-// method for protected asset types.
-// So, localized names will be got from the strings with "InvFolder LABEL_NAME"
-// in the strings.xml
+// NOTE: For now Friends & All folders are created as protected folders of the LLFolderType::FT_CALLINGCARD type.
+// So, their names will be processed in the LLFolderViewItem::refreshFromListener() to be localized
+// using "InvFolder LABEL_NAME" as LLTrans::findString argument.
+
+// We must use in this file their hard-coded names to ensure found them on different locales. EXT-5829.
+// These hard-coded names will be stored in InventoryItems but shown localized in FolderViewItems
+
+// If hack in the LLFolderViewItem::refreshFromListener() to localize protected folder is removed
+// or these folders are not protected these names should be localized in another place/way.
inline const std::string get_friend_folder_name()
{
- return LLTrans::getString(INVENTORY_STRING_FRIENDS_SUBFOLDER);
+ return INVENTORY_STRING_FRIENDS_SUBFOLDER;
}
inline const std::string get_friend_all_subfolder_name()
{
- return LLTrans::getString(INVENTORY_STRING_FRIENDS_ALL_SUBFOLDER);
+ return INVENTORY_STRING_FRIENDS_ALL_SUBFOLDER;
}
void move_from_to_arrays(LLInventoryModel::cat_array_t& from, LLInventoryModel::cat_array_t& to)
@@ -350,9 +354,9 @@ const LLUUID& LLFriendCardsManager::findFriendAllSubfolderUUIDImpl() const
return findChildFolderUUID(friendFolderUUID, friendAllSubfolderName);
}
-const LLUUID& LLFriendCardsManager::findChildFolderUUID(const LLUUID& parentFolderUUID, const std::string& localizedName) const
+const LLUUID& LLFriendCardsManager::findChildFolderUUID(const LLUUID& parentFolderUUID, const std::string& nonLocalizedName) const
{
- LLNameCategoryCollector matchFolderFunctor(localizedName);
+ LLNameCategoryCollector matchFolderFunctor(nonLocalizedName);
return get_folder_uuid(parentFolderUUID, matchFolderFunctor);
}