Comments (4)
Hi @kornelski!
Most functions with the large trait bounds have a link to this page which explains what they mean:
These bounds are what enable ICU4X to slice the data to exactly what is needed and avoid having a big monolithic data file as is required by ICU4C that doesn't have these bounds.
In general you should be using functions like RuleCollection::as_provider
instead of RuleCollection::as_provider_unstable
. Once you get things working with RuleCollection::as_provider
, if you want to start building your own data, you can switch over to RuleCollection::as_provider_unstable
, and the argument should be a reference to your custom data provider created as explained in this tutorial.
from icu4x.
Actually I'll re-open this issue specifically for Transliterator
because it looks like it doesn't currently have a compiled_data constructor.
from icu4x.
Partial fix for the Transliterator
constructor in #4898
In the short term, you can get the type you need, the one that implements all the trait bounds, like this:
include!("tests/transliterate/data/baked/mod.rs");
where tests
is the icu_experimental
crate root which is components/experimental/tests
in this repository. That file exposes a type named BakedDataProvider
which is what you need.
It's not ideal that this is in a test directory, which is why I put up #4898. I think this is just an oversight from when we moved the code into the new icu_experimental
crate.
from icu4x.
tests/transliterate/data/baked
contains some hand written tests, it does not contain CLDR data.
from icu4x.
Related Issues (20)
- Create a way to map a Locale to a default Currency HOT 6
- For Currency Long Formatting: check that the .json data is completed
- Refactor: Move `MeasureUnit` to a Separate Crate HOT 3
- Choose an appropriate name for `MeasureUnit` crate HOT 2
- Consider Adding Specific Formatter for Long Formatting in for currency formatter HOT 2
- Add return type to `Yoke::with_mut` and `Yokeable::transform_mut` HOT 6
- Suggestion: Use `PluralRules` instead of `Count` HOT 4
- 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 21
- 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
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.