From 67c832d94b53fb5d32ec27eebf7f57b668e899db Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 20 Nov 2009 14:39:46 -0800 Subject: EXT-1743 People inspectors should show Age, not Date born --- indra/newview/llpanelavatar.cpp | 8 ++++++-- indra/newview/skins/default/xui/en/panel_profile.xml | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 2254684f21..03401d934f 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -38,6 +38,7 @@ #include "llavatarconstants.h" // AVATAR_ONLINE #include "llcallingcard.h" #include "llcombobox.h" +#include "lldateutil.h" // ageFromDate() #include "llimview.h" #include "lltexteditor.h" #include "lltexturectrl.h" @@ -466,8 +467,11 @@ void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) //remove avatar id from cache to get fresh info LLAvatarIconIDCache::getInstance()->remove(avatar_data->avatar_id); - - childSetValue("register_date", avatar_data->born_on ); + LLStringUtil::format_map_t args; + args["[REG_DATE]"] = avatar_data->born_on; + args["[AGE]"] = LLDateUtil::ageFromDate( avatar_data->born_on, LLDate::now()); + std::string register_date = getString("RegisterDateFormat", args); + childSetValue("register_date", register_date ); childSetValue("sl_description_edit", avatar_data->about_text); childSetValue("fl_description_edit",avatar_data->fl_about_text); childSetValue("2nd_life_pic", avatar_data->image_id); diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 5110b6b2ef..bf1d46451b 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -27,7 +27,8 @@ - [REG_DATE] ([AGE]) +