natros / gwt-cal

Automatically exported from code.google.com/p/gwt-cal
0 stars 2 forks source link

Single Locale #62

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It seems that since adding this library I am not getting 7 permutations per 
user.agent in my compile. I am guessing this is due to the i18n support in the 
gwt-cal module. Is there a way to force it to a single locale? 

Original issue reported on code.google.com by aazzin...@gmail.com on 19 Jun 2010 at 5:51

GoogleCodeExporter commented 8 years ago
I just compiled the gwt-cal demo project and I get "Compiling 42 permutations".

Are you sure you didn't set your default permutation in module.xml file to only 
use a signle user agent? as described here: 
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/af7b83708
bd1bf24

I honestly doubt it is an issue with gwt-cal. We use static string 
internationalization, as recommended in the gwt documentation. This 
implementation of i18n does not interfere with or override gwt's defalt 
handling of i18n and user agents... 

I'd recommend posting your question/issue with the gwt user group.

Original comment by Brad.Ryd...@gmail.com on 19 Jun 2010 at 6:40

GoogleCodeExporter commented 8 years ago
The number of permutations is the number of browsers supported x the number of 
locales.

In your Calendar.gwt.xml you have:
    <extend-property name="locale" values="es"/>
    <extend-property name="locale" values="es_MX"/>
    <extend-property name="locale" values="fr"/>
    <extend-property name="locale" values="it"/>
    <extend-property name="locale" values="no"/>
    <extend-property name="locale" values="nn_NO"/>
    <extend-property name="locale" values="pl_PL"/>

I am not sure if there is a way to reset this property in my .gwt.xml file.

In my case, I support 4 browsers but only want to support 1 locale. It should 
be 4 permutations, but when I include the your calendar I get 28.

Is there a reason you include the locals at the Calendar level and not in the 
demo code?

Original comment by russells...@gmail.com on 27 Jul 2010 at 2:12

GoogleCodeExporter commented 8 years ago
Russel,

To force a single locale, you can use the following code to your module xml 
file:
<extend-property name='locale' values='en'/>
<set-property-fallback name='locale' value='en'/>
<set-property name='locale' value='en'/>

This reduces the number of permutations to 6 for me.

Including locales directly in the UI widget library is considered the 
recommended approach. That is how a number of other libraries work, including 
gwt itself and google's google-web-toolkit-incubator widget library.

Original comment by Brad.Ryd...@gmail.com on 27 Jul 2010 at 2:52

GoogleCodeExporter commented 8 years ago
That fixed the issue.

I still think that gwt-cal does not need to extend the property, but this work 
around is perfect.

Original comment by russells...@gmail.com on 27 Jul 2010 at 3:12