Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT permutation count

When I do

<set-property name="user.agent" value="ie9,gecko1_8,safari,opera" />

the compiler does 4 permutations;

But adding :

<set-property name="user.agent" value="ie9,gecko1_8,safari,opera" />

<extend-property name="locale" values="nl" />
<extend-property name="locale" values="en" />

<collapse-property name="locale" values="en*" />
<collapse-property name="locale" values="nl*" />
<set-property-fallback name="locale" value="en" />

I see 48 permutations. But I would expect 4 * 2 = 8 permutations.

What are the 48 permutations and/or is there a way to instruct the compiler to show what the permutations represent during the compilation process ?

I also have this in my module <inherits name="com.google.gwt.i18n.CldrLocales" />

*UPDATE* : This change gives 56 permutations

<extend-property name="locale" values="nl_NL" />
<extend-property name="locale" values="nl_BE" />
<extend-property name="locale" values="en_GB" />
<set-property-fallback name="locale" value="en_GB" />
<set-property name="user.agent" value="ie9,gecko1_8,safari,opera" />

It still is not clear to how the compiler gets to this number ?

like image 711
koma Avatar asked May 02 '13 21:05

koma


1 Answers

This comment from Thomas revealed the solution :

you should have <set-property name="locale" value="en,nl"/> or you'll still have the default locale even though you'll never use it.

So modified to :

<extend-property name="locale" values="nl_NL" />
<extend-property name="locale" values="nl_BE" />
<extend-property name="locale" values="en_GB" />
<set-property name="locale" value="en_GB,nl_NL,nl_BE"/>
<!-- <collapse-property name="locale" values="en*" /> <collapse-property 
    name="locale" values="nl*" /> -->
<set-property-fallback name="locale" value="en_GB" />

=> 12 permutations, as expected from 4 (browsers) * 3 (lang/country) = 12 permutations

like image 82
koma Avatar answered Oct 02 '22 05:10

koma