You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
format_currency only ever retrieves the default locale currency format #201
I think the CLDR importing script needs to be also modified, as I haven't found any data file (in pickle format) that defines multiple currency formats, other than None.
After diggin up a bit, it indeed looks that the CLDR import script is not using the type attribute from the correct element. It is searching for it at <currencyFormatLength> elements where it should be at <currencyFormat>, child element of the former.
However, there is now alias resolution involved (added in CLDR >23), so it is going to be a bit more complex and take a little longer to implement. I'm still dedicating some time when I can.
@etanol If you focus on the import script I could work on a separate PR for format_currency function itself, would probably be able to do it on Monday.
@craigloftus Sure, no problem. Just keep in mind that in CLDR 26, currency formats are always typed (i.e. they have a type attribute), so a format with key None will not exist anymore. Basically, in CLDR 26 there are two types: standard and accounting.
You can verify it, by executing the following from the root of the repository, after executing the actual import script:
Activity
etanol commentedon Aug 14, 2015
I think the CLDR importing script needs to be also modified, as I haven't found any data file (in
pickleformat) that defines multiple currency formats, other thanNone.@sils1297 I can take a look at this, if I may.
sils commentedon Aug 14, 2015
@etanol sure, go ahead. I can't assign you because of github having a bad access management. Many thanks for your support.
etanol commentedon Aug 15, 2015
After diggin up a bit, it indeed looks that the CLDR import script is not using the
typeattribute from the correct element. It is searching for it at<currencyFormatLength>elements where it should be at<currencyFormat>, child element of the former.However, there is now alias resolution involved (added in CLDR >23), so it is going to be a bit more complex and take a little longer to implement. I'm still dedicating some time when I can.
craigloftus commentedon Aug 15, 2015
@etanol If you focus on the import script I could work on a separate PR for
format_currencyfunction itself, would probably be able to do it on Monday.etanol commentedon Aug 16, 2015
@craigloftus Sure, no problem. Just keep in mind that in CLDR 26, currency formats are always typed (i.e. they have a
typeattribute), so a format with keyNonewill not exist anymore. Basically, in CLDR 26 there are two types:standardandaccounting.You can verify it, by executing the following from the root of the repository, after executing the actual import script: