Use user-default locale setting from operating system in cases it makes sense

master
Ansariel 2016-08-22 12:00:26 +02:00
parent 9b56e746ff
commit bb33802440
7 changed files with 14 additions and 8 deletions

View File

@ -3165,7 +3165,7 @@ void LLAvatarComplexityControls::setText(U32 value, LLTextBox* text_box)
// <FS:Ansariel> Proper number formatting with delimiter
//text_box->setText(llformat("%d", value));
std::string output_string;
LLLocale locale(LLLocale::USER_LOCALE);
LLLocale locale("");
LLResMgr::getInstance()->getIntegerString(output_string, value);
text_box->setText(output_string);
}

View File

@ -501,7 +501,10 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
// *TODO: Separate maximum size for Web images from postcards
LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL;
LLLocale locale(LLLocale::USER_LOCALE);
// <FS:Ansariel> Use user-default locale from operating system
//LLLocale locale(LLLocale::USER_LOCALE);
LLLocale locale("");
// </FS:Ansariel>
std::string bytes_string;
if (got_snap)
{

View File

@ -499,7 +499,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
// <FS:Ansariel> FIRE-12939: Add outfit count to outfits list
{
std::string count_string;
LLLocale locale(LLLocale::USER_LOCALE);
LLLocale locale("");
LLResMgr::getInstance()->getIntegerString(count_string, (S32)cat_array.size());
getChild<LLTextBox>("OutfitcountText")->setTextArg("COUNT", count_string);
}
@ -1243,7 +1243,7 @@ bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y)
void LLOutfitsList::updateAvatarComplexity(U32 complexity)
{
std::string complexity_string;
LLLocale locale(LLLocale::USER_LOCALE);
LLLocale locale("");
LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
mAvatarComplexityLabel->setTextArg("[WEIGHT]", complexity_string);

View File

@ -904,7 +904,10 @@ void LLPanelMainInventory::updateItemcountText()
{
mItemCount = gInventory.getItemCount();
mItemCountString = "";
LLLocale locale(LLLocale::USER_LOCALE);
// <FS:Ansariel> Use user-default locale from operating system
//LLLocale locale(LLLocale::USER_LOCALE);
LLLocale locale("");
// </FS:Ansariel>
LLResMgr::getInstance()->getIntegerString(mItemCountString, mItemCount);
}

View File

@ -1441,7 +1441,7 @@ void LLPanelOutfitEdit::saveListSelection()
void LLPanelOutfitEdit::updateAvatarComplexity(U32 complexity)
{
std::string complexity_string;
LLLocale locale(LLLocale::USER_LOCALE);
LLLocale locale("");
LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
mAvatarComplexityLabel->setTextArg("[WEIGHT]", complexity_string);

View File

@ -369,7 +369,7 @@ void LLPanelWearing::copyToClipboard()
void LLPanelWearing::updateAvatarComplexity(U32 complexity)
{
std::string complexity_string;
LLLocale locale(LLLocale::USER_LOCALE);
LLLocale locale("");
LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
mAvatarComplexityLabel->setTextArg("[WEIGHT]", complexity_string);

View File

@ -3280,7 +3280,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
(!isSelf() && (!show_too_complex_only_arw_tag || isTooComplex()))))
{
std::string complexity_string;
LLLocale locale(LLLocale::USER_LOCALE);
LLLocale locale("");
LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
LLStringUtil::format_map_t label_args;