diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-07-22 17:59:36 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-07-22 17:59:36 +0300 |
commit | 6a11c3131828f861660f9ec111709dda914223af (patch) | |
tree | 111ec17ab6e6f8c3780e9412bf4b4056574ef9e0 /indra | |
parent | bf468e0ffe373974282212501415b9f67a7c7240 (diff) |
EXT-8378 FIXED Made area format localizable in World Map and Group Info -> Roles.
Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/788/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelgrouproles.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llworldmap.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llworldmap.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_roles.xml | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 1 |
5 files changed, 16 insertions, 7 deletions
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 26e8a932aa..445cfe64f7 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1593,6 +1593,7 @@ void LLPanelGroupMembersSubTab::updateMembers() LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end(); + LLUIString donated = getString("donation_area"); S32 i = 0; for( ; mMemberProgress != end && i<UPDATE_MEMBERS_PER_FRAME; @@ -1614,9 +1615,7 @@ void LLPanelGroupMembersSubTab::updateMembers() if (add_member) { - // Build the donated tier string. - std::ostringstream donated; - donated << mMemberProgress->second->getContribution() << " sq. m."; + donated.setArg("[AREA]", llformat("%d", mMemberProgress->second->getContribution())); LLSD row; row["id"] = (*mMemberProgress).first; @@ -1625,7 +1624,7 @@ void LLPanelGroupMembersSubTab::updateMembers() // value is filled in by name list control row["columns"][1]["column"] = "donated"; - row["columns"][1]["value"] = donated.str(); + row["columns"][1]["value"] = donated.getString(); row["columns"][2]["column"] = "online"; row["columns"][2]["value"] = mMemberProgress->second->getOnlineStatus(); diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index 66cb02ce99..9bbe005de8 100644 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -37,6 +37,7 @@ #include "llworldmapmessage.h" #include "message.h" #include "lltracker.h" +#include "lluistring.h" #include "llviewertexturelist.h" #include "lltrans.h" @@ -522,8 +523,12 @@ bool LLWorldMap::insertItem(U32 x_world, U32 y_world, std::string& name, LLUUID& case MAP_ITEM_LAND_FOR_SALE: // land for sale case MAP_ITEM_LAND_FOR_SALE_ADULT: // adult land for sale { - std::string tooltip = llformat("%d sq. m. L$%d", extra, extra2); - new_item.setTooltip(tooltip); + static LLUIString tooltip_fmt = LLTrans::getString("worldmap_item_tooltip_format"); + + tooltip_fmt.setArg("[AREA]", llformat("%d", extra)); + tooltip_fmt.setArg("[PRICE]", llformat("%d", extra2)); + new_item.setTooltip(tooltip_fmt.getString()); + if (type == MAP_ITEM_LAND_FOR_SALE) { siminfo->insertLandForSale(new_item); diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h index e4e677eb64..b97e5249e1 100644 --- a/indra/newview/llworldmap.h +++ b/indra/newview/llworldmap.h @@ -52,7 +52,7 @@ public: LLItemInfo(F32 global_x, F32 global_y, const std::string& name, LLUUID id); // Setters - void setTooltip(std::string& tooltip) { mToolTip = tooltip; } + void setTooltip(const std::string& tooltip) { mToolTip = tooltip; } void setElevation(F64 z) { mPosGlobal.mdV[VZ] = z; } void setCount(S32 count) { mCount = count; } // void setSelected(bool selected) { mSelected = selected; } diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index 0eb5c47f85..18a2f37ba2 100644 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -50,6 +50,10 @@ Select multiple Members by holding the Ctrl key and clicking on their names. </panel.string> <panel.string + name="donation_area"> + [AREA] m² + </panel.string> + <panel.string name="power_folder_icon" translate="false"> Inv_FolderClosed </panel.string> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index e5bd549036..3d8ceb9912 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -278,6 +278,7 @@ <!-- world map --> <string name="texture_loading">Loading...</string> <string name="worldmap_offline">Offline</string> + <string name="worldmap_item_tooltip_format">[AREA] m² L$[PRICE]</string> <string name="worldmap_results_none_found">None found.</string> <!-- animations uploading status codes --> |