summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfriendcard.cpp26
-rw-r--r--indra/newview/llfriendcard.h2
2 files changed, 16 insertions, 12 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);
}
diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h
index b94d5ec2c0..1cda52c1d7 100644
--- a/indra/newview/llfriendcard.h
+++ b/indra/newview/llfriendcard.h
@@ -120,7 +120,7 @@ private:
return (mBuddyIDSet.end() != mBuddyIDSet.find(avatarID));
}
- const LLUUID& findChildFolderUUID(const LLUUID& parentFolderUUID, const std::string& localizedName) const;
+ const LLUUID& findChildFolderUUID(const LLUUID& parentFolderUUID, const std::string& nonLocalizedName) const;
const LLUUID& findFriendFolderUUIDImpl() const;
const LLUUID& findFriendAllSubfolderUUIDImpl() const;
const LLUUID& findFriendCardInventoryUUIDImpl(const LLUUID& avatarID);