EXT-8310 FIXED Incorrect currency format in the Buy L$ floater.
Changes in the Buy L$ floater: * Set system locale before formatting currency. * Made money format configurable (via strings.xml). * Placed the "L$" label to the right of the line editor in FR locale. Details: Actually, the proper way to fix this and similar number formatting bugs would be to set the system locale at startup, but: 1. That triggers assertions when parsing locale-agnostic XML files like avatar_skeleton.xml. 2. I'm wary of making such global changes so close to the 2.1 release. Therefore I just temporarily override current locale before formatting a number and restore the previous locale afterwards. Reviewed by Tofu at https://codereview.productengine.com/secondlife/r/751/ --HG-- branch : product-enginemeow-7.2.2
parent
756b010f7c
commit
8b09f20d7d
|
|
@ -35,6 +35,8 @@
|
|||
#include "lluictrlfactory.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llresmgr.h" // for LLLocale
|
||||
#include "lltrans.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llversioninfo.h"
|
||||
|
||||
|
|
@ -323,7 +325,12 @@ std::string LLCurrencyUIManager::Impl::getLocalEstimate() const
|
|||
if (mUSDCurrencyEstimated)
|
||||
{
|
||||
// we have the old-style USD-specific value
|
||||
return "US$ " + llformat("%#.2f", mUSDCurrencyEstimatedCost / 100.0);
|
||||
LLStringUtil::format_map_t args;
|
||||
{
|
||||
LLLocale locale_override(LLStringUtil::getLocale());
|
||||
args["[AMOUNT]"] = llformat("%#.2f", mUSDCurrencyEstimatedCost / 100.0);
|
||||
}
|
||||
return LLTrans::getString("LocalEstimateUSD", args);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3222,4 +3222,7 @@ Abuse Report</string>
|
|||
<string name="dateTimeDayFormat">[MDAY]</string>
|
||||
<string name="dateTimeAM">AM</string>
|
||||
<string name="dateTimePM">PM</string>
|
||||
|
||||
<!-- currency formatting -->
|
||||
<string name="LocalEstimateUSD">US$ [AMOUNT]</string>
|
||||
</strings>
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ le Lindex...
|
|||
<text name="currency_action">
|
||||
Je veux acheter
|
||||
</text>
|
||||
<text name="currency_label">
|
||||
<text name="currency_label" left="308">
|
||||
L$
|
||||
</text>
|
||||
<line_editor label="L$" name="currency_amt" width="65">
|
||||
<line_editor label="L$" name="currency_amt" width="65" left_pad="-85">
|
||||
1234
|
||||
</line_editor>
|
||||
<text name="buying_label">
|
||||
|
|
|
|||
|
|
@ -3817,4 +3817,5 @@ de l'infraction signalée
|
|||
<string name="dateTimePM">
|
||||
PM
|
||||
</string>
|
||||
<string name="LocalEstimateUSD">[AMOUNT] US$</string>
|
||||
</strings>
|
||||
|
|
|
|||
Loading…
Reference in New Issue