U_NAMESPACE_BEGIN namespace number {
namespace impl {
-class ReferencingPluralsModifierStore : public ModifierStore {
- public:
- virtual const Modifier* getModifier(int8_t signum, StandardPlural::Form plural) const;
- const Modifier* mods[StandardPlural::COUNT] = {};
-};
-
/**
* The canonical implementation of {@link Modifier}, containing a prefix and suffix string.
* TODO: This is not currently being used by real code and could be removed.
* Sets the Modifier with the specified signum and plural form.
*/
void adoptModifier(int8_t signum, StandardPlural::Form plural, const Modifier *mod) {
+ U_ASSERT(mods[getModIndex(signum, plural)] == nullptr);
mods[getModIndex(signum, plural)] = mod;
}
* The modifier will apply to all plural forms.
*/
void adoptModifierWithoutPlural(int8_t signum, const Modifier *mod) {
+ U_ASSERT(mods[getModIndex(signum, DEFAULT_STANDARD_PLURAL)] == nullptr);
mods[getModIndex(signum, DEFAULT_STANDARD_PLURAL)] = mod;
}
if (data.rangePattern.getArgumentLimit() == 0) {
// No data!
- data.rangePattern = {u"{0} --- {1}", status};
+ data.rangePattern = {u"{0}–{1}", status};
}
if (data.approximatelyPattern.getArgumentLimit() == 0) {
// No data!
// TODO: Is it necessary to manually fall back to latn, or does the data sink take care of that?
if (sink.rangePattern == null) {
- sink.rangePattern = SimpleFormatterImpl.compileToStringMinMaxArguments("{0} --- {1}", sb, 2, 2);
+ sink.rangePattern = SimpleFormatterImpl.compileToStringMinMaxArguments("{0}–{1}", sb, 2, 2);
}
if (sink.approximatelyPattern == null) {
sink.approximatelyPattern = SimpleFormatterImpl.compileToStringMinMaxArguments("~{0}", sb, 1, 1);