Monday, September 25, 2017

Plurals (using 2 plural forms in one paragraph not working -> bug in GWT compiler?)


I have the following definition:

@DefaultMessage("{0,number} preceding items, and {1,number} " +
"followup items.")
@Description("Label showing the number of preceding items and " +
"follow-up items")
"none|one", "One follow-up item.",
"one|none", "One preceding item.",
"one|one", "One preceding item, and one follow-up item.",
"none|other", "{1,number} follow-up items.",
"other|none", "{0,number} preceding items.",
"one|other", "One preceding item, and {1,number} follow-up" +
" items.",
"other|one", "{0,number} preceding items, and one follow-up " +
String precedingAndFollowupMeetingCount(
@PluralCount(PluralRuleNoneOne.class) int precedingItemsCount,
@PluralCount(PluralRuleNoneOne.class) int followUpItemssCount);

I defined the PluralRuleNonOne.class as follows


public final class PluralRuleNoneOne extends DefaultRule {
public PluralForm[] pluralForms() {
return DefaultRule_0_1_n.pluralForms();

public int select(final int n) {

How the gwt compiler (with -extra) produces (among other things) the following properties file:

# Description: Label showing the number of preceding items and follow-up items
# 0=precedingItemssCount (Plural Count), 1=followUpItemsCount (Plural Count)
# - Default plural form
BE52173166487BB95708A7E45EB0752B={0,number} preceding items, and {1,number} follow-up items.
# - plural form 'none': Count is 0
# - plural form 'one': Count is 1

Now I wonder for what the red highlighted properties stand for. As there are TWO parameters it seems impossible to have a property like [none] or a single [one]?

Is this a bug in the GWT compiler or do I have some misconcept in my Message class?

Thanks for any advice


You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment