PluralRule ruleInstance = acutalRule.newInstance(); sb.append(ruleInstance.pluralForms()[ruleInstance.select(count)].getName()).append( "|");
missingPluralForms = new HashSet<String>(); for (PluralForm form : pluralRule.pluralForms()) { if (form.getWarnIfMissing() && !AlternateMessageSelector.OTHER_FORM_NAME.equals(form.getName())) { missingPluralForms.add(form.getName());
missingPluralForms = new HashSet<String>(); for (PluralForm form : pluralRule.pluralForms()) { if (form.getWarnIfMissing() && !AlternateMessageSelector.OTHER_FORM_NAME.equals(form.getName())) { missingPluralForms.add(form.getName());
PluralRule rule = getRule(arg.pluralRule); int n = ((Number) args[i]).intValue(); forms = expand(forms, "=" + n, rule.pluralForms()[rule.select(n - arg.pluralOffset)].getName()); args[i] = n - arg.pluralOffset;
if (pluralForms[i].getName().equals(value)) { out.println("case " + i + ": // " + value); out.indent();
PluralRule ruleInstance = acutalRule.newInstance(); sb.append(ruleInstance.pluralForms()[ruleInstance.select(count)].getName()).append( "|");
if (pluralForms != null) { for (PluralForm form : pluralForms) { String name = form.getName(); if ("other".equals(name)) { writeComment(out, "- " + form.getDescription()); write(out, key, resourceList.getString(key)); } else { String comment = "- plural form '" + form.getName() + "': " + form.getDescription(); if (!form.getWarnIfMissing()) { comment += " (optional)"; form.getName()); if (translated == null) { translated = ""; write(out, key + "[" + form.getName() + "]", translated);
if (pluralForms[i].getName().equals(value)) { out.println("case " + i + ": // " + value); out.indent();
if (pluralForms != null) { for (PluralForm form : pluralForms) { String name = form.getName(); if ("other".equals(name)) { writeComment(out, "- " + form.getDescription()); write(out, key, resourceList.getString(key)); } else { String comment = "- plural form '" + form.getName() + "': " + form.getDescription(); if (!form.getWarnIfMissing()) { comment += " (optional)"; form.getName()); if (translated == null) { translated = ""; write(out, key + "[" + form.getName() + "]", translated);
public static PluralForm[] pluralForms() { return new PluralForm[] { new PluralForm("other", "Default plural form"), new PluralForm("one", "Count is 1"), new PluralForm("two", "Count is 2"), }; }
public static PluralForm[] pluralForms() { return new PluralForm[] { new PluralForm("other", "Default plural form"), new PluralForm("one", "Count is 0 or 1"), }; }
@Override public PluralForm[] pluralForms() { return new PluralForm[] { new PluralForm("other", "Default plural form"), new PluralForm("none", "Count is 0"), new PluralForm("one", "Count is 1"), new PluralForm("two", "Count is 2"), new PluralForm("few", "Count is between x03 and x10"), new PluralForm("many", "Count is between x11 and x99"), }; }
public static PluralForm[] pluralForms() { return new PluralForm[] { new PluralForm("other", "Default plural form"), new PluralForm("one", "Count ends in 1 but not 11"), new PluralForm("few", "Count ends in 2-4 but not 12-14"), new PluralForm("many", "Count ends in 0 or 5-9 or 11-15", true), }; }
public static PluralForm[] pluralForms() { return new PluralForm[] { new PluralForm("other", "Default plural form"), new PluralForm("none", "Count is 0"), new PluralForm("one", "Count is 1"), new PluralForm("two", "Count is 2"), }; }
/** * Returns the list of plural forms, indicating the singular form is optional. */ public static PluralForm[] pluralFormsOptional() { return new PluralForm[] { new PluralForm("other", "Default plural form"), new PluralForm("one", "Count is 1", true), }; }
public static PluralForm[] pluralForms() { return new PluralForm[] { new PluralForm("other", "Default plural form"), new PluralForm("one", "Count is 1"), }; }
public PluralForm[] pluralForms() { return new PluralForm[] { new PluralForm("other", "Default plural form"), }; }
@Override public PluralForm[] pluralForms() { return new PluralForm[] { new PluralForm("other", "Default plural form"), new PluralForm("one", "Count is 1 or 11"), new PluralForm("two", "Count is 2 or 12"), new PluralForm("few", "Count is 3-10 or 13-19"), }; }
@Override public PluralForm[] pluralForms() { return new PluralForm[] { new PluralForm("other", "Default plural form"), new PluralForm("one", "Count ends in 1 but not 11"), new PluralForm("few", "Count ends in 2-9 but not 12-19"), }; }
@Override public PluralForm[] pluralForms() { return new PluralForm[] { new PluralForm("other", "Default plural form"), new PluralForm("one", "Count is 1"), new PluralForm("few", "Count is 0 or ends in 02-10"), new PluralForm("many", "Count ends in 11-19"), }; }