Open leogr opened 9 years ago
Please @leogr explain better what you mean.
As we have found out, when currency code is set to the formatter then currency symbol is not updated.
So some data have to be fetched from ResourceBundle directly as we are doing now.
This issue should be closed when we are sure that all data used is consistent with the current locale and currency code settings.
This should be a general constraint for all components. Do you agree?
Yes.
Currently all domain tests related to ResourceBundle are passing with ICU 51.
With ICU 54 some tests are not passing due to unknown locale inherit rule, an example is: http://demo.icu-project.org/icu-bin/locexp?d_=en&_=az_Cyrl¤cy=THB
In this case, "az_Cyrl" inherit from root directly, instead of "az".
Now, currency symbol is ok and domain tests are passing.
However, some parts of code are still using \NumberFormatter::CURRENCY_SYMBOL
through the getSymbol
method. Also POSITIVE_SUFFIX
and NEGATIVE_PREFIX
are built using \NumberFormatter::CURRENCY_SYMBOL
.
So I suggest to find a way simplify the Uncurrency fallback logic and, if possibile, to remove the getSymbol
method completely.
It seems that symbols are unrelated to the currency code setting. That makes heavy to implement the uncurrency filtering logic in lenient mode.