-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for custom transliterator using Latin-ASCII and Lower #5469
Conversation
} | ||
|
||
#[derive(Debug)] | ||
struct LowercaseTransliterator(CaseMapper); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: I suspect these should be exported by the transliterator crate
but we really need to figure out a better solution for bundling "default" transliterators anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they should be, but I didn't feel like making big changes right now; I want to show how to do this with minimal patches against 1.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm not proposing that for this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think they should be exposed by the crate. If you need them as a dependency, you can summon them with ::Lower
, otherwise just use CaseMapper
.
collection.register_source( | ||
&"und-t-und-x0-lower".parse().unwrap(), | ||
"<error>".to_string(), | ||
["Any-Lower"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: would love transliterator to expose all of these in some module, perhaps with individual names, as well as a bundling solution that lets you include various useful bundles of the.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trait NamedCustomTransliterator: CustomTransliterator {
const BCP47: &'static str;
const NAME: &'static str;
}
I want #5483 to land first, but this PR should still be reviewed |
🎉 All dependencies have been resolved ! |
I reverted the "Fix transliterator fallback loading" commit since it seems like I don't actually need it. |
It is a little awkward due to issues like #3991 and #3910, but I got it to work.
There are two other changes I split out into #5468 and #5467.
Depends on #5483
CC @FrankYFTang