-
Notifications
You must be signed in to change notification settings - Fork 386
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
CLDR-17106 add more fixed candidate items #3681
Conversation
- restructure DataPage / DiskDataCache to hold the candidate providers - add a FixedCandidateProvider structure, designed to allow quick additions of future fixed candidates.
private final PathHeader.Factory phf; | ||
final SupplementalDataInfo sdi; | ||
|
||
final List<FixedCandidateProvider> personNameProviders = |
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.
these are not locale dependent, so kept in a separate static list.
class GrammarCandidateProvider extends PatternCacheCandidateProvider { | ||
final GrammarInfo grammarInfo = sdi.getGrammarInfo(locale.getBaseName()); | ||
|
||
public GrammarCandidateProvider() { | ||
super("^//ldml/units/unitLength.*/unit.*gender"); | ||
} | ||
|
||
@Override | ||
protected Collection<String> getCandidates() { | ||
return grammarInfo.get( | ||
GrammaticalTarget.nominal, | ||
GrammaticalFeature.grammaticalGender, | ||
GrammaticalScope.units); | ||
} | ||
} |
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.
this one is locale dependent depends on the supplementalDataInfo in the enclosing class
what are "fixed candidates"? |
Candidates are options during voting… Fix candidates means that you have a fixed list instead of being able to use the plus button |
In this pull request, I tried to write it so that it was easy to add more of these later |
CLDR-17106
ALLOW_MANY_COMMITS=true