summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelmaininventory.cpp55
-rw-r--r--indra/newview/llpanelmaininventory.h1
-rw-r--r--indra/newview/skins/default/xui/de/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/es/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/fr/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/it/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/ja/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/pl/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/pt/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/ru/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/tr/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/zh/panel_main_inventory.xml1
12 files changed, 48 insertions, 18 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index e60ee20210..23a32df2cc 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -53,6 +53,7 @@
#include "llspinctrl.h"
#include "lltoggleablemenu.h"
#include "lltooldraganddrop.h"
+#include "lltrans.h"
#include "llviewermenu.h"
#include "llviewertexturelist.h"
#include "llsidepanelinventory.h"
@@ -763,11 +764,7 @@ void LLPanelMainInventory::onFilterSelected()
finder->changeFilter(&filter);
if (mSingleFolderMode)
{
- const LLViewerInventoryCategory* cat = gInventory.getCategory(mSingleFolderPanelInventory->getSingleFolderRoot());
- if (cat)
- {
- finder->setTitle(cat->getName());
- }
+ finder->setTitle(getLocalizedRootName());
}
}
if (filter.isActive())
@@ -934,11 +931,7 @@ void LLPanelMainInventory::toggleFindOptions()
if (mSingleFolderMode)
{
- const LLViewerInventoryCategory* cat = gInventory.getCategory(mSingleFolderPanelInventory->getSingleFolderRoot());
- if (cat)
- {
- finder->setTitle(cat->getName());
- }
+ finder->setTitle(getLocalizedRootName());
}
}
else
@@ -1925,15 +1918,11 @@ void LLPanelMainInventory::updateTitle()
{
if(mSingleFolderMode)
{
- const LLViewerInventoryCategory* cat = gInventory.getCategory(getCurrentSFVRoot());
- if (cat)
+ inventory_floater->setTitle(getLocalizedRootName());
+ LLFloaterInventoryFinder *finder = getFinder();
+ if (finder)
{
- inventory_floater->setTitle(cat->getName());
- LLFloaterInventoryFinder *finder = getFinder();
- if (finder)
- {
- finder->setTitle(cat->getName());
- }
+ finder->setTitle(getLocalizedRootName());
}
}
else
@@ -2004,6 +1993,36 @@ void LLPanelMainInventory::setViewMode(EViewModeType mode)
}
}
+std::string LLPanelMainInventory::getLocalizedRootName()
+{
+ std::string localized_root_name;
+ if(mSingleFolderMode)
+ {
+ const LLViewerInventoryCategory* cat = gInventory.getCategory(getCurrentSFVRoot());
+ if (cat)
+ {
+ LLFolderType::EType preferred_type = cat->getPreferredType();
+
+ // Translation of Accessories folder in Library inventory folder
+ bool accessories = false;
+ if(getName() == "Accessories")
+ {
+ const LLUUID& parent_folder_id = cat->getParentUUID();
+ accessories = (parent_folder_id == gInventory.getLibraryRootFolderID());
+ }
+
+ //"Accessories" inventory category has folder type FT_NONE. So, this folder
+ //can not be detected as protected with LLFolderType::lookupIsProtectedType
+ localized_root_name.assign(cat->getName());
+ if (accessories || LLFolderType::lookupIsProtectedType(preferred_type))
+ {
+ LLTrans::findString(localized_root_name, std::string("InvFolder ") + cat->getName(), LLSD());
+ }
+ }
+ }
+ return localized_root_name;
+}
+
LLUUID LLPanelMainInventory::getCurrentSFVRoot()
{
if(isListViewMode())
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index c30f894118..ac97cc4052 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -120,6 +120,7 @@ public:
bool isListViewMode() { return (mViewMode == MODE_LIST); }
bool isGalleryViewMode() { return (mViewMode == MODE_GALLERY); }
LLUUID getCurrentSFVRoot();
+ std::string getLocalizedRootName();
protected:
//
diff --git a/indra/newview/skins/default/xui/de/panel_main_inventory.xml b/indra/newview/skins/default/xui/de/panel_main_inventory.xml
index a3adea9fa2..175f6e1003 100644
--- a/indra/newview/skins/default/xui/de/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/de/panel_main_inventory.xml
@@ -9,6 +9,7 @@
<panel.string name="ItemcountUnknown">
Geholte [ITEM_COUNT] Bestellungen und [CATEGORY_COUNT] Ordner [FILTER]
</panel.string>
+ <panel.string name="inventory_title">INVENTAR</panel.string>
<text name="ItemcountText">
Objekte:
</text>
diff --git a/indra/newview/skins/default/xui/es/panel_main_inventory.xml b/indra/newview/skins/default/xui/es/panel_main_inventory.xml
index 1252c7ce0d..bf1205046b 100644
--- a/indra/newview/skins/default/xui/es/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/es/panel_main_inventory.xml
@@ -9,6 +9,7 @@
<panel.string name="ItemcountUnknown">
[ITEM_COUNT] Objetos y [CATEGORY_COUNT] Carpetas Obtenidos [FILTER]
</panel.string>
+ <panel.string name="inventory_title">INVENTARIO</panel.string>
<text name="ItemcountText">
Ítems:
</text>
diff --git a/indra/newview/skins/default/xui/fr/panel_main_inventory.xml b/indra/newview/skins/default/xui/fr/panel_main_inventory.xml
index 5bcee89752..5bf4d6c15d 100644
--- a/indra/newview/skins/default/xui/fr/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/fr/panel_main_inventory.xml
@@ -9,6 +9,7 @@
<panel.string name="ItemcountUnknown">
Recherche effectuée [ITEM_COUNT] d&apos;articles et [CATEGORY_COUNT] de dossiers [FILTER]
</panel.string>
+ <panel.string name="inventory_title">INVENTAIRE</panel.string>
<text name="ItemcountText">
Articles :
</text>
diff --git a/indra/newview/skins/default/xui/it/panel_main_inventory.xml b/indra/newview/skins/default/xui/it/panel_main_inventory.xml
index 5d11967cee..d6890229e7 100644
--- a/indra/newview/skins/default/xui/it/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/it/panel_main_inventory.xml
@@ -9,6 +9,7 @@
<panel.string name="ItemcountUnknown">
Recuperati [ITEM_COUNT] oggetti e [CATEGORY_COUNT] cartelle [FILTER]
</panel.string>
+ <panel.string name="inventory_title">INVENTARIO</panel.string>
<text name="ItemcountText">
Oggetti:
</text>
diff --git a/indra/newview/skins/default/xui/ja/panel_main_inventory.xml b/indra/newview/skins/default/xui/ja/panel_main_inventory.xml
index 5751154163..e1f0c4ecc1 100644
--- a/indra/newview/skins/default/xui/ja/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/ja/panel_main_inventory.xml
@@ -9,6 +9,7 @@
<panel.string name="ItemcountUnknown">
[ITEM_COUNT] 個のアイテムと [CATEGORY_COUNT] 個のフォルダーを取得しました [FILTER]
</panel.string>
+ <panel.string name="inventory_title">インベントリ</panel.string>
<text name="ItemcountText">
アイテム:
</text>
diff --git a/indra/newview/skins/default/xui/pl/panel_main_inventory.xml b/indra/newview/skins/default/xui/pl/panel_main_inventory.xml
index dc254e246f..1011c38378 100644
--- a/indra/newview/skins/default/xui/pl/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/pl/panel_main_inventory.xml
@@ -6,6 +6,7 @@
<panel.string name="ItemcountCompleted">
[ITEM_COUNT] obiekty [FILTER]
</panel.string>
+ <panel.string name="inventory_title">MOJA SZAFA</panel.string>
<text name="ItemcountText">
Obiekty:
</text>
diff --git a/indra/newview/skins/default/xui/pt/panel_main_inventory.xml b/indra/newview/skins/default/xui/pt/panel_main_inventory.xml
index 009b5b3193..e0cf528468 100644
--- a/indra/newview/skins/default/xui/pt/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/pt/panel_main_inventory.xml
@@ -9,6 +9,7 @@
<panel.string name="ItemcountUnknown">
Itens [ITEM_COUNT] e Pastas [CATEGORY_COUNT] Reunidos [FILTER]
</panel.string>
+ <panel.string name="inventory_title">INVENTÁRIO</panel.string>
<text name="ItemcountText">
Itens:
</text>
diff --git a/indra/newview/skins/default/xui/ru/panel_main_inventory.xml b/indra/newview/skins/default/xui/ru/panel_main_inventory.xml
index f2502bf6d3..b473fb8f98 100644
--- a/indra/newview/skins/default/xui/ru/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/ru/panel_main_inventory.xml
@@ -9,6 +9,7 @@
<panel.string name="ItemcountUnknown">
Выборка [ITEM_COUNT] предметов и [CATEGORY_COUNT] папок [FILTER]
</panel.string>
+ <panel.string name="inventory_title">ИНВЕНТАРЬ</panel.string>
<text name="ItemcountText">
Вещи:
</text>
diff --git a/indra/newview/skins/default/xui/tr/panel_main_inventory.xml b/indra/newview/skins/default/xui/tr/panel_main_inventory.xml
index a11fd98b9a..7e98078635 100644
--- a/indra/newview/skins/default/xui/tr/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/tr/panel_main_inventory.xml
@@ -9,6 +9,7 @@
<panel.string name="ItemcountUnknown">
[ITEM_COUNT] Öğe ve [CATEGORY_COUNT] Klasör Alındı [FILTER]
</panel.string>
+ <panel.string name="inventory_title">ENVANTER</panel.string>
<text name="ItemcountText">
Ögeler:
</text>
diff --git a/indra/newview/skins/default/xui/zh/panel_main_inventory.xml b/indra/newview/skins/default/xui/zh/panel_main_inventory.xml
index 1a28f4c3b5..9ffa9323cc 100644
--- a/indra/newview/skins/default/xui/zh/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/zh/panel_main_inventory.xml
@@ -9,6 +9,7 @@
<panel.string name="ItemcountUnknown">
擷取了[ITEM_COUNT]個物項及[CATEGORY_COUNT]個資料夾[FILTER]
</panel.string>
+ <panel.string name="inventory_title">收納區</panel.string>
<text name="ItemcountText">
物品:
</text>