Comments (2)
This would keep the data split between the short&narrow and long formatters.
Splitting data doesn't require a different type. If the data for short, narrow, and long, has the same shape, it should use the same data struct, just with three different markers and three different constructors.
from icu4x.
- @robertbastian Are the shapes of the data the same?
- @sffc The shape is different from short/narrow currency, but is it the same as units?
- @younies:
- in currencies:
- pattern-one: "{0} {1}" per locale
- display-name-one: "us dollar"
- in units:
- meter-pattern-one: "{0} meter" per unit
- in currencies:
- @sffc You could merge them at datagen time? "dollars per mile"
- @younies There are a lot of open questions. Will users give units like:
usd-per-meter
- @sffc OK, so the pattern should be in its own marker, or currency essentials. And the names should go into a marker called "long currency".
- @robertbastian In isolation this makes sense, but I don't know if it makes sense in the context of icu_dimension.
- @sffc Currency is being designed as a standalone formatter.
- @robertbastian The APIs should be similar to each other.
- @younies Units are different. You construct complex units, use the unit identifier parser, maybe perform conversion, etc. With currency, people just give the currency code and that's it.
Data markers:
- CurrencyEssentialsV1
- CurrencyLongEssentialsV1
- CurrencyLongNamesV1
Formatters:
- CurrencyFormatter
- Bikeshed: ShortNarrowCurrencyFormatter?
- LongCurrencyFormatter
from icu4x.
Related Issues (20)
- Missing `other` Unit Pattern for `sd` Locale in the Data for Long Currency HOT 5
- Special ZeroMap for ULE keys and VarULE values HOT 7
- Better abstractions for splitting lengths out from VarZeroVec
- Improve handling of overlap patterns in semantic datetime
- We should support running ICU4X tests with JSON data HOT 6
- Add back postcard fingerprints.csv HOT 1
- Baked data is bigger than postcard data HOT 6
- Should compiled data constructors be on the owned or borrowed type? HOT 19
- Support for Date Ranges
- transliterator: Transliterator should support UTF-16 HOT 1
- Time zone variant calculator: does it let us fully handle zoned datetime formatting? HOT 32
- CLDR 46 tracking issue
- Currency formatter needs to handle CLDR pattern and symbol overrides
- FixedDecimalFormatterOptions should accept None as grouping strategy
- Reaffirm TryWriteable design HOT 8
- UTC vs GMT HOT 2
- Should feature icu_provider/export be named icu_provider/datagen HOT 1
- Make VarZeroVec branchless like ZeroVec
- Introduce borrowed versions of segmenter types
- Remove the initial 0 length from VarZeroVec's representation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icu4x.