Re: Static vs dynamic String internationalization

2015-02-24 Thread Luis Fernando Planella Gonzalez
That, of course, depends on the application requirement.
I work on a very large app which is not (only) used by ourselves, but by 
other organizations.
And on each organization, administrators can change translations on the fly 
- just a F5 or logout / login away.
In this scenario, of course, there is no choice.
We even created a custom translations loading mechanism that efficiently 
use the browser cache and load translations in parts, as there are more 
than 4k keys, as we don't want all them to be always downloaded.
Each page (it all started in GWT 1.5, before GWT places existed) knows 
which translation part it needs, so we guarantee to load the required 
translations before showing the page.
But, I agree, it is a very specific requirement. Maybe 99% of the 
applications are fine with static internationalization. We're part of the 
other 1%.
-- Luis

Em segunda-feira, 23 de fevereiro de 2015 19:33:34 UTC-3, Jens escreveu:
>
>
>> - The big advantage of dynamic internationalization to me, is that I can 
>> store my translations in a database, and update texts without the need of 
>> stopping servers to deploy a new compiled version of my application.
>>
>  
> Not sure if its that big of an advantage. IMHO translations rarely change 
> and the number of supported languages is probably already known upfront and 
> does not change often either.
>
> Also if done right, updating an app does not cause any downtime especially 
> if only translations have changed or languages have been added. The worst 
> case is that a user gets a message "App has been updated and needs to be 
> reloaded". If your app uses history tokens (e.g. GWT places) then reloading 
> the current place doesn't really hurt.
>
> -- J.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Static vs dynamic String internationalization

2015-02-23 Thread Jens

>
>
> - The big advantage of dynamic internationalization to me, is that I can 
> store my translations in a database, and update texts without the need of 
> stopping servers to deploy a new compiled version of my application.
>
 
Not sure if its that big of an advantage. IMHO translations rarely change 
and the number of supported languages is probably already known upfront and 
does not change often either.

Also if done right, updating an app does not cause any downtime especially 
if only translations have changed or languages have been added. The worst 
case is that a user gets a message "App has been updated and needs to be 
reloaded". If your app uses history tokens (e.g. GWT places) then reloading 
the current place doesn't really hurt.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Static vs dynamic String internationalization

2015-02-23 Thread Mike
Hello everyone,

I'm trying to make a decision for my new project whether to use static or 
dynamic string internationalization. 
I know how to use both. It's more about pros and cons:
- The big advantage of dynamic internationalization to me, is that I can 
store my translations in a database, and update texts without the need of 
stopping servers to deploy a new compiled version of my application.
- On the other hand GWT documentation states that runtime performance is 
greater when using static internationalization. So my questions are:
 
How much better is runtime performance with static internationalization?
Are there other factors to consider besides those on 
http://www.gwtproject.org/doc/latest/DevGuideI18n.html ?
Can I still use UiBinder with dynamic  internationalization?

Thank you for all replies in advance.

Best regards,
Mike

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to access “locale” value (of an Internationalization App) in server side in GWT?

2014-07-29 Thread Tom
I found the currect solution that is to use LocaleInfo

LocaleInfo localeInfo=LocaleInfo.getCurrentLocale();
String locale=localeInfo.getLocaleName();
addToPopupSlot(loadingPresenter);
SetLanguage action=new SetLanguage(locale);

dispatchAsync.execute(action, setLanguageCallback);


On Tuesday, July 29, 2014 4:07:47 PM UTC+10, Tom wrote:
>
> Ok, I am developing an app that supports Internationalization. I am using 
> Static 
> String Internationalization method for my app.
>
> Let say my app can have English & German version, so -1st, I created 
> MyMessages.java which has all message texts written in English. Then I 
> created an MyMessages_ge which is almost the same as MyMessages.java 
> except that the text written in German
>
> -2nd, in MyProject.html i have  content="text/html; charset=UTF-8"> to make sure it will support all 
> languages
>
> -3rd, in MyProject.gwt.xml I have  values="ge"/>
>
> Now I run my app in eclipse 
> http://localhost:/MyProject.html?gwt.codesvr=127.0.0.1:9997&locale=ge 
> & it shows all the German text as I expected.
>
> However, I have a need to know that my app is German At Server Side. That 
> means whenever my GWT Gui in German version then my server will know that 
> languageCode=1 if it is in English so server will use the default 
> language languageCode=0
>
> Here is what I did. At HeaderPresenter.java
>
> @Override
> public void prepareFromRequest(PlaceRequest request){
> super.prepareFromRequest(request);
> String locale=request.getParameter("locale", "");
> setLanguage(locale); // servercall back here
> }
>
> so when my app run first time it should let server to know which language 
> the Gwt app is using
>
> @Override
> public SetLanguageResult execute(SetLanguage action, ExecutionContext context)
> throws ActionException {
> String locale=action.getLocale();
> if("ge".equals(locale)){
> Data.languageType=1;
> }
> return null;
> }
>
> However, it doesn't seem work When I go to orderPage the url will be 
> http://localhost:/MyProject.html?gwt.codesvr=127.0.0.1:9997&locale=ge#!orderPage
>  
> it not in the form 
> http://localhost:/MyProject.html?gwt.codesvr=127.0.0.1:9997#!orderPage;locale=ge
>  
> that is why server couldn't capture the locale value.
>
> I think I misunderstood something here. I'm quite confusing.
>
> So How to access "locale" value (of an Internationalization App) in server 
> side in GWT?
>
>
> http://stackoverflow.com/questions/25009115/how-to-access-locale-value-of-an-internationalization-app-in-server-side-in
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to access “locale” value (of an Internationalization App) in server side in GWT?

2014-07-29 Thread Lothar Kimmeringer
Am 29.07.2014 12:22, schrieb Tom:
> but how can i capture the "locale"value in this url?*

As I said, I solved it differently by passing the language as
parameter in the method I call on the server. So I don't have
an answer for you, just a solution that makes you independent
from the existance of the query-parameter (which isn't
necessarily the case).


Cheers, Lothar

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to access “locale” value (of an Internationalization App) in server side in GWT?

2014-07-29 Thread Tom


On Tuesday, July 29, 2014 7:46:12 PM UTC+10, Jens wrote:
>
> The internationalization works fine if i open 
> *http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage
>  
>> <http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage>
>>  *
>>
>> But it doesn't work if i open 
>> *http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997#!orderPage 
>> <http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997#!orderPage>*
>> *;locale=de*
>>
>
> A server can only see query parameters. It can not see the hash fragment 
> of an URL. So if you want to propagate information from the client to the 
> server via URL then you must use the first approach with the query 
> parameter.
>
> -- J.
>

Hi Jen, thankl you for your info this link work 
*http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage
 
<http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage>
 , 
but how can i capture the "locale"value in this url? that is a question*
also if we put ; or ? or & in front of *locale 
<http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage>,
 
*it's all works 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to access “locale” value (of an Internationalization App) in server side in GWT?

2014-07-29 Thread Tom
Thax you very much for your info,
 this link work 
*http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage
 
<http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage>
 , 
but how can i capture the "locale"value in this url?*

On Tuesday, July 29, 2014 7:47:42 PM UTC+10, Cerberus wrote:
>
> Am 29.07.2014 11:41, schrieb Tom: 
> > The internationalization works fine if i open 
> > *
> http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage
>  
> * 
> > 
> > But it doesn't work if i open 
> > *
> http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997#!orderPage**;locale=de*
>  
>
> Technically these are different URLs. Use the one that works. 
>
>
> Cheers, Lothar 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to access “locale” value (of an Internationalization App) in server side in GWT?

2014-07-29 Thread Lothar Kimmeringer
Am 29.07.2014 11:41, schrieb Tom:
> The internationalization works fine if i open
> *http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage
>  *
> 
> But it doesn't work if i open
> *http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997#!orderPage**;locale=de*

Technically these are different URLs. Use the one that works.


Cheers, Lothar

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to access “locale” value (of an Internationalization App) in server side in GWT?

2014-07-29 Thread Jens

>
> The internationalization works fine if i open 
> *http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage
>  
> <http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage>
>  *
>
> But it doesn't work if i open 
> *http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997#!orderPage 
> <http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997#!orderPage>*
> *;locale=de*
>

A server can only see query parameters. It can not see the hash fragment of 
an URL. So if you want to propagate information from the client to the 
server via URL then you must use the first approach with the query 
parameter.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to access “locale” value (of an Internationalization App) in server side in GWT?

2014-07-29 Thread Tom
The internationalization works fine if i open 
*http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997;locale=de#!orderPage
 *

But it doesn't work if i open 
*http://127.0.0.1:/Ekajati.html?gwt.codesvr=127.0.0.1:9997#!orderPage*
*;locale=de*


On Tuesday, July 29, 2014 6:44:12 PM UTC+10, Cerberus wrote:
>
> Am 29.07.2014 08:07, schrieb Tom: 
>
> > However, I have a need to know that my app is German |At Server Side|. 
> > That means whenever my GWT Gui in German version then my server will 
> > know that |languageCode=1| if it is in English so server will use the 
> > default language |languageCode=0| 
>
> I solved it by adding the language code to the signature of the 
> methods of the servlet. The localization-file contains an entry 
> CURR_LANGUAGE (=de in the german resource, =en in the english one), 
> so a call on the client-side always look something like this 
> doSomething(param1, param2, param3, CONSTANTS.CURRLANGUAGE(), new 
> Async...) 
>
> > However, it doesn't seem work When I go to orderPage the url will 
> > be |
> http://localhost:/MyProject.html?gwt.codesvr=127.0.0.1:9997&locale=ge#!orderPage|
>  
> > it not in the form |
> http://localhost:/MyProject.html?gwt.codesvr=127.0.0.1:9997#!orderPage;locale=ge|
>  
> > that is why server couldn't capture the |locale| value. 
>
> The Querystring of the URL starts with the gwt.codesvr, so I 
> assume the #!orderPage is in the wrong place. As well, sepa- 
> rating query-parameters by ; isn't correct, it must be &. So 
> the correct url should in my eyes be 
>
> http://localhost:/MyProject.html#!orderPage?gwt.codesvr=127.0.0.1:9997&locale=ge
>  
>
> BTW. GE is not the correct iso-value for german, it's de. You 
> should use these rather than inventing your own. 
>
>
> Cheers, Lothar 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to access “locale” value (of an Internationalization App) in server side in GWT?

2014-07-29 Thread Lothar Kimmeringer
Am 29.07.2014 08:07, schrieb Tom:

> However, I have a need to know that my app is German |At Server Side|.
> That means whenever my GWT Gui in German version then my server will
> know that |languageCode=1| if it is in English so server will use the
> default language |languageCode=0|

I solved it by adding the language code to the signature of the
methods of the servlet. The localization-file contains an entry
CURR_LANGUAGE (=de in the german resource, =en in the english one),
so a call on the client-side always look something like this
doSomething(param1, param2, param3, CONSTANTS.CURRLANGUAGE(), new Async...)

> However, it doesn't seem work When I go to orderPage the url will
> be 
> |http://localhost:/MyProject.html?gwt.codesvr=127.0.0.1:9997&locale=ge#!orderPage|
> it not in the form 
> |http://localhost:/MyProject.html?gwt.codesvr=127.0.0.1:9997#!orderPage;locale=ge|
> that is why server couldn't capture the |locale| value.

The Querystring of the URL starts with the gwt.codesvr, so I
assume the #!orderPage is in the wrong place. As well, sepa-
rating query-parameters by ; isn't correct, it must be &. So
the correct url should in my eyes be
http://localhost:/MyProject.html#!orderPage?gwt.codesvr=127.0.0.1:9997&locale=ge

BTW. GE is not the correct iso-value for german, it's de. You
should use these rather than inventing your own.


Cheers, Lothar

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to access “locale” value (of an Internationalization App) in server side in GWT?

2014-07-28 Thread Tom
 

Ok, I am developing an app that supports Internationalization. I am using 
Static 
String Internationalization method for my app.

Let say my app can have English & German version, so -1st, I created 
MyMessages.java which has all message texts written in English. Then I 
created an MyMessages_ge which is almost the same as MyMessages.java except 
that the text written in German

-2nd, in MyProject.html i have  to make sure it will support all 
languages

-3rd, in MyProject.gwt.xml I have 

Now I run my app in eclipse 
http://localhost:/MyProject.html?gwt.codesvr=127.0.0.1:9997&locale=ge & 
it shows all the German text as I expected.

However, I have a need to know that my app is German At Server Side. That 
means whenever my GWT Gui in German version then my server will know that 
languageCode=1 if it is in English so server will use the default language 
languageCode=0

Here is what I did. At HeaderPresenter.java

@Override
public void prepareFromRequest(PlaceRequest request){
super.prepareFromRequest(request);
String locale=request.getParameter("locale", "");
setLanguage(locale); // servercall back here
}

so when my app run first time it should let server to know which language 
the Gwt app is using

@Override
public SetLanguageResult execute(SetLanguage action, ExecutionContext context)
throws ActionException {
String locale=action.getLocale();
if("ge".equals(locale)){
Data.languageType=1;
}
return null;
}

However, it doesn't seem work When I go to orderPage the url will be 
http://localhost:/MyProject.html?gwt.codesvr=127.0.0.1:9997&locale=ge#!orderPage
 
it not in the form 
http://localhost:/MyProject.html?gwt.codesvr=127.0.0.1:9997#!orderPage;locale=ge
 
that is why server couldn't capture the locale value.

I think I misunderstood something here. I'm quite confusing.

So How to access "locale" value (of an Internationalization App) in server 
side in GWT?

http://stackoverflow.com/questions/25009115/how-to-access-locale-value-of-an-internationalization-app-in-server-side-in

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Completely lost at internationalization (i18n)

2013-12-30 Thread Thomas Broyer


On Monday, December 23, 2013 11:24:20 PM UTC+1, Qunit wrote:
>
> I'm completely stumped on I18n. Any help would be greatly appreciated. 
> Here's my info:
> - Using mvn 3.0.5
> - Using uiBinder
> - GWT 2.5.1 with GWTBootstrap
> - Eclipse 4.2 with maven integration
>
> All working, except when trying to add I18n for dutch (nl, default) and 
> english (en)
>
> Part of .gwt.xml
>
> 
> 
> 
> 
> 
>

That last line is saying that only "nl" locale will actually be compiled. 
You probably want value="nl,en", though I've been told that removing the 
'default' locale might break a few things (haven't personally noticed 
anything though).
 

> Example part of uiBinder:
>
>  
> http://dl.google.com/gwt/DTD/xhtml.ent";> 
>  xmlns:b="urn:import:com.github.gwtbootstrap.client.ui" 
> xmlns:g="urn:import:com.google.gwt.user.client.ui" 
> ui:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat' 
> ui:generateKeys="com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator" 
> ui:generateLocales="default" 
>

You disabled the 'default' locale, so maybe you'll want 
ui:generateLocales="en, nl"

Note that this attribute is equivalent to @Generate(locales={}): 
http://www.gwtproject.org/javadoc/latest/com/google/gwt/i18n/client/LocalizableResource.Generate.html#locales()

…or maybe you meant ui:defaultLocale="en" ? (equivalent to @DefaultLocale)
 

>
> > 
>  
>  
>  
> Please enter your 
> details to signup 
> 
>
> Part of pom.xml:
>
>   
> org.codehaus.mojo
> gwt-maven-plugin
> 2.5.1
> 
> 
> 
> compile
> i18n
> generateAsync
> 
> 
> 
> 
> com.mongoasis.presentation.i18n.Messages i18nMessagesBundle>
> mongoasis.html
> true
> 1
> true
> 
> 
>
> According to some documentation I should be able to generate property 
> files using mvn install or mvn gwt:i18n.
>
"mvn gwt:i18n" is about generating com.google.gwt.i18n.client.Messages 
interfaces from existing .properties files (from your src/main/resources 
folder), so it's not what you want here.
 

> However doing that results in errors/warnings the the 
> com.mongoasis.presentation.i18n.Messages 
> file could not be found.
>
This is probably because gwt:i18n cannot find a 
com/mongoasis/presentation/i18n/Messages.properties file in 
src/main/resources (that's the name you gave in i18nMessagesBundle, which 
is a configuration property for the gwt:i18n goal).
Because of that error, your build fails and the GWT compiler (that would 
generate properties files from your UiBinder templates) is not run 
(gwt:i18n runs a generate-sources while gwt:compile runs at 
prepare-package, which is much later in the Maven lifecycle)
 

> So I create it manually after which it complains that it is ampty. Adding 
> random key-value pairs stops the error message, but nowhere I find MD5 
> hashed properties to fill in. Event specifying the key manually does not 
> result in the text being replaced with any translated text.
>
> I'm felling lost and alone in a dark world... Who enlightens me?
>

First, don't use gwt:i18n unless you know you need it. It's only useful for 
a few specific cases, and even more-specific cases if you consider binding 
it to the build lifecycle.

The gwt:compile should then generate properties files the  folder 
(which defaults to target/extra). You'll have to copy those files to your 
src/main/resources (keeping the same folder hierarchy and file name, 
possibly making copies for the different locales) and then tweak them. In 
the subsequent calls to gwt:compile, GWT will use them as sources so the 
correct translations will appear in the generated JavaScript code. You'll 
only see the result in DevMode or once compiled to JS.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Completely lost at internationalization (i18n)

2013-12-28 Thread Qunit
I'm completely stumped on I18n. Any help would be greatly appreciated. 
Here's my info:
- Using mvn 3.0.5
- Using uiBinder
- GWT 2.5.1 with GWTBootstrap
- Eclipse 4.2 with maven integration

All working, except when trying to add I18n for dutch (nl, default) and 
english (en)

Part of .gwt.xml






Example part of uiBinder:

 
http://dl.google.com/gwt/DTD/xhtml.ent";> 
 
 
 
 
Please enter your 
details to signup 


Part of pom.xml:

  
org.codehaus.mojo
gwt-maven-plugin
2.5.1



compile
i18n
generateAsync




com.mongoasis.presentation.i18n.Messages
mongoasis.html
true
1
true



According to some documentation I should be able to generate property files 
using mvn install or mvn gwt:i18n. However doing that results in 
errors/warnings the the com.mongoasis.presentation.i18n.Messages file could 
not be found. So I create it manually after which it complains that it is 
ampty. Adding random key-value pairs stops the error message, but nowhere I 
find MD5 hashed properties to fill in. Event specifying the key manually 
does not result in the text being replaced with any translated text.

I'm felling lost and alone in a dark world... Who enlightens me? 




-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Examples and implementation of Dynamic String Internationalization for UIBinder and its classes.

2013-06-27 Thread prasad kulkarni
Hi nataraj,

did you get the solution ?

On Wednesday, 8 August 2012 15:07:33 UTC+5:30, Bens wrote:
>
> Hi all,
>
> We have started a small GWT project which needs to support multiple 
> languages. For that we go for internationalization technique in GWT. As far 
> we read the GWT Internalization module, static implementation was simple 
> but for that we need to re-compile each and every time we change any thing 
> in properties files or while adding new labels & languages. It is ok when 
> we change labels and add new languages. But for replacing gramatical and 
> verbal errors in the properties files for other languages, we have to 
> re-compile them. 
>
> So, we analyzed and checked whether we can move the properties files alone 
> from the interface calling location to separate location away from project 
> and call them externally. But localization in GWT requires the properties 
> files need to be in same location, where the respective interface calls are 
> done. Is there any other way to do this?
>
> Also, we came to know the GWT supports internalization using dynamic 
> string method, where we can write all the labels in the hosted HTML page 
> change them for each language using Java-Script calls. Can this Dynamic 
> String Internalization supports the change (in multiple languages) for the 
> labels declared in UIBinder and its java class.? If so, can anyone explain 
> it with simple example...
>
>
> Regards,
> Nataraj...
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




NumberFormat and Internationalization Messages

2012-11-22 Thread Thad
I'm am unable to get com.google.gwt.i18n.client.Messages for format a float 
in production.

My DefaultMessage looks like "{0,float,#.0}\"". In DevMode, my number has 
one digit after the decimal, e.g., 8.8" or 11.6"

In production--now Javascript vs Java--the number has *many* digits after 
the decimal, e.g., 8.80190734863" or 11.60381469726"
This is true in IE and Chrome (I've not tested Firefox and Safari).

Am I wrong thinking that this formatting should work like 
java.text.NumberFormat?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/cyjaDB12K6UJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Examples and implementation of Dynamic String Internationalization for UIBinder and its classes.

2012-08-09 Thread Joseph Lust
Nataraj,

I know you don't want to redeploy you application each time a string 
changes, but calling an external service can also complicate things. I say 
this from experience as a group at my company did a very large (200K line, 
400 screen) GWT app last year which had to work in many languages. They did 
not use the GWT i18n tools because the company wanted to use a service like 
you describe. However, the result was a much slower application because 
various parts of the GWT code had to wait for the i18n files to be loaded 
from the company's (very slow) i18n service before it could render anything 
on a given page or screen. In hindsight, they wish they had used the GWT 
i18n facilities since such strings rarely are ever changed in production.


Hope that helps.

Sincerely,
Joseph

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/6r9JasqdCJ8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Examples and implementation of Dynamic String Internationalization for UIBinder and its classes.

2012-08-08 Thread Bens
Hi all,

We have started a small GWT project which needs to support multiple 
languages. For that we go for internationalization technique in GWT. As far 
we read the GWT Internalization module, static implementation was simple 
but for that we need to re-compile each and every time we change any thing 
in properties files or while adding new labels & languages. It is ok when 
we change labels and add new languages. But for replacing gramatical and 
verbal errors in the properties files for other languages, we have to 
re-compile them. 

So, we analyzed and checked whether we can move the properties files alone 
from the interface calling location to separate location away from project 
and call them externally. But localization in GWT requires the properties 
files need to be in same location, where the respective interface calls are 
done. Is there any other way to do this?

Also, we came to know the GWT supports internalization using dynamic string 
method, where we can write all the labels in the hosted HTML page change 
them for each language using Java-Script calls. Can this Dynamic String 
Internalization supports the change (in multiple languages) for the labels 
declared in UIBinder and its java class.? If so, can anyone explain it with 
simple example...


Regards,
Nataraj...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/FPy9gykFWkUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application size due to Internationalization

2012-07-25 Thread Shawn Brown
> Thanks for your suggestions. Yes, I did this. But the main issue I am unable
> to solve is the size of the code. It is too big to deploy on app.spot.

I don't think that is the case.

Prior to AE1.7, I was over the limit due to permutations as well.
AE1.6 was 150MB/app right, and 1.7 is 1gb (total for all apps)

It wasn't that difficult to serve the permutation files out of the blobstore.

The overview is:

1) ant task to move permutation stuff into /serve_from_blobstore folder
2) class to upload  /serve_from_blobstore permutations (including .rpc
files, and no-cache stuff) using BlobstoreService
3) servlet to handle the upload - stores blob and map (in datastore
entity) the req url and blob key
4) filter to serve blobs.  If request matches /myAppName, serve blob
by looking up blob key from request url using the enitity map created
in 3 [my *.gwt.xml file was using ]
5) task to delete blobs for particular app version

Probably the trickiest things were catching the failed uploads (it
sporadically happened) and making sure they were retried until
successful and ensuring a versions blobs were all deleted.

I'm under 500 mb now so I just have two versions (and stay under the
1gb limit) and don't serve from the blobstore but have the
infrastructure in place should the need arise.

There is no way your app minus permutations is over 1gb I think.  I
don't see the size of language permutations as a barrier to deploying
on AppEngine.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application size due to Internationalization

2012-07-25 Thread Rana
:) :) Sorry, I got confused with the posting area:

No, we don't seem to be putting things we don't need from WEB-INF/deploy, 
but we are supporting I think 66 languages. And they are making the 
application very big in size. That is why. Also, originally the application 
is big, we are doing mathematical drawing and calculations... that adds to 
the size as well, I think.

Best wishes
Rana

On Wednesday, July 25, 2012 11:43:37 AM UTC+2, Thomas Broyer wrote:
>
>
>
> On Wednesday, July 25, 2012 11:34:13 AM UTC+2, Rana wrote:
>>
>> Dear Tony,
>>
>> Thanks for your suggestions. Yes, I did this. But the main issue I am 
>> unable to solve is the size of the code. It is too big to deploy on 
>> app.spot.
>>
>
> Are you also trying to deploy some WEB-INF/deploy folder?
> If you don't know what it's for, then you can safely keep it out (you can 
> pass the -deploy argument to the GWT Compiler to output those files in a 
> different folder, outside your WAR)
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/p9rqhkV-06YJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application size due to Internationalization

2012-07-25 Thread Rana
Hello Tony,

No, we don't seem to be putting things we don't need from WEB-INF/deploy, 
but we are supporting I think 66 languages. And they are making the 
application very big in size. That is why. Also, originally the application 
is big, we are doing mathematical drawing and calculations... that adds to 
the size as well, I think.

Best wishes
Rana

On Wednesday, July 25, 2012 11:43:37 AM UTC+2, Thomas Broyer wrote:
>
>
>
> On Wednesday, July 25, 2012 11:34:13 AM UTC+2, Rana wrote:
>>
>> Dear Tony,
>>
>> Thanks for your suggestions. Yes, I did this. But the main issue I am 
>> unable to solve is the size of the code. It is too big to deploy on 
>> app.spot.
>>
>
> Are you also trying to deploy some WEB-INF/deploy folder?
> If you don't know what it's for, then you can safely keep it out (you can 
> pass the -deploy argument to the GWT Compiler to output those files in a 
> different folder, outside your WAR)
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/UmfU3_VLPjsJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application size due to Internationalization

2012-07-25 Thread Thomas Broyer


On Wednesday, July 25, 2012 11:34:13 AM UTC+2, Rana wrote:
>
> Dear Tony,
>
> Thanks for your suggestions. Yes, I did this. But the main issue I am 
> unable to solve is the size of the code. It is too big to deploy on 
> app.spot.
>

Are you also trying to deploy some WEB-INF/deploy folder?
If you don't know what it's for, then you can safely keep it out (you can 
pass the -deploy argument to the GWT Compiler to output those files in a 
different folder, outside your WAR)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/uEP4yV3fh8oJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application size due to Internationalization

2012-07-25 Thread Rana
Hi,
Many thanks, I will see if we are deploying the  class files in the jar.

Thanks a lot for the idea
Rana

On Wednesday, July 18, 2012 10:48:11 AM UTC+2, Richard wrote:
>
> Rana - are you combining class files into a jar? That'll help reduce the 
> file count for GAE, if that's an issue for you.
>
> Wishlist:
> upload the code/basic .classes, have GWT compilation happen on Google 
> infrastructure.
>
> On Wednesday, July 18, 2012 9:49:19 AM UTC+2, Rana wrote:
>>
>> Hi Joseph,
>>
>> Thanks a lot for the information. I will go through both links, and see 
>> if it helps in solving the problem.
>>
>> Many thanks again
>> Rana
>>
>> On Wednesday, July 18, 2012 3:07:48 AM UTC+2, Joseph Lust wrote:
>>>
>>> Rana,
>>>
>>> I've read that internal Google apps must build to 240 permutations for 
>>> the supported browsers and languages. To support this they:
>>>
>>>- Conduct draft compilations only using their desired dev permutation
>>>- Do complete compiles for releases/CI/test on a server farm
>>>
>>> There are instructions out there that do this sort of thing:
>>>
>>>- gwt-distcc  
>>>- GWT Distributed Build 
>>> documentation
>>>
>>> Of course you probably don't need to do a complete build that often (CI 
>>> machine, pre-release), so collapsing the permutations or just doing a 
>>> single permutation draft compile might suffice.
>>>
>>>
>>> Sincerely,
>>> Joseph
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/gCoF8PYaF-EJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application size due to Internationalization

2012-07-25 Thread Rana
Dear Tony,

Thanks for your suggestions. Yes, I did this. But the main issue I am 
unable to solve is the size of the code. It is too big to deploy on 
app.spot.

Many thanks
Rana

On Wednesday, July 18, 2012 5:05:24 PM UTC+2, Tony Rah wrote:
>
> I use a special "DevModule.gwt.xml" module during development that only 
> compiles the permutations I am interested in. This way I can control the 
> user agent, locale, and other GWT based switches without compromising the 
> production builds. Below is a rough overview of this approach:
>
> Create a new module file XXXDev.gwt.xml where XXX is the name of your 
> applications top level module used for production builds. You will inherit 
> your apps module from here. Set your various property overrides (e.g. 
> "" and " name='locale' value='en'/>").
>
> I personally use Ant to build my project and created a separate dev target 
> that builds the dev module instead of the production module.
>
> Obviously, there are countless ways to orchestrate this but the basic idea 
> is that you only compile the permutations you care about while doing 
> development. You let an automated build/test system build the really big 
> production builds and perform all of the automated tests.
>
> Hope that helps...
>
> On Tuesday, July 17, 2012 6:19:10 AM UTC-6, Rana wrote:
>>
>> Hi,
>>
>> Does anyone have a solution to the huge size of application, when we 
>> apply to it internationalization using the static method? We are supposed 
>> to support 66 languages. The application takes a long time during 
>> compilation and the size of the application is huge, we cannot upload it to 
>> google app engine.
>>
>> Many thanks
>> Rana
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/hNsbKzl8W7MJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application size due to Internationalization

2012-07-18 Thread Tony Rah
I use a special "DevModule.gwt.xml" module during development that only 
compiles the permutations I am interested in. This way I can control the 
user agent, locale, and other GWT based switches without compromising the 
production builds. Below is a rough overview of this approach:

Create a new module file XXXDev.gwt.xml where XXX is the name of your 
applications top level module used for production builds. You will inherit 
your apps module from here. Set your various property overrides (e.g. 
"" and "").

I personally use Ant to build my project and created a separate dev target 
that builds the dev module instead of the production module.

Obviously, there are countless ways to orchestrate this but the basic idea 
is that you only compile the permutations you care about while doing 
development. You let an automated build/test system build the really big 
production builds and perform all of the automated tests.

Hope that helps...

On Tuesday, July 17, 2012 6:19:10 AM UTC-6, Rana wrote:
>
> Hi,
>
> Does anyone have a solution to the huge size of application, when we apply 
> to it internationalization using the static method? We are supposed to 
> support 66 languages. The application takes a long time during compilation 
> and the size of the application is huge, we cannot upload it to google app 
> engine.
>
> Many thanks
> Rana
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Kc9KY4AhWp4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application size due to Internationalization

2012-07-18 Thread Richard
Rana - are you combining class files into a jar? That'll help reduce the 
file count for GAE, if that's an issue for you.

Wishlist:
upload the code/basic .classes, have GWT compilation happen on Google 
infrastructure.

On Wednesday, July 18, 2012 9:49:19 AM UTC+2, Rana wrote:
>
> Hi Joseph,
>
> Thanks a lot for the information. I will go through both links, and see if 
> it helps in solving the problem.
>
> Many thanks again
> Rana
>
> On Wednesday, July 18, 2012 3:07:48 AM UTC+2, Joseph Lust wrote:
>>
>> Rana,
>>
>> I've read that internal Google apps must build to 240 permutations for 
>> the supported browsers and languages. To support this they:
>>
>>- Conduct draft compilations only using their desired dev permutation
>>- Do complete compiles for releases/CI/test on a server farm
>>
>> There are instructions out there that do this sort of thing:
>>
>>- gwt-distcc  
>>- GWT Distributed Build 
>> documentation
>>
>> Of course you probably don't need to do a complete build that often (CI 
>> machine, pre-release), so collapsing the permutations or just doing a 
>> single permutation draft compile might suffice.
>>
>>
>> Sincerely,
>> Joseph
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/qLQkl-aALboJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application size due to Internationalization

2012-07-18 Thread Rana
Hi Joseph,

Thanks a lot for the information. I will go through both links, and see if 
it helps in solving the problem.

Many thanks again
Rana

On Wednesday, July 18, 2012 3:07:48 AM UTC+2, Joseph Lust wrote:
>
> Rana,
>
> I've read that internal Google apps must build to 240 permutations for the 
> supported browsers and languages. To support this they:
>
>- Conduct draft compilations only using their desired dev permutation
>- Do complete compiles for releases/CI/test on a server farm
>
> There are instructions out there that do this sort of thing:
>
>- gwt-distcc  
>- GWT Distributed Build 
> documentation
>
> Of course you probably don't need to do a complete build that often (CI 
> machine, pre-release), so collapsing the permutations or just doing a 
> single permutation draft compile might suffice.
>
>
> Sincerely,
> Joseph
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/83feAvZqlsoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application size due to Internationalization

2012-07-17 Thread Joseph Lust
Rana,

I've read that internal Google apps must build to 240 permutations for the 
supported browsers and languages. To support this they:

   - Conduct draft compilations only using their desired dev permutation
   - Do complete compiles for releases/CI/test on a server farm

There are instructions out there that do this sort of thing:

   - gwt-distcc  
   - GWT Distributed Build 
documentation

Of course you probably don't need to do a complete build that often (CI 
machine, pre-release), so collapsing the permutations or just doing a 
single permutation draft compile might suffice.


Sincerely,
Joseph

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Vj9EwhQO_bMJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Application size due to Internationalization

2012-07-17 Thread Rana
Hi,

Does anyone have a solution to the huge size of application, when we apply 
to it internationalization using the static method? We are supposed to 
support 66 languages. The application takes a long time during compilation 
and the size of the application is huge, we cannot upload it to google app 
engine.

Many thanks
Rana

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/O2UdTIQN79AJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT internationalization vs GWT Designer internationalization

2011-10-20 Thread Eric Clayberg (Google)
GWT Designer does not use standard Java localization; it uses the standard 
GWT localization. The correct link from the GWT Designer docs is...

http://code.google.com/webtoolkit/tools/gwtdesigner/features/gwt/internationalization.html

The link you posted is actually part of the shared WB docs which refer to 
standard Java localization (used by Swing and SWT, but not GWT). The GWT 
Designer doc adds its own page on GWT specific localization (see the link 
above).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/bA6BNiLkWYsJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT internationalization vs GWT Designer internationalization

2011-10-20 Thread Karel
I was reading up on GWT localization, and I came upon this strange
thing. Apparently, GWT designer uses the standard java localization
package (com.i18n.*), as can be seen on
http://code.google.com/webtoolkit/tools/gwtdesigner/features/internationalization.html.
On the other hand, GWT itself, through the tutorial and the
documentation (see 
http://code.google.com/webtoolkit/doc/latest/tutorial/i18n.html),
suggests using their custom package (com.google.gwt.i18n.*)

This seems more than weird. On one side, I like the integration of the
designer with internationalization; it makes it a much less cumbersome
process. But on the other hand, this approach is never mentioned on
another page. Is there actually a reason why the custom GWT
internationalization package is better than the default java version?

And if there is an advantage, wouldn't it make more sense for GWT
Designer to use it as well?

Kind regards,
Karel

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



UIBinder Internationalization with regular properties file?

2011-09-26 Thread ss.require
What I don't like in the UIBinder Internationalization mechanism:
1)We must place "ui.xml template file" and "localized properties file"
in the same folder.
2)"localized properties file" must have a large name like
"GenMessages.properties"

I need to use UIBinder with regular properties files which can reside
in any package and have any names. Is it possible for now?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Custom internationalization with gwt

2011-08-26 Thread mariyan nenchev
Any help with this, please?

On Thu, Aug 25, 2011 at 4:19 PM, mariyan nenchev
wrote:

> Hi,
>
> I want to make custom internationalization for my gwt app. What does this
> means? Imagine that my app must be internationalized for men and women.
> (id=men, id=women).
> is it possible to make two different .properties files like
> MyAppMessages_men_en.properties
> MyAppMessages_women_en.properties
>
> MyAppMessages_men_fr.properties
> MyAppMessages_men_fr.properties
>
> etc...
>
> and my app host page will be accessed like this for example
> http://blabla/MyAppHostPage.html?locale=en&id=men
> and this must load english version for men.
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Custom internationalization with gwt

2011-08-25 Thread mariyan nenchev
Hi,

I want to make custom internationalization for my gwt app. What does this
means? Imagine that my app must be internationalized for men and women.
(id=men, id=women).
is it possible to make two different .properties files like
MyAppMessages_men_en.properties
MyAppMessages_women_en.properties

MyAppMessages_men_fr.properties
MyAppMessages_men_fr.properties

etc...

and my app host page will be accessed like this for example
http://blabla/MyAppHostPage.html?locale=en&id=men
and this must load english version for men.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Aw: Using GNU getText (.po files) to manage the internationalization process

2011-07-22 Thread Jens
Haven't tried it but maybe using http://jsgettext.berlios.de/ along with a 
custom GWT wrapper using GWT's JSNI feature could work.

-- J. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Kcb34Eby6QkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Using GNU getText (.po files) to manage the internationalization process

2011-07-22 Thread ialexei
Hi,

Our company is looking at using gnu gettext through out the product,
due to the availability of abundant tools that work with the .po
standard.
It seems straight forward to go with the .po files for a pure java
swing application and C/C++ pieces of our product.
But our WebGUI is built with GWT.

Has anyone tried using these in a GWT project ?
Any ideas/suggestions ?

-A

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: internationalization of Serializable classes

2011-06-13 Thread Jeff Larsen
The way we've done this is by passing keys from the server to the client. 
This allows us to not only have the same values on the client/server but to 
have different languages between client/server meaning we could potentially 
have a database setup in a French Locale, have the server spit out German 
error logs and the client display the english version of the message. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/kGlV7vt3OsUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



internationalization of Serializable classes

2011-06-13 Thread Thad
Any recommendations on how to handle the internationalization of
Serializable classes? I've got a class that extends Exception. I'd
like localize the strings so I'm writing the same to the server log
I'm displaying in my GWT client. I don't want to keep two separate
properties--one to read on the server, another to read in the client.

Currently I'm using com.google.gwt.i18n.client.Dictionary in my
client. In onModuleLoad() I call:

HashMap map = new HashMap();
Dictionary dict = Dictionary.getDictionary("MyGwtException");
Set keys = dict.keySet();
for (String key : keys)
map.put(key, dict.get(key));
MyGwtException.setDictionary(map);

Shortly after this, I pass the map to the server:

AsyncCallback callback = new AsyncCallback() {
public void onSuccess(Void result) {
// Finish app start up...
}
public void onFailure(Throwable caught) {
Window.alert((new MyGwtException(caught)).getMessage());
}
};
MyServicesAsync service = (LiloServicesAsync)
GWT.create(MyServices.class);
service.setExceptionDictionary(map, callback);

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder Internationalization - Search/Find Non-Internationalized Strings?

2011-06-03 Thread David Chandler
GWT Designer can help with this. The Externalize Strings tool will find all
strings in a Widget hierarchy and move them in to properties files via the
GWT Constants interface.

Doc:
http://code.google.com/webtoolkit/tools/gwtdesigner/features/internationalization.html
Demo:
http://www.google.com/events/io/2011/sessions/gwt-ui-designer-enterprise-web-uis-made-easy.html,
starting at 36:20

/dmc

On Fri, May 27, 2011 at 2:36 PM, spierce7  wrote:

> Is there a fast way to find non-internationalized strings/attributes
> in GWT? I have way to many ui binder files to search through by hand.
> Has someone found a creative way to automatically find them?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder Internationalization - Search/Find Non-Internationalized Strings?

2011-06-03 Thread Erik Uzureau
If I understand your question correctly, what you're looking for is a tool
to let you know if there are strings in your codebase that you haven't yet
removed and put into .properties files.

If that's the case, I don't think mergelocales.py will help you much.

What we did with our app is two things:

1) Running old fashioned regexs on *.ui.xml files and on the .java files. I
don't have the strings handy but roughly:
-- UI-Binder Files: strings between tags, title attributes, value
attributes... and any other custom attributes you might use with widgets.
-- Java Files: anything between two " marks :-)

2) Make a "translation" in one of the languages (in our case we chose
German) and just put empty strings or "XXX" for all the translations. When
you run the app in locale=de, any strings that pop out, you'll know you need
to go back and internationalize.

Mergelocales.py is a great library, btw. We use it on our project with great
success. It's just that it solves a different problem (If I've understood
your question correctly, of course!)

--Erik





On Mon, May 30, 2011 at 22:32, spierce7  wrote:

> Thank you very much. I'll look into it.
>
> On May 30, 4:05 am, Jānis Ābele  wrote:
> > Look athttp://code.google.com/p/gwt-platform/wiki/MergeLocale, it does
> what
> > you want.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Fail to compile module with internationalization instructions

2011-06-01 Thread bouba331
Hi,

I'm trying to insert internationalized strings into my application but
it seems to fail a compile time.

What I've done is the following :
 - Add a org.bgaillard.client.constant.LoginPanelConstants which
extends the ConstantsWithLookup interface
 - Add a org/bgaillard/client/constant/
LoginPanelConstants_fr.properties file
 - Add




 

In my GWT XML module file.

 - Generate (using the Maven GWT Plugin) a
org.bgaillard.client.constant.LoginPanelConstants_fr.class interface
which extends the ConstantsWithLookup interface
 - Add

   

  in my root application HTML file.
 - Configure each file to use the UTF-8 encoding

But, a compile time I always have this error :

[ERROR] Errors in '. . . /src/main/java/org/bgaillard/client/widgets/
panel/LoginPanel.java'
[ERROR] Line 45:  Rebind result
'org.bgaillard.client.constant.LoginPanelConstants_fr' must be a class
[ERROR] Cannot proceed due to previous errors

Line 45 corresponds to that piece of code:

  this.loginPanelConstants =
GWT.create(LoginPanelConstants.class);

I'm using GWT 2.3 and the Maven GWT Plugin 2.2.0 to generate GWT
interfaces (for internationalization and async services) and to
compile.


What is the error ? Why do I have this "Rebind" error at compile
time ?

Thanks,

Bouba331

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder Internationalization - Search/Find Non-Internationalized Strings?

2011-05-30 Thread spierce7
Thank you very much. I'll look into it.

On May 30, 4:05 am, Jānis Ābele  wrote:
> Look athttp://code.google.com/p/gwt-platform/wiki/MergeLocale, it does what
> you want.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder Internationalization - Search/Find Non-Internationalized Strings?

2011-05-30 Thread Jānis Ābele
Look at http://code.google.com/p/gwt-platform/wiki/MergeLocale, it does what 
you want.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



UiBinder Internationalization - Search/Find Non-Internationalized Strings?

2011-05-27 Thread spierce7
Is there a fast way to find non-internationalized strings/attributes
in GWT? I have way to many ui binder files to search through by hand.
Has someone found a creative way to automatically find them?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



static string internationalization without @DefaultStringValue annotations?

2011-01-06 Thread Magnus
Hi,

I have the following files for static string internationalization of
constants:

Constants.java
Constants_en.properties
Constants_de.properties

I would like to omit the @DefaultStringValue in Constants.java. The
defaults should be the EN-strings.

How can I do this?

If I omit the annotations, I get an exception (see below).

Thanks,
Magnus

-


21:55:54.123 [ERROR] [bcs] No resource found for key 'moves'
com.google.gwt.i18n.rebind.AbstractResource$MissingResourceException:
No resource found for key 'moves'
at com.google.gwt.i18n.rebind.AbstractResource
$ResourceList.getRequiredStringExt(AbstractResource.java:290)
at
com.google.gwt.i18n.rebind.SimpleValueMethodCreator.createMethodFor(SimpleValueMethodCreator.java:
95)
at
com.google.gwt.i18n.rebind.AbstractLocalizableImplCreator.delegateToCreator(AbstractLocalizableImplCreator.java:
313)
at
com.google.gwt.i18n.rebind.ConstantsImplCreator.emitMethodBody(ConstantsImplCreator.java:
163)
at
com.google.gwt.user.rebind.AbstractGeneratorClassCreator.genMethod(AbstractGeneratorClassCreator.java:
273)
at
com.google.gwt.user.rebind.AbstractGeneratorClassCreator.emitMethods(AbstractGeneratorClassCreator.java:
234)
at
com.google.gwt.user.rebind.AbstractGeneratorClassCreator.emitClass(AbstractGeneratorClassCreator.java:
117)
at
com.google.gwt.i18n.rebind.AbstractLocalizableImplCreator.generateConstantOrMessageClass(AbstractLocalizableImplCreator.java:
133)
at
com.google.gwt.i18n.rebind.LocalizableGenerator.generate(LocalizableGenerator.java:
114)
at
com.google.gwt.i18n.rebind.LocalizableGenerator.generate(LocalizableGenerator.java:
97)
at
com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:
427)
at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
39)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.tryRebind(StandardRebindOracle.java:115)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.rebind(StandardRebindOracle.java:58)
at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
161)
at
com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:
124)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:
585)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
455)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at bcs.client.itn.itn.(itn.java:19)
at bcs.client.apl.Menu.createMenu(Menu.java:72)
at bcs.client.apl.Menu.init(Menu.java:62)
at bcs.client.apl.Menu.(Menu.java:55)
at bcs.client.apl.Display.init(Display.java:92)
at bcs.client.apl.Display.(Display.java:66)
at bcs.client.Application.onModuleLoad(Application.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
396)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
183)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
510)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
352)
at java.lang.Thread.run(Thread.java:636)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



UiBinder Internationalization

2010-12-03 Thread Srividhya Ramachandran
I am having trouble with UiBinder Internationalization. I create a
LocalizableResource.properties file with messages and use keys for the
messages in the **.ui.xml files. Basically followed the steps in showcase
sample project and find that the messages are not being picked up from the
properties file, but still come from the ui.xml files.
Anybody experienced this problem before?
I read somewhere that in previous versions of GWT (i am using 2.1) the
messages for default locale always came from the ui.xml file even though you
provide a  .properties file. Is this still an issue? Thanks for taking the
time to read and reply.
V

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: internationalization

2010-05-18 Thread Thomas Broyer


On 17 mai, 12:14, Joschua  wrote:
> Hello guys, there are three (open) questions about the
> internationalization of GWT, I have:
>
> 1) Is it a (huge) performance issue, to use only "Messages" for
> constant and parameterized text, where usually would use both
> "Messages" and "Constants"?

No. Constants in "Messages" are finally compiled to the exact same
code as if they were in a "Constants". The real difference is that
Messages is limited to Strings.

> 2) Is there a way to specify the original text in the source code,
> whose translations can then be specified somewhere? (e.g.
> Translate("Hello") in the source code and than in a properties file
> for e.g. spanish: Hello = ¡Hola!)

Only using the @DefaultXxxValue or @DefaultMessage annotations

> 3) Do you know any translation-tools, which generate the properties
> and interfaces for you?

You'd generally create the interfaces "on the go", adding methods
while you need a new constant. Then, compiling your app with the -gen
argument will create the corresponding *.properties file that you can
now translate,using any tool you like (I don't use any but I know
there exists some) or give to translators (we're generating an Excel
file that we give to our customer, one column per language, and
generate the *.properties back when translated)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



internationalization

2010-05-18 Thread Joschua
Hello guys, there are three (open) questions about the
internationalization of GWT, I have:

1) Is it a (huge) performance issue, to use only "Messages" for
constant and parameterized text, where usually would use both
"Messages" and "Constants"?

2) Is there a way to specify the original text in the source code,
whose translations can then be specified somewhere? (e.g.
Translate("Hello") in the source code and than in a properties file
for e.g. spanish: Hello = ¡Hola!)

3) Do you know any translation-tools, which generate the properties
and interfaces for you?

Thanks in Advance!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



internationalization questions

2010-05-18 Thread Joschua
(I just send this a second time, because I have the feeling, that
Google Groups don't send my first message)

Hello guys, there are three (open) questions about the
internationalization of GWT, I have:

1) Is it a (huge) performance issue, to use only "Messages" for
constant and parameterized text, where usually would use both
"Messages" and "Constants"?

2) Is there a way to specify the original text in the source code,
whose translations can then be specified somewhere? (e.g.
Translate("Hello") in the source code and than in a properties file
for e.g. spanish: Hello = ¡Hola!)

3) Do you know any translation-tools, which generate the properties
and interfaces for you?

Thanks in Advance!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Internationalization for com.google.gwt.maps.client.MapWidget

2010-04-26 Thread Eric Ayers
According to the Maps API  FAQ:
http://code.google.com/apis/maps/faq.html#whatcountries

the text should be internationalized for the languages specified in the sheet.

If you create your own UI using GWT, you'll have to use GWT's
internationalization mechanisms, documented in the Developer's guide.

Did that help?
-Eric.

On Mon, Apr 26, 2010 at 4:42 AM, xia  wrote:
> Hi
>
> I am not sure if this has been asked. Basically I want to be able to
> control the language used to display the names on the map, and all
> controls that use a text.
>
> Is this possible?
>
> thanks, Xia Weizhong
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>



-- 
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Internationalization for com.google.gwt.maps.client.MapWidget

2010-04-26 Thread xia
Hi

I am not sure if this has been asked. Basically I want to be able to
control the language used to display the names on the map, and all
controls that use a text.

Is this possible?

thanks, Xia Weizhong

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder internationalization using regular Constants?

2010-04-23 Thread Toni
Nice feature, thanks

On Apr 21, 8:25 pm, Thomas Broyer  wrote:
> On 21 avr, 18:19, Toni  wrote:
>
>
>
>
>
> > Hi there,
>
> > I've been trying to use one single file to internationalize my whole
> > application with no luck.
> > I've been reading this
>
> >http://code.google.com/p/google-web-toolkit/issues/detail?id=4355
>
> > and seems that the current system is a bit controversial at the time.
> > The issue is that some of the internationalized strings of my app are
> > to be used both inside UiBinder templates and programmatically set to
> > widgets at the same time so I want to avoid having them repeated twice
> > in different properties files.
> > I understand this is not possible right now, but is it in the road
> > path of GWT? Is there any way to skip the generation of these
> > properties files and use already existing ones in UiBinder templates?
>
> Should be in the next 
> release:http://code.google.com/p/google-web-toolkit/source/detail?r=7640
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder internationalization using regular Constants?

2010-04-21 Thread Thomas Broyer


On 21 avr, 18:19, Toni  wrote:
> Hi there,
>
> I've been trying to use one single file to internationalize my whole
> application with no luck.
> I've been reading this
>
> http://code.google.com/p/google-web-toolkit/issues/detail?id=4355
>
> and seems that the current system is a bit controversial at the time.
> The issue is that some of the internationalized strings of my app are
> to be used both inside UiBinder templates and programmatically set to
> widgets at the same time so I want to avoid having them repeated twice
> in different properties files.
> I understand this is not possible right now, but is it in the road
> path of GWT? Is there any way to skip the generation of these
> properties files and use already existing ones in UiBinder templates?

Should be in the next release: 
http://code.google.com/p/google-web-toolkit/source/detail?r=7640

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



UiBinder internationalization using regular Constants?

2010-04-21 Thread Toni
Hi there,

I've been trying to use one single file to internationalize my whole
application with no luck.
I've been reading this

http://code.google.com/p/google-web-toolkit/issues/detail?id=4355

and seems that the current system is a bit controversial at the time.
The issue is that some of the internationalized strings of my app are
to be used both inside UiBinder templates and programmatically set to
widgets at the same time so I want to avoid having them repeated twice
in different properties files.
I understand this is not possible right now, but is it in the road
path of GWT? Is there any way to skip the generation of these
properties files and use already existing ones in UiBinder templates?
Does anyone know an elegant workaround?

Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Internationalization via GWT

2010-03-29 Thread zizou84
Hi
I would like to use gwt intrernationalization
i have succeded to use Static String Internationalization method and i
have added in my HTML page

Now , i would like to change the language from my login page;I have
added  in my login form a combobox to select the language of the
application
i tryed to change the DOM generated to select another language:


Element lang = DOM.getElementById("langue");
lang.setAttribute("content", "locale=en");

but the languge doesn't chang
How could i modify the language from my combobox

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Unable to migrate GWT application to version 2.03 due to problem with internationalization

2010-03-23 Thread craige
Sorry, it looks you are indeed right. Many thanks for your help. This
project was my first foray into internationalization and GWT let me do
something I should not have done which was to create my own locale by
the looks of things.

Regards

Craige




On Mar 23, 10:15 am, craige  wrote:
> Thanks for the suggestion. I tried it but even with a valid locale as
> the suffix of the file, it still gave the same error when attempting
> to compile. Perhaps I'm missing an essential piece of information that
> I cannot find!
>
> The name of the file is InternationalizationConstants_es-
> GTC.properties and perhaps it was a happy accident that it worked
> before.
>
> Regards
>
> Craige
>
> On Mar 19, 3:03 pm, Danny Goovaerts  wrote:
>
> > es_GTC is normally not a valid locale. The "country" part of a locale
> > is the two character ISO country code. GTC is not a valid country
> > code.
> > A reason might be that GWT 1.5 was not strict about the country code
> > format, and that 2.0 is much stricter.
>
> > Danny
> > On 19 mrt, 14:28,craige wrote:
>
> > > I am trying to migrate a GWT 1.5 application (which definitely works
> > > without problem) to 2.03 and I am having problems with the compilation
> > > of the application. My application uses various locales which are
> > > defined in the Main.gwt.xml file
>
> > >         
> > >         
> > >         
>
> > > The problem comes when the compiler attempts to compile the locale
> > > es_GTC and the file InternationalizationConstants_es_GTC.properties
>
> > > The error from the compiler was as follows :
>
> > >         Validating newly compiled units
> > >             [ERROR] Errors in 'generated://
> > > 6156E89F6D1ADDBDACCA415E145F7A5A/com/google/gwt/i18n/client/impl/
> > > LocaleInfoImpl_es-gtc.java'
> > >                [ERROR] Line 10: The type LocaleInfoImpl_es is already
> > > defined
> > >                [ERROR] Line 10: Syntax error on token "-", < expected
> > >                [ERROR] Line 10: Syntax error, insert ">" to complete
> > > ReferenceType1
>
> > > This previously worked with GWT 1.5. If I remove the locale
>
> > > 
>
> > > from the Main.gwt.xml file, the application compiles and runs without
> > > problem. It seems that the GWT compiler has a problem with the -
> > > character in the name of the autogenerated java method which is
>
> > > public class LocaleInfoImpl_es-gtc extends LocaleInfoImpl_shared {
>
> > > Anybody got any suggestions? I've looked in the documentation for GWT
> > > 2.x and there is nothing to indicate that this has changed.
>
> > > Thanks
>
> > >Craige
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Unable to migrate GWT application to version 2.03 due to problem with internationalization

2010-03-23 Thread craige
Thanks for the suggestion. I tried it but even with a valid locale as
the suffix of the file, it still gave the same error when attempting
to compile. Perhaps I'm missing an essential piece of information that
I cannot find!

The name of the file is InternationalizationConstants_es-
GTC.properties and perhaps it was a happy accident that it worked
before.

Regards

Craige

On Mar 19, 3:03 pm, Danny Goovaerts  wrote:
> es_GTC is normally not a valid locale. The "country" part of a locale
> is the two character ISO country code. GTC is not a valid country
> code.
> A reason might be that GWT 1.5 was not strict about the country code
> format, and that 2.0 is much stricter.
>
> Danny
> On 19 mrt, 14:28,craige wrote:
>
> > I am trying to migrate a GWT 1.5 application (which definitely works
> > without problem) to 2.03 and I am having problems with the compilation
> > of the application. My application uses various locales which are
> > defined in the Main.gwt.xml file
>
> >         
> >         
> >         
>
> > The problem comes when the compiler attempts to compile the locale
> > es_GTC and the file InternationalizationConstants_es_GTC.properties
>
> > The error from the compiler was as follows :
>
> >         Validating newly compiled units
> >             [ERROR] Errors in 'generated://
> > 6156E89F6D1ADDBDACCA415E145F7A5A/com/google/gwt/i18n/client/impl/
> > LocaleInfoImpl_es-gtc.java'
> >                [ERROR] Line 10: The type LocaleInfoImpl_es is already
> > defined
> >                [ERROR] Line 10: Syntax error on token "-", < expected
> >                [ERROR] Line 10: Syntax error, insert ">" to complete
> > ReferenceType1
>
> > This previously worked with GWT 1.5. If I remove the locale
>
> > 
>
> > from the Main.gwt.xml file, the application compiles and runs without
> > problem. It seems that the GWT compiler has a problem with the -
> > character in the name of the autogenerated java method which is
>
> > public class LocaleInfoImpl_es-gtc extends LocaleInfoImpl_shared {
>
> > Anybody got any suggestions? I've looked in the documentation for GWT
> > 2.x and there is nothing to indicate that this has changed.
>
> > Thanks
>
> >Craige
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Bundle and Image Internationalization

2010-03-19 Thread Francisco Bischoff
I tested with a TextResource...

just a foobar.txt file with some content inside.

Btw, for now I'm using constants to localize images, but without using
Bundles... just renaming the URL

--
Francisco Bischoff
http://www.cirurgiaplastica.pro.br

"O mate está para o gaúcho como o chá para os ingleses, a coca para os
bolivianos, o uísque para os escoceses e o café... para os brasileiros"
-- Eduardo Bueno


On Wed, Mar 17, 2010 at 2:27 PM, Christian Goudreau <
goudreau.christ...@gmail.com> wrote:

> I see, I'm in the same boat, everything else works fine !
>
> What's in your ClientBundle file ? Does it work if we add every permutation
> ? (That is something that I didn't tried yet)
>
> Christian
>
> On Wed, Mar 17, 2010 at 10:16 AM, Francisco Bischoff <
> franzbisch...@gmail.com> wrote:
>
>> Hi!
>>
>> I also found a bug issue in GWT project:
>>
>> http://code.google.com/p/google-web-toolkit/issues/detail?id=4418&can=1&q=image%20i18n
>>
>>
>> but
>> they closed as "cannot reproduce" ¬¬
>>
>> Maybe we should create another bug report informing that this bug is real
>> and only happens in compiled version and not in Dev Mod...
>>
>> I'm using GWT 2.0.3 and the problem persists...
>>
>> I tried everything in the .gwt.xml file, with default language, without
>> default language, tried to put and remove modules, etc... nothing works...
>>
>> By the other side TextResources and Constants (.properties files) work
>> normally... only ImageResource has this problem...
>>
>> Interesting is that in the compiled folder, one of permutations creates an
>> imagebundle with all images together but only with the default .png files
>> not the localized ones.
>>
>> --
>> Francisco Bischoff
>> http://www.cirurgiaplastica.pro.br
>>
>> "O mate está para o gaúcho como o chá para os ingleses, a coca para os
>> bolivianos, o uísque para os escoceses e o café... para os brasileiros"
>> -- Eduardo Bueno
>>
>>
>> On Wed, Mar 17, 2010 at 12:25 PM, Christian Goudreau <
>> goudreau.christ...@gmail.com> wrote:
>>
>>> No, not yet. For now I'm trying to publish my project on google app and
>>> see if that issue is still there. I'll try also to set a default locale.
>>> Exemple : I have  three image file in fact : default.png, default_en_CA.png
>>> and default_fr_CA.png. I shouldn't have three file, but two ! My default
>>> language will point to default.png.
>>>
>>> As for my client bundle. I only map default.png. Maybe it's the
>>> problem... I actually have NO default language... but it didn't really
>>> explain our problem, it's only a path that I want to explore and see what's
>>> happening.
>>>
>>> Something that is working in dev mode should work in production and this
>>> is a serious issue. When I'll be done with my default language changing and
>>> if it's still don't work, I'll open an issue for that.
>>>
>>> Btw, do you have a default language in cour .xml file ?
>>>
>>> Regards
>>>
>>> Christian
>>>
>>>
>>> On Tue, Mar 16, 2010 at 10:59 PM, Francisco Bischoff <
>>> franzbisch...@gmail.com> wrote:
>>>
 Hello!

 I just made a project that has the same issue as yours: works in dev
 mode but not after compiled...

 I use apache2 server...

 Localized strings with .properties files work but localized images
 with imagename_fr.png doesnt... (works only in dev).

 Have you got to solve this issue?

 Thanks

 On 11 fev, 12:24, Christian Goudreau 
 wrote:
 > Still no answers ? I really need that issue to be fixed as my app is
 going
 > live soon. At least, can anyone test ClientBundle ImageResources with
 > locales on a php server and give me some feedback ?
 >
 > Thanks.
 >
 > Christian
 >
 > On Wed, Feb 10, 2010 at 1:20 PM, Christian Goudreau <
 >
 >
 >
 > goudreau.christ...@gmail.com> wrote:
 > > Seems to work in my other project that have tomcat as server... but
 not on
 > > the one that have a php server. Any idea how to fix this ?
 >
 > > Christian
 >
 > > On Tue, Feb 9, 2010 at 9:00 PM, Christian Goudreau <
 > > goudreau.christ...@gmail.com> wrote:
 >
 > >> It seem that only the default value is used.
 >
 > >> I have three files : image.png, image_en_CA.png and
 image_fr_CA.png.
 >
 > >> Everything is working fin in dev mode, but when it come to publish,
 only
 > >> image.png is taken into account.
 >
 > >> Maybe it's because I have PHP server side ?
 >
 > >> Can anyone help me ?
 >
 > >> Christian
 >
 > >> On Tue, Feb 9, 2010 at 8:02 PM, Christian Goudreau <
 > >> goudreau.christ...@gmail.com> wrote:
 >
 > >>> It doesn't work after build ! My images are a mess and I can't
 even
 > >>> change de locale, what am I missing ?
 >
 > >>> Christian
 >
 > >>> On Mon, Feb 8, 2010 at 4:24 PM, Christian Go

Re: Unable to migrate GWT application to version 2.03 due to problem with internationalization

2010-03-19 Thread Danny Goovaerts
es_GTC is normally not a valid locale. The "country" part of a locale
is the two character ISO country code. GTC is not a valid country
code.
A reason might be that GWT 1.5 was not strict about the country code
format, and that 2.0 is much stricter.

Danny
On 19 mrt, 14:28, craige  wrote:
> I am trying to migrate a GWT 1.5 application (which definitely works
> without problem) to 2.03 and I am having problems with the compilation
> of the application. My application uses various locales which are
> defined in the Main.gwt.xml file
>
>         
>         
>         
>
> The problem comes when the compiler attempts to compile the locale
> es_GTC and the file InternationalizationConstants_es_GTC.properties
>
> The error from the compiler was as follows :
>
>         Validating newly compiled units
>             [ERROR] Errors in 'generated://
> 6156E89F6D1ADDBDACCA415E145F7A5A/com/google/gwt/i18n/client/impl/
> LocaleInfoImpl_es-gtc.java'
>                [ERROR] Line 10: The type LocaleInfoImpl_es is already
> defined
>                [ERROR] Line 10: Syntax error on token "-", < expected
>                [ERROR] Line 10: Syntax error, insert ">" to complete
> ReferenceType1
>
> This previously worked with GWT 1.5. If I remove the locale
>
> 
>
> from the Main.gwt.xml file, the application compiles and runs without
> problem. It seems that the GWT compiler has a problem with the -
> character in the name of the autogenerated java method which is
>
> public class LocaleInfoImpl_es-gtc extends LocaleInfoImpl_shared {
>
> Anybody got any suggestions? I've looked in the documentation for GWT
> 2.x and there is nothing to indicate that this has changed.
>
> Thanks
>
> Craige

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Unable to migrate GWT application to version 2.03 due to problem with internationalization

2010-03-19 Thread craige
I am trying to migrate a GWT 1.5 application (which definitely works
without problem) to 2.03 and I am having problems with the compilation
of the application. My application uses various locales which are
defined in the Main.gwt.xml file





The problem comes when the compiler attempts to compile the locale
es_GTC and the file InternationalizationConstants_es_GTC.properties

The error from the compiler was as follows :

Validating newly compiled units
[ERROR] Errors in 'generated://
6156E89F6D1ADDBDACCA415E145F7A5A/com/google/gwt/i18n/client/impl/
LocaleInfoImpl_es-gtc.java'
   [ERROR] Line 10: The type LocaleInfoImpl_es is already
defined
   [ERROR] Line 10: Syntax error on token "-", < expected
   [ERROR] Line 10: Syntax error, insert ">" to complete
ReferenceType1

This previously worked with GWT 1.5. If I remove the locale



from the Main.gwt.xml file, the application compiles and runs without
problem. It seems that the GWT compiler has a problem with the -
character in the name of the autogenerated java method which is

public class LocaleInfoImpl_es-gtc extends LocaleInfoImpl_shared {

Anybody got any suggestions? I've looked in the documentation for GWT
2.x and there is nothing to indicate that this has changed.

Thanks

Craige

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Bundle and Image Internationalization

2010-03-17 Thread Christian Goudreau
I see, I'm in the same boat, everything else works fine !

What's in your ClientBundle file ? Does it work if we add every permutation
? (That is something that I didn't tried yet)

Christian

On Wed, Mar 17, 2010 at 10:16 AM, Francisco Bischoff <
franzbisch...@gmail.com> wrote:

> Hi!
>
> I also found a bug issue in GWT project:
>
> http://code.google.com/p/google-web-toolkit/issues/detail?id=4418&can=1&q=image%20i18n
>
>
> but
> they closed as "cannot reproduce" ¬¬
>
> Maybe we should create another bug report informing that this bug is real
> and only happens in compiled version and not in Dev Mod...
>
> I'm using GWT 2.0.3 and the problem persists...
>
> I tried everything in the .gwt.xml file, with default language, without
> default language, tried to put and remove modules, etc... nothing works...
>
> By the other side TextResources and Constants (.properties files) work
> normally... only ImageResource has this problem...
>
> Interesting is that in the compiled folder, one of permutations creates an
> imagebundle with all images together but only with the default .png files
> not the localized ones.
>
> --
> Francisco Bischoff
> http://www.cirurgiaplastica.pro.br
>
> "O mate está para o gaúcho como o chá para os ingleses, a coca para os
> bolivianos, o uísque para os escoceses e o café... para os brasileiros"
> -- Eduardo Bueno
>
>
> On Wed, Mar 17, 2010 at 12:25 PM, Christian Goudreau <
> goudreau.christ...@gmail.com> wrote:
>
>> No, not yet. For now I'm trying to publish my project on google app and
>> see if that issue is still there. I'll try also to set a default locale.
>> Exemple : I have  three image file in fact : default.png, default_en_CA.png
>> and default_fr_CA.png. I shouldn't have three file, but two ! My default
>> language will point to default.png.
>>
>> As for my client bundle. I only map default.png. Maybe it's the problem...
>> I actually have NO default language... but it didn't really explain our
>> problem, it's only a path that I want to explore and see what's happening.
>>
>> Something that is working in dev mode should work in production and this
>> is a serious issue. When I'll be done with my default language changing and
>> if it's still don't work, I'll open an issue for that.
>>
>> Btw, do you have a default language in cour .xml file ?
>>
>> Regards
>>
>> Christian
>>
>>
>> On Tue, Mar 16, 2010 at 10:59 PM, Francisco Bischoff <
>> franzbisch...@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> I just made a project that has the same issue as yours: works in dev
>>> mode but not after compiled...
>>>
>>> I use apache2 server...
>>>
>>> Localized strings with .properties files work but localized images
>>> with imagename_fr.png doesnt... (works only in dev).
>>>
>>> Have you got to solve this issue?
>>>
>>> Thanks
>>>
>>> On 11 fev, 12:24, Christian Goudreau 
>>> wrote:
>>> > Still no answers ? I really need that issue to be fixed as my app is
>>> going
>>> > live soon. At least, can anyone test ClientBundle ImageResources with
>>> > locales on a php server and give me some feedback ?
>>> >
>>> > Thanks.
>>> >
>>> > Christian
>>> >
>>> > On Wed, Feb 10, 2010 at 1:20 PM, Christian Goudreau <
>>> >
>>> >
>>> >
>>> > goudreau.christ...@gmail.com> wrote:
>>> > > Seems to work in my other project that have tomcat as server... but
>>> not on
>>> > > the one that have a php server. Any idea how to fix this ?
>>> >
>>> > > Christian
>>> >
>>> > > On Tue, Feb 9, 2010 at 9:00 PM, Christian Goudreau <
>>> > > goudreau.christ...@gmail.com> wrote:
>>> >
>>> > >> It seem that only the default value is used.
>>> >
>>> > >> I have three files : image.png, image_en_CA.png and image_fr_CA.png.
>>> >
>>> > >> Everything is working fin in dev mode, but when it come to publish,
>>> only
>>> > >> image.png is taken into account.
>>> >
>>> > >> Maybe it's because I have PHP server side ?
>>> >
>>> > >> Can anyone help me ?
>>> >
>>> > >> Christian
>>> >
>>> > >> On Tue, Feb 9, 2010 at 8:02 PM, Christian Goudreau <
>>> > >> goudreau.christ...@gmail.com> wrote:
>>> >
>>> > >>> It doesn't work after build ! My images are a mess and I can't even
>>> > >>> change de locale, what am I missing ?
>>> >
>>> > >>> Christian
>>> >
>>> > >>> On Mon, Feb 8, 2010 at 4:24 PM, Christian Goudreau <
>>> > >>> goudreau.christ...@gmail.com> wrote:
>>> >
>>> >  Ok... it's working in dev mode, I don't know why it didnt when
>>> going
>>> >  live, I'll do some more test and come back later
>>> >
>>> >  On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau <
>>> >  goudreau.christ...@gmail.com> wrote:
>>> >
>>> > > There's an example of what I have :
>>> >
>>> > > Inside the client bundle :
>>> >
>>> > > ImageResource example();
>>> >
>>> > > and in my directory I have : exemple.png
>>> > > exemple_fr_CA.png
>>> > > exemple_en_CA.png
>>> >
>>> > > and when I set the local to fr_CA, I have exemple

Re: Client Bundle and Image Internationalization

2010-03-17 Thread Francisco Bischoff
Hi!

I also found a bug issue in GWT project:
http://code.google.com/p/google-web-toolkit/issues/detail?id=4418&can=1&q=image%20i18n

but
they closed as "cannot reproduce" ¬¬

Maybe we should create another bug report informing that this bug is real
and only happens in compiled version and not in Dev Mod...

I'm using GWT 2.0.3 and the problem persists...

I tried everything in the .gwt.xml file, with default language, without
default language, tried to put and remove modules, etc... nothing works...

By the other side TextResources and Constants (.properties files) work
normally... only ImageResource has this problem...

Interesting is that in the compiled folder, one of permutations creates an
imagebundle with all images together but only with the default .png files
not the localized ones.

--
Francisco Bischoff
http://www.cirurgiaplastica.pro.br

"O mate está para o gaúcho como o chá para os ingleses, a coca para os
bolivianos, o uísque para os escoceses e o café... para os brasileiros"
-- Eduardo Bueno


On Wed, Mar 17, 2010 at 12:25 PM, Christian Goudreau <
goudreau.christ...@gmail.com> wrote:

> No, not yet. For now I'm trying to publish my project on google app and see
> if that issue is still there. I'll try also to set a default locale. Exemple
> : I have  three image file in fact : default.png, default_en_CA.png and
> default_fr_CA.png. I shouldn't have three file, but two ! My default
> language will point to default.png.
>
> As for my client bundle. I only map default.png. Maybe it's the problem...
> I actually have NO default language... but it didn't really explain our
> problem, it's only a path that I want to explore and see what's happening.
>
> Something that is working in dev mode should work in production and this is
> a serious issue. When I'll be done with my default language changing and if
> it's still don't work, I'll open an issue for that.
>
> Btw, do you have a default language in cour .xml file ?
>
> Regards
>
> Christian
>
>
> On Tue, Mar 16, 2010 at 10:59 PM, Francisco Bischoff <
> franzbisch...@gmail.com> wrote:
>
>> Hello!
>>
>> I just made a project that has the same issue as yours: works in dev
>> mode but not after compiled...
>>
>> I use apache2 server...
>>
>> Localized strings with .properties files work but localized images
>> with imagename_fr.png doesnt... (works only in dev).
>>
>> Have you got to solve this issue?
>>
>> Thanks
>>
>> On 11 fev, 12:24, Christian Goudreau 
>> wrote:
>> > Still no answers ? I really need that issue to be fixed as my app is
>> going
>> > live soon. At least, can anyone test ClientBundle ImageResources with
>> > locales on a php server and give me some feedback ?
>> >
>> > Thanks.
>> >
>> > Christian
>> >
>> > On Wed, Feb 10, 2010 at 1:20 PM, Christian Goudreau <
>> >
>> >
>> >
>> > goudreau.christ...@gmail.com> wrote:
>> > > Seems to work in my other project that have tomcat as server... but
>> not on
>> > > the one that have a php server. Any idea how to fix this ?
>> >
>> > > Christian
>> >
>> > > On Tue, Feb 9, 2010 at 9:00 PM, Christian Goudreau <
>> > > goudreau.christ...@gmail.com> wrote:
>> >
>> > >> It seem that only the default value is used.
>> >
>> > >> I have three files : image.png, image_en_CA.png and image_fr_CA.png.
>> >
>> > >> Everything is working fin in dev mode, but when it come to publish,
>> only
>> > >> image.png is taken into account.
>> >
>> > >> Maybe it's because I have PHP server side ?
>> >
>> > >> Can anyone help me ?
>> >
>> > >> Christian
>> >
>> > >> On Tue, Feb 9, 2010 at 8:02 PM, Christian Goudreau <
>> > >> goudreau.christ...@gmail.com> wrote:
>> >
>> > >>> It doesn't work after build ! My images are a mess and I can't even
>> > >>> change de locale, what am I missing ?
>> >
>> > >>> Christian
>> >
>> > >>> On Mon, Feb 8, 2010 at 4:24 PM, Christian Goudreau <
>> > >>> goudreau.christ...@gmail.com> wrote:
>> >
>> >  Ok... it's working in dev mode, I don't know why it didnt when
>> going
>> >  live, I'll do some more test and come back later
>> >
>> >  On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau <
>> >  goudreau.christ...@gmail.com> wrote:
>> >
>> > > There's an example of what I have :
>> >
>> > > Inside the client bundle :
>> >
>> > > ImageResource example();
>> >
>> > > and in my directory I have : exemple.png
>> > > exemple_fr_CA.png
>> > > exemple_en_CA.png
>> >
>> > > and when I set the local to fr_CA, I have exemple.png instead...
>> >
>> > > On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau <
>> > > goudreau.christ...@gmail.com> wrote:
>> >
>> > >> I know how to implements localizable images with Image bundle,
>> but how
>> > >> does it works with Client Bundle ? I found nothing about that in
>> the
>> > >> documentation and I was wondering what was the best way to
>> acheive this with
>> > >> Gwt 2.0.
>> >
>> > >> Thx
>> >
>

Re: Client Bundle and Image Internationalization

2010-03-17 Thread Christian Goudreau
No, not yet. For now I'm trying to publish my project on google app and see
if that issue is still there. I'll try also to set a default locale. Exemple
: I have  three image file in fact : default.png, default_en_CA.png and
default_fr_CA.png. I shouldn't have three file, but two ! My default
language will point to default.png.

As for my client bundle. I only map default.png. Maybe it's the problem... I
actually have NO default language... but it didn't really explain our
problem, it's only a path that I want to explore and see what's happening.

Something that is working in dev mode should work in production and this is
a serious issue. When I'll be done with my default language changing and if
it's still don't work, I'll open an issue for that.

Btw, do you have a default language in cour .xml file ?

Regards

Christian

On Tue, Mar 16, 2010 at 10:59 PM, Francisco Bischoff <
franzbisch...@gmail.com> wrote:

> Hello!
>
> I just made a project that has the same issue as yours: works in dev
> mode but not after compiled...
>
> I use apache2 server...
>
> Localized strings with .properties files work but localized images
> with imagename_fr.png doesnt... (works only in dev).
>
> Have you got to solve this issue?
>
> Thanks
>
> On 11 fev, 12:24, Christian Goudreau 
> wrote:
> > Still no answers ? I really need that issue to be fixed as my app is
> going
> > live soon. At least, can anyone test ClientBundle ImageResources with
> > locales on a php server and give me some feedback ?
> >
> > Thanks.
> >
> > Christian
> >
> > On Wed, Feb 10, 2010 at 1:20 PM, Christian Goudreau <
> >
> >
> >
> > goudreau.christ...@gmail.com> wrote:
> > > Seems to work in my other project that have tomcat as server... but not
> on
> > > the one that have a php server. Any idea how to fix this ?
> >
> > > Christian
> >
> > > On Tue, Feb 9, 2010 at 9:00 PM, Christian Goudreau <
> > > goudreau.christ...@gmail.com> wrote:
> >
> > >> It seem that only the default value is used.
> >
> > >> I have three files : image.png, image_en_CA.png and image_fr_CA.png.
> >
> > >> Everything is working fin in dev mode, but when it come to publish,
> only
> > >> image.png is taken into account.
> >
> > >> Maybe it's because I have PHP server side ?
> >
> > >> Can anyone help me ?
> >
> > >> Christian
> >
> > >> On Tue, Feb 9, 2010 at 8:02 PM, Christian Goudreau <
> > >> goudreau.christ...@gmail.com> wrote:
> >
> > >>> It doesn't work after build ! My images are a mess and I can't even
> > >>> change de locale, what am I missing ?
> >
> > >>> Christian
> >
> > >>> On Mon, Feb 8, 2010 at 4:24 PM, Christian Goudreau <
> > >>> goudreau.christ...@gmail.com> wrote:
> >
> >  Ok... it's working in dev mode, I don't know why it didnt when going
> >  live, I'll do some more test and come back later
> >
> >  On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau <
> >  goudreau.christ...@gmail.com> wrote:
> >
> > > There's an example of what I have :
> >
> > > Inside the client bundle :
> >
> > > ImageResource example();
> >
> > > and in my directory I have : exemple.png
> > > exemple_fr_CA.png
> > > exemple_en_CA.png
> >
> > > and when I set the local to fr_CA, I have exemple.png instead...
> >
> > > On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau <
> > > goudreau.christ...@gmail.com> wrote:
> >
> > >> I know how to implements localizable images with Image bundle, but
> how
> > >> does it works with Client Bundle ? I found nothing about that in
> the
> > >> documentation and I was wondering what was the best way to acheive
> this with
> > >> Gwt 2.0.
> >
> > >> Thx
> >
> > >> Christian
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Bundle and Image Internationalization

2010-03-16 Thread Francisco Bischoff
Hello!

I just made a project that has the same issue as yours: works in dev
mode but not after compiled...

I use apache2 server...

Localized strings with .properties files work but localized images
with imagename_fr.png doesnt... (works only in dev).

Have you got to solve this issue?

Thanks

On 11 fev, 12:24, Christian Goudreau 
wrote:
> Still no answers ? I really need that issue to be fixed as my app is going
> live soon. At least, can anyone test ClientBundle ImageResources with
> locales on a php server and give me some feedback ?
>
> Thanks.
>
> Christian
>
> On Wed, Feb 10, 2010 at 1:20 PM, Christian Goudreau <
>
>
>
> goudreau.christ...@gmail.com> wrote:
> > Seems to work in my other project that have tomcat as server... but not on
> > the one that have a php server. Any idea how to fix this ?
>
> > Christian
>
> > On Tue, Feb 9, 2010 at 9:00 PM, Christian Goudreau <
> > goudreau.christ...@gmail.com> wrote:
>
> >> It seem that only the default value is used.
>
> >> I have three files : image.png, image_en_CA.png and image_fr_CA.png.
>
> >> Everything is working fin in dev mode, but when it come to publish, only
> >> image.png is taken into account.
>
> >> Maybe it's because I have PHP server side ?
>
> >> Can anyone help me ?
>
> >> Christian
>
> >> On Tue, Feb 9, 2010 at 8:02 PM, Christian Goudreau <
> >> goudreau.christ...@gmail.com> wrote:
>
> >>> It doesn't work after build ! My images are a mess and I can't even
> >>> change de locale, what am I missing ?
>
> >>> Christian
>
> >>> On Mon, Feb 8, 2010 at 4:24 PM, Christian Goudreau <
> >>> goudreau.christ...@gmail.com> wrote:
>
>  Ok... it's working in dev mode, I don't know why it didnt when going
>  live, I'll do some more test and come back later
>
>  On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau <
>  goudreau.christ...@gmail.com> wrote:
>
> > There's an example of what I have :
>
> > Inside the client bundle :
>
> > ImageResource example();
>
> > and in my directory I have : exemple.png
> > exemple_fr_CA.png
> > exemple_en_CA.png
>
> > and when I set the local to fr_CA, I have exemple.png instead...
>
> > On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau <
> > goudreau.christ...@gmail.com> wrote:
>
> >> I know how to implements localizable images with Image bundle, but how
> >> does it works with Client Bundle ? I found nothing about that in the
> >> documentation and I was wondering what was the best way to acheive 
> >> this with
> >> Gwt 2.0.
>
> >> Thx
>
> >> Christian

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to show special characters like æ using GWT internationalization and UIBinder

2010-03-13 Thread venura kahawala
Hi Sripathi,

thanks for the ideas,

But I added a debug point before setting the string "søgning" to the
UiBinder dynamically. The string comes correctly to the debug point and
after i set the string to the UiBinder it appears wrong.. That is where i
get stuck. I tried both utf-8 and iso-8859-1 character settings in the host
page, but the result was same..

Please advice..

Regards,
Kahawala

On Sat, Mar 13, 2010 at 12:32 PM, Sripathi Krishnan <
sripathikrish...@gmail.com> wrote:

> if i use static special characters in the UiBinder it get rendered
>> correctly. So i think this happens when loading dynamic data.
>>
> By dynamic data I assume you mean a RPC call has the data.
>
> How are you storing the data? If you are using databases, make sure that
> you are using the right encoding (UTF-8 is the most popular) in the
> database. If there is any code that is doing things like String.getBytes()
> or using raw InputStreams, make sure it sets the right character encoding.
>
> With character encoding, you need to be consistent throughout your
> application stack - database through browser. Data usually gets mangled when
> passing between two layers - like DB to app, or app to file system,
> webserver to browser etc. So, the trick to solve is to look at each layer
> interaction one by one.
>
>
> --Sri
> http://blog.530geeks.com
>
>
> On 12 March 2010 23:51, venura kahawala  wrote:
>
>> Hi Thomas
>>
>> Thanks for the reply.
>>
>> But i tried the way that you have mentioned and i couldn't get the
>> expected results. All my files are encoded with utf-8.
>> Any comment is appreciated.
>>
>> Thanks,
>> Kahawala
>>
>>
>> On Fri, Mar 12, 2010 at 8:14 PM, Thomas Broyer wrote:
>>
>>>
>>>
>>> On Mar 12, 2:09 pm, kahawala  wrote:
>>> > Hi,
>>> >
>>> > I have a simple GWT application that uses both Messages and Constant
>>> > interfaces to do the internationalization. I want to show danish
>>> > special characters like "æ" in my danish version.
>>>
>>> To make it simple, *all* of your files should be encoded in
>>> UTF-8: .java, .properties, .xml and .html
>>> And in your .html page, also make sure the browser interprets it as
>>> being UTF-8-encoded (browsers have a page encoding menu that shows you
>>> which encoding they thought the page was in). It generally is as
>>> simple as putting a  in the HTML's head (though
>>> some server configuration could override it by sending an explicit
>>> charset= parameter in the Content-Type HTTP header).
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google Web Toolkit" group.
>>> To post to this group, send email to google-web-toolkit@googlegroups.com
>>> .
>>> To unsubscribe from this group, send email to
>>> google-web-toolkit+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to show special characters like æ using GWT internationalization and UIBinder

2010-03-12 Thread Sripathi Krishnan
>
> if i use static special characters in the UiBinder it get rendered
> correctly. So i think this happens when loading dynamic data.
>
By dynamic data I assume you mean a RPC call has the data.

How are you storing the data? If you are using databases, make sure that you
are using the right encoding (UTF-8 is the most popular) in the database. If
there is any code that is doing things like String.getBytes() or using raw
InputStreams, make sure it sets the right character encoding.

With character encoding, you need to be consistent throughout your
application stack - database through browser. Data usually gets mangled when
passing between two layers - like DB to app, or app to file system,
webserver to browser etc. So, the trick to solve is to look at each layer
interaction one by one.


--Sri
http://blog.530geeks.com


On 12 March 2010 23:51, venura kahawala  wrote:

> Hi Thomas
>
> Thanks for the reply.
>
> But i tried the way that you have mentioned and i couldn't get the expected
> results. All my files are encoded with utf-8.
> Any comment is appreciated.
>
> Thanks,
> Kahawala
>
>
> On Fri, Mar 12, 2010 at 8:14 PM, Thomas Broyer  wrote:
>
>>
>>
>> On Mar 12, 2:09 pm, kahawala  wrote:
>> > Hi,
>> >
>> > I have a simple GWT application that uses both Messages and Constant
>> > interfaces to do the internationalization. I want to show danish
>> > special characters like "æ" in my danish version.
>>
>> To make it simple, *all* of your files should be encoded in
>> UTF-8: .java, .properties, .xml and .html
>> And in your .html page, also make sure the browser interprets it as
>> being UTF-8-encoded (browsers have a page encoding menu that shows you
>> which encoding they thought the page was in). It generally is as
>> simple as putting a  in the HTML's head (though
>> some server configuration could override it by sending an explicit
>> charset= parameter in the Content-Type HTTP header).
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to show special characters like æ using GWT internationalization and UIBinder

2010-03-12 Thread venura kahawala
Hi Thomas

Thanks for the reply.

But i tried the way that you have mentioned and i couldn't get the expected
results. All my files are encoded with utf-8.
Any comment is appreciated.

Thanks,
Kahawala

On Fri, Mar 12, 2010 at 8:14 PM, Thomas Broyer  wrote:

>
>
> On Mar 12, 2:09 pm, kahawala  wrote:
> > Hi,
> >
> > I have a simple GWT application that uses both Messages and Constant
> > interfaces to do the internationalization. I want to show danish
> > special characters like "æ" in my danish version.
>
> To make it simple, *all* of your files should be encoded in
> UTF-8: .java, .properties, .xml and .html
> And in your .html page, also make sure the browser interprets it as
> being UTF-8-encoded (browsers have a page encoding menu that shows you
> which encoding they thought the page was in). It generally is as
> simple as putting a  in the HTML's head (though
> some server configuration could override it by sending an explicit
> charset= parameter in the Content-Type HTTP header).
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to show special characters like æ using GWT internationalization and UIBinder

2010-03-12 Thread Thomas Broyer


On Mar 12, 2:09 pm, kahawala  wrote:
> Hi,
>
> I have a simple GWT application that uses both Messages and Constant
> interfaces to do the internationalization. I want to show danish
> special characters like "æ" in my danish version.

To make it simple, *all* of your files should be encoded in
UTF-8: .java, .properties, .xml and .html
And in your .html page, also make sure the browser interprets it as
being UTF-8-encoded (browsers have a page encoding menu that shows you
which encoding they thought the page was in). It generally is as
simple as putting a  in the HTML's head (though
some server configuration could override it by sending an explicit
charset= parameter in the Content-Type HTTP header).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: server side internationalization

2010-03-10 Thread mmoossen
that looks really great.
thanks for sharing

Michael

On Mar 10, 7:32 am, Sebastien  wrote:
> Hi
> I extracted the code to a dedicated 
> project:http://code.google.com/p/gwt-i18n-server/
>
> Now It supports Constants, ConstantsWithLookup, Messages (plural
> included).
>
> Regards,
> Seb
>
> On 8 fév, 13:42, Lucas de Oliveira  wrote:
>
> > Hi all,
> > sorry to bring back the post but I'm having problems while trying to use
> > KtrI18N.
> > The thing is that I have an Enum class that shouldn't know if the code is
> > running on the client or server side. A little code:
>
> > public enum Status{
> >  OPEN {
> >         @Override
> >         public String getI18N() {
> >             return labels.statusOpen();
> >         }
> >  },
> >  CLOSED {
>
> >         @Override
> >         public String getI18N() {
> >             return labels.statusClosed();
> >         }
>
> > }
>
> >  Labels labels = KtrI18N.createConstants(Labels.class);
> >  public abstract String i18n();
>
> > }
>
> > So this code should run both in client and server. The problem is: it
> > doesn't work at the client side. I checked the KtrI18N website and there is
> > an eclipse plugin to create the supersource trick for you, but I couldn't
> > make it work. Any ideas?
>
> > thanks in advance,
> > cheers!
>
> > --
> > Lucas de Oliveira Arantes

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: server side internationalization

2010-03-09 Thread Sebastien
Hi
I extracted the code to a dedicated project:
http://code.google.com/p/gwt-i18n-server/

Now It supports Constants, ConstantsWithLookup, Messages (plural
included).

Regards,
Seb

On 8 fév, 13:42, Lucas de Oliveira  wrote:
> Hi all,
> sorry to bring back the post but I'm having problems while trying to use
> KtrI18N.
> The thing is that I have an Enum class that shouldn't know if the code is
> running on the client or server side. A little code:
>
> public enum Status{
>  OPEN {
>         @Override
>         public String getI18N() {
>             return labels.statusOpen();
>         }
>  },
>  CLOSED {
>
>         @Override
>         public String getI18N() {
>             return labels.statusClosed();
>         }
>
> }
>
>  Labels labels = KtrI18N.createConstants(Labels.class);
>  public abstract String i18n();
>
> }
>
> So this code should run both in client and server. The problem is: it
> doesn't work at the client side. I checked the KtrI18N website and there is
> an eclipse plugin to create the supersource trick for you, but I couldn't
> make it work. Any ideas?
>
> thanks in advance,
> cheers!
>
> --
> Lucas de Oliveira Arantes

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: internationalization messages with bold parameters

2010-02-15 Thread Thomas Broyer


On Feb 15, 10:53 am, mariyan nenchev 
wrote:
> Hi i am using gwt internationalization for user messages. Some of them are
> parameterized ig.e. : My test messsage number {0}
> I want to bold the parameterized part. How can i do this?

@Message("My test message number {0}")

...and then use it with setHTML() instead of setText()

Or of course you could just modify the parameter before passing it to
the Messages method.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



internationalization messages with bold parameters

2010-02-15 Thread mariyan nenchev
Hi i am using gwt internationalization for user messages. Some of them are
parameterized ig.e. : My test messsage number {0}
I want to bold the parameterized part. How can i do this?
Regards.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Bundle and Image Internationalization

2010-02-11 Thread Christian Goudreau
Still no answers ? I really need that issue to be fixed as my app is going
live soon. At least, can anyone test ClientBundle ImageResources with
locales on a php server and give me some feedback ?

Thanks.

Christian

On Wed, Feb 10, 2010 at 1:20 PM, Christian Goudreau <
goudreau.christ...@gmail.com> wrote:

> Seems to work in my other project that have tomcat as server... but not on
> the one that have a php server. Any idea how to fix this ?
>
> Christian
>
>
> On Tue, Feb 9, 2010 at 9:00 PM, Christian Goudreau <
> goudreau.christ...@gmail.com> wrote:
>
>> It seem that only the default value is used.
>>
>> I have three files : image.png, image_en_CA.png and image_fr_CA.png.
>>
>> Everything is working fin in dev mode, but when it come to publish, only
>> image.png is taken into account.
>>
>> Maybe it's because I have PHP server side ?
>>
>> Can anyone help me ?
>>
>> Christian
>>
>>
>> On Tue, Feb 9, 2010 at 8:02 PM, Christian Goudreau <
>> goudreau.christ...@gmail.com> wrote:
>>
>>> It doesn't work after build ! My images are a mess and I can't even
>>> change de locale, what am I missing ?
>>>
>>> Christian
>>>
>>>
>>> On Mon, Feb 8, 2010 at 4:24 PM, Christian Goudreau <
>>> goudreau.christ...@gmail.com> wrote:
>>>
 Ok... it's working in dev mode, I don't know why it didnt when going
 live, I'll do some more test and come back later

 On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau <
 goudreau.christ...@gmail.com> wrote:

> There's an example of what I have :
>
> Inside the client bundle :
>
> ImageResource example();
>
> and in my directory I have : exemple.png
> exemple_fr_CA.png
> exemple_en_CA.png
>
> and when I set the local to fr_CA, I have exemple.png instead...
>
> On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau <
> goudreau.christ...@gmail.com> wrote:
>
>> I know how to implements localizable images with Image bundle, but how
>> does it works with Client Bundle ? I found nothing about that in the
>> documentation and I was wondering what was the best way to acheive this 
>> with
>> Gwt 2.0.
>>
>> Thx
>>
>> Christian
>>
>
>

>>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Bundle and Image Internationalization

2010-02-10 Thread Christian Goudreau
Seems to work in my other project that have tomcat as server... but not on
the one that have a php server. Any idea how to fix this ?

Christian

On Tue, Feb 9, 2010 at 9:00 PM, Christian Goudreau <
goudreau.christ...@gmail.com> wrote:

> It seem that only the default value is used.
>
> I have three files : image.png, image_en_CA.png and image_fr_CA.png.
>
> Everything is working fin in dev mode, but when it come to publish, only
> image.png is taken into account.
>
> Maybe it's because I have PHP server side ?
>
> Can anyone help me ?
>
> Christian
>
>
> On Tue, Feb 9, 2010 at 8:02 PM, Christian Goudreau <
> goudreau.christ...@gmail.com> wrote:
>
>> It doesn't work after build ! My images are a mess and I can't even change
>> de locale, what am I missing ?
>>
>> Christian
>>
>>
>> On Mon, Feb 8, 2010 at 4:24 PM, Christian Goudreau <
>> goudreau.christ...@gmail.com> wrote:
>>
>>> Ok... it's working in dev mode, I don't know why it didnt when going
>>> live, I'll do some more test and come back later
>>>
>>> On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau <
>>> goudreau.christ...@gmail.com> wrote:
>>>
 There's an example of what I have :

 Inside the client bundle :

 ImageResource example();

 and in my directory I have : exemple.png
 exemple_fr_CA.png
 exemple_en_CA.png

 and when I set the local to fr_CA, I have exemple.png instead...

 On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau <
 goudreau.christ...@gmail.com> wrote:

> I know how to implements localizable images with Image bundle, but how
> does it works with Client Bundle ? I found nothing about that in the
> documentation and I was wondering what was the best way to acheive this 
> with
> Gwt 2.0.
>
> Thx
>
> Christian
>


>>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Bundle and Image Internationalization

2010-02-09 Thread Christian Goudreau
It seem that only the default value is used.

I have three files : image.png, image_en_CA.png and image_fr_CA.png.

Everything is working fin in dev mode, but when it come to publish, only
image.png is taken into account.

Maybe it's because I have PHP server side ?

Can anyone help me ?

Christian

On Tue, Feb 9, 2010 at 8:02 PM, Christian Goudreau <
goudreau.christ...@gmail.com> wrote:

> It doesn't work after build ! My images are a mess and I can't even change
> de locale, what am I missing ?
>
> Christian
>
>
> On Mon, Feb 8, 2010 at 4:24 PM, Christian Goudreau <
> goudreau.christ...@gmail.com> wrote:
>
>> Ok... it's working in dev mode, I don't know why it didnt when going live,
>> I'll do some more test and come back later
>>
>> On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau <
>> goudreau.christ...@gmail.com> wrote:
>>
>>> There's an example of what I have :
>>>
>>> Inside the client bundle :
>>>
>>> ImageResource example();
>>>
>>> and in my directory I have : exemple.png
>>> exemple_fr_CA.png
>>> exemple_en_CA.png
>>>
>>> and when I set the local to fr_CA, I have exemple.png instead...
>>>
>>> On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau <
>>> goudreau.christ...@gmail.com> wrote:
>>>
 I know how to implements localizable images with Image bundle, but how
 does it works with Client Bundle ? I found nothing about that in the
 documentation and I was wondering what was the best way to acheive this 
 with
 Gwt 2.0.

 Thx

 Christian

>>>
>>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Bundle and Image Internationalization

2010-02-09 Thread Christian Goudreau
It doesn't work after build ! My images are a mess and I can't even change
de locale, what am I missing ?

Christian

On Mon, Feb 8, 2010 at 4:24 PM, Christian Goudreau <
goudreau.christ...@gmail.com> wrote:

> Ok... it's working in dev mode, I don't know why it didnt when going live,
> I'll do some more test and come back later
>
> On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau <
> goudreau.christ...@gmail.com> wrote:
>
>> There's an example of what I have :
>>
>> Inside the client bundle :
>>
>> ImageResource example();
>>
>> and in my directory I have : exemple.png
>> exemple_fr_CA.png
>> exemple_en_CA.png
>>
>> and when I set the local to fr_CA, I have exemple.png instead...
>>
>> On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau <
>> goudreau.christ...@gmail.com> wrote:
>>
>>> I know how to implements localizable images with Image bundle, but how
>>> does it works with Client Bundle ? I found nothing about that in the
>>> documentation and I was wondering what was the best way to acheive this with
>>> Gwt 2.0.
>>>
>>> Thx
>>>
>>> Christian
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Bundle and Image Internationalization

2010-02-08 Thread Christian Goudreau
Ok... it's working in dev mode, I don't know why it didnt when going live,
I'll do some more test and come back later

On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau <
goudreau.christ...@gmail.com> wrote:

> There's an example of what I have :
>
> Inside the client bundle :
>
> ImageResource example();
>
> and in my directory I have : exemple.png
> exemple_fr_CA.png
> exemple_en_CA.png
>
> and when I set the local to fr_CA, I have exemple.png instead...
>
> On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau <
> goudreau.christ...@gmail.com> wrote:
>
>> I know how to implements localizable images with Image bundle, but how
>> does it works with Client Bundle ? I found nothing about that in the
>> documentation and I was wondering what was the best way to acheive this with
>> Gwt 2.0.
>>
>> Thx
>>
>> Christian
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Bundle and Image Internationalization

2010-02-08 Thread Christian Goudreau
There's an example of what I have :

Inside the client bundle :

ImageResource example();

and in my directory I have : exemple.png
exemple_fr_CA.png
exemple_en_CA.png

and when I set the local to fr_CA, I have exemple.png instead...

On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau <
goudreau.christ...@gmail.com> wrote:

> I know how to implements localizable images with Image bundle, but how does
> it works with Client Bundle ? I found nothing about that in the
> documentation and I was wondering what was the best way to acheive this with
> Gwt 2.0.
>
> Thx
>
> Christian
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: server side internationalization

2010-02-08 Thread Lucas de Oliveira
Hi all,
sorry to bring back the post but I'm having problems while trying to use
KtrI18N.
The thing is that I have an Enum class that shouldn't know if the code is
running on the client or server side. A little code:

public enum Status{
 OPEN {
@Override
public String getI18N() {
return labels.statusOpen();
}
 },
 CLOSED {

@Override
public String getI18N() {
return labels.statusClosed();
}
}

 Labels labels = KtrI18N.createConstants(Labels.class);
 public abstract String i18n();
}

So this code should run both in client and server. The problem is: it
doesn't work at the client side. I checked the KtrI18N website and there is
an eclipse plugin to create the supersource trick for you, but I couldn't
make it work. Any ideas?

thanks in advance,
cheers!

-- 
Lucas de Oliveira Arantes

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Client Bundle and Image Internationalization

2010-02-07 Thread Christian Goudreau
I know how to implements localizable images with Image bundle, but how does
it works with Client Bundle ? I found nothing about that in the
documentation and I was wondering what was the best way to acheive this with
Gwt 2.0.

Thx

Christian

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Internationalization Mapping

2009-10-30 Thread SkiD

Hello,

i want to internationalize my program in that shape:

I have a properties file suffix _de, _fr etc. with all translated
words like that for german:
dog = Hund
cat = Katze
My Caption = Meine Überschrift

I want to call the method for translation in my program like that:
translate.getString("dog")
translate.getString("cat") etc.

I've found some tutorial's like "static string internatlionalization"
or "dynamic string internatlionalization" with the dictonary-class in
the web, but i dont want an interface with methodnames like the
strings...
Only one or two methods return the translated string for each word,
from the property-file.

I only want to map the getstring-method to my property-files, relative
to the query-string.
Example query-string: "http://www.blibla.de/fuu/.../foo/index.html?
locale=de".

Can anyone help me ?

Thanks and sry for my broken english :-/
SkiD.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Internationalization

2009-10-30 Thread SkiD

Hello,

i've a java-gwt-project.
I want to translate all english-strings/constants in german words, but
i want to use that function call:
caption.getString("MyTranslateString"):String.
That method returns a String translated in german, if the locale is
set up to de in the URI.

How can i do that ?

The only thing i found is "Static String Internationalization", but
that's the wrong way.
I don't want some methods for each string ...

I've a property file called captions_de.properties with all german
words as a shape like that:
yes = Ja
no = Nein
etc.

If i call caption.getString("Yes") i want to get back "Ja".
If i call caption.getString("No") i want to get back "Nein" etc.

Can u help me please ?

Greetings and Thanks,
SkiD.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: server side internationalization

2009-10-17 Thread Jaroslav Záruba
t; with
> > > >> > javassist.
> > > >> > [Kotori I18N Project]
> > > >> >http://code.google.com/p/kotori/wiki/KotoriI18N?wl=en
> > > >> > I think a part of the project is useful to you.
>
> > > >> > If you try using the library,
> > > >> > (1) download "Kotori I18N"(ktr-i18n-0.1.0-alpha-v200909202315.zip).
> > > >> > In this time, you don't have to download "Kotori I18N Plugin(Eclipse
> > > >> > plugin)", which is a trick for the seamless use on both the client
> > and
> > > >> > the server.
> > > >> > (2) Put ktr-i18n.jar and javassist.jar in your classpath.
> > > >> > (3) Use KtrI18NCreator.create() in your server side code like
> > > >> > GWT.create in the client.
>
> > > >> > If you don't use the library,
> > > >> > I think a part of it is useful to you.
>
> >http://code.google.com/p/kotori/source/browse/#svn/trunk/ktr-i18n/src...
>
> > > >> > --
> > > >> > bufferings
>
> > > >> > On 10月5日, 午後9:35, Jerome Cance  wrote:
> > > >> > > Thank you for this response, I was thinking of a solution like
> > this but
> > > >> > what
> > > >> > > I don't like in this solution is the use of a constant for server
> > side
> > > >> > > ressource bundle.
>
> > > >> > > If I can, I want to use a function to refer to an
> > internationalized
> > > >> > string.
>
> > > >> > > In summary:
>
> > > >> > > I want to do on my server side:
> > > >> > > myConstants.myMessage();
> > > >> > > (like I do on client side)
>
> > > >> > > instead of:
> > > >> > > myConstants.getString("myMessage");
> > > >> > > (avoid the ressource bundle mechanism to have unicity on client
> > and
> > > >> > server
> > > >> > > internationalization)
>
> > > >> > > But if I can't I will use your solution.
>
> > > >> > > ---
> > > >> > > Jérôme CANCE
>
> > > >> > > On Mon, Oct 5, 2009 at 2:18 PM, Lothar Kimmeringer <
> > j...@kimmeringer.de
> > > >> > >wrote:
>
> > > >> > > > Jerome C. schrieb:
>
> > > >> > > > > I need to use internationalization files on server side (send
> > email,
> > > >> > > > > and email content is internationalized).
> > > >> > > > > When I use GWT.create on my server side, it does not run
> > (exception).
>
> > > >> > > > [...]
>
> > > >> > > > > If I can, I don't want to use two different mechanisms for
> > client and
> > > >> > > > > server internationalization.
>
> > > >> > > > I solved it by adding the locale-string to the parameters of the
> > > >> > > > servlet-method to be called:
>
> > > >> > > > public String getSomething(String param1, long param2, String
> > locale)
> > > >> > > > throws RemoteServiceException {
> > > >> > > >  ResourceBundle rb = getResourceBundle(locale);
> > > >> > > >  try{
> > > >> > > >    doSomething()
> > > >> > > >  }
> > > >> > > >  catch(Exception e){
> > > >> > > >    throw new
>
> > RemoteServiceException(rb.getString("ServiceGeneral_Error_SomethingHappened­­"));
> > > >> > > >  }
> > > >> > > > }
>
> > > >> > > > public static ResourceBundle getResourceBundle(String locale) {
> > > >> > > >  Locale loc = getLocale(locale);
> > > >> > > >  ResourceBundle rb =
>
> > Utf8ResourceBundle.getBundle(AdminToolsI18NConstants.class.getName(),
> > > >> > loc,
> > > >> > > > AdminToolsI18NConstants.class.getClassLoader());
> > > >> > > >  return rb;
> > > >> > > > }
>
> > > >> > > > public static Locale getLocale(String locale){
> > > >> > > >  if (locale == null){
> > > >> > > >    return null;
> > > >> > > >  }
> > > >> > > >  StringTokenizer tt = new StringTokenizer (locale, "_");
> > > >> > > >  Locale loc = new Locale(tt.nextToken(), tt.hasMoreTokens() ?
> > > >> > > > tt.nextToken() : "", tt.hasMoreTokens() ? tt.nextToken() : "");
> > > >> > > >  return loc;
> > > >> > > > }
>
> > > >> > > > The Utf8ResourceBundle is inspired by
> > > >> > > >http://www.thoughtsabout.net/blog/archives/44.html
> > > >> > > > That way you can use the ResourceBundle-files you created for
> > the
> > > >> > > > GWT-client. In each bundle I added one property, e.g.
>
> > > >> > > > Locale = DE
>
> > > >> > > > So a call in the GWT-client looks like this:
>
> > > >> > > > public static final MyI18NConstants CONSTANTS =
> > (MyI18NConstants)
> > > >> > > > GWT.create(MyI18NConstants.class);
>
> > > >> > > > [...]
>
> > > >> > > >  GeneralServices.Util.getInstance().getSomething(param1, param2,
> > > >> > > > CONSTANTS.Locale(), new AsyncCallback(){
> > > >> > > >    [...]
> > > >> > > >    public void onFailure(Throwable caught) {
> > > >> > > >      Window.alert(caught.getMessage());
> > > >> > > >    }
> > > >> > > >  };
>
> > > >> > > > If you have defined Messages instead of Constants you can do the
> > > >> > filling
> > > >> > > > of the parameters by a simple text-replacement, e.g. by
> > replaceAll:
>
> > > >> > > > rb.getString(...).replaceAll("\{0\}", e.getMessage());
>
> > > >> > > > Regards, Lothar- 引用テキストを表示しない -
>
> > > >> > > - 引用テキストを表示 -- 引用テキストを表示しない -
>
> > > >> - 引用テキストを表示 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



GWT internationalization [ERROR] No resource found for key 'cycleID'

2009-10-13 Thread Heidarzadeh

Hi

I use GWT 7.1
I have created two .properties files for localization.
but that does not work.
of course i can run the program and it works correctly in hosted mode
but when I want to make a war file I get this error :

Compiling module com.douran.portal.Portal
   Scanning for additional dependencies: file:/D:/Portal/src/com/
douran/portal/client/module/totalCycle/TotalCycleViewfrm.java
  Computing all possible rebind results for
'com.douran.portal.client.module.totalCycle.TotalCycleI18N'
 Rebinding
com.douran.portal.client.module.totalCycle.TotalCycleI18N
Invoking 
   Processing interface
com.douran.portal.client.module.totalCycle.TotalCycleI18N
  Generating method body for cycleID()
 [ERROR] No resource found for key 'cycleID'
com.google.gwt.i18n.rebind.AbstractResource$MissingResourceException:
No resource found for key 'cycleID'
at com.google.gwt.i18n.rebind.AbstractResource
$ResourceList.getRequiredStringExt(AbstractResource.java:206)
at
com.google.gwt.i18n.rebind.SimpleValueMethodCreator.createMethodFor
(SimpleValueMethodCreator.java:93)
at
com.google.gwt.i18n.rebind.AbstractLocalizableImplCreator.delegateToCreator
(AbstractLocalizableImplCreator.java:307)
at
com.google.gwt.i18n.rebind.ConstantsImplCreator.emitMethodBody
(ConstantsImplCreator.java:160)
at
com.google.gwt.user.rebind.AbstractGeneratorClassCreator.genMethod
(AbstractGeneratorClassCreator.java:263)
at
com.google.gwt.user.rebind.AbstractGeneratorClassCreator.emitMethods
(AbstractGeneratorClassCreator.java:231)
at
com.google.gwt.user.rebind.AbstractGeneratorClassCreator.emitClass
(AbstractGeneratorClassCreator.java:114)
at
com.google.gwt.i18n.rebind.AbstractLocalizableImplCreator.generateConstantOrMessageClass
(AbstractLocalizableImplCreator.java:134)
at com.google.gwt.i18n.rebind.LocalizableGenerator.generate
(LocalizableGenerator.java:118)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize
(RuleGenerateWith.java:49)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.tryRebind(StandardRebindOracle.java:113)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.rebind(StandardRebindOracle.java:62)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind
(StandardRebindOracle.java:172)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind
(StandardRebindOracle.java:161)
at com.google.gwt.dev.Precompile
$DistillerRebindPermutationOracle.getAllPossibleRebindAnswers
(Precompile.java:204)
at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds
(WebModeCompilerFrontEnd.java:128)
at com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.process
(AbstractCompiler.java:151)
at org.eclipse.jdt.internal.compiler.Compiler.compile
(Compiler.java:444)
at com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.compile
(AbstractCompiler.java:85)
at com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.compile
(AbstractCompiler.java:181)
at com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.access
$400(AbstractCompiler.java:71)
at com.google.gwt.dev.jdt.AbstractCompiler.compile
(AbstractCompiler.java:473)
at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations
(WebModeCompilerFrontEnd.java:73)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile
(JavaToJavaScriptCompiler.java:259)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:
300)
at com.google.gwt.dev.Compiler.run(Compiler.java:170)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:124)
at com.google.gwt.dev.CompileTaskRunner.doRun
(CompileTaskRunner.java:88)
at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:131)
 [WARN] Searched the following resources:
   [ERROR] Errors in 'file:/D:/Portal/src/com/douran/portal/client/
module/totalCycle/TotalCycleViewfrm.java'
  [ERROR] Line 50:  Failed to resolve
'com.douran.portal.client.module.totalCycle.TotalCycleI18N' via
deferred binding
   [ERROR] Cannot proceed due to previous errors

Here is my source code :

->TotalCycleI18N_en.properties
cycleID=Cycle ID

->TotalCycleI18N_fa.properties
cycleID=Cycle ID 123

->TotalCycleI18N
public interface TotalCycleI18N extends Constants {
String cycleID();
}






--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~-

Re: server side internationalization

2009-10-06 Thread Jerome Cance
have to download "Kotori I18N Plugin(Eclipse
> > >> > plugin)", which is a trick for the seamless use on both the client
> and
> > >> > the server.
> > >> > (2) Put ktr-i18n.jar and javassist.jar in your classpath.
> > >> > (3) Use KtrI18NCreator.create() in your server side code like
> > >> > GWT.create in the client.
> >
> > >> > If you don't use the library,
> > >> > I think a part of it is useful to you.
> >
> > >> >
> http://code.google.com/p/kotori/source/browse/#svn/trunk/ktr-i18n/src...
> >
> > >> > --
> > >> > bufferings
> >
> > >> > On 10月5日, 午後9:35, Jerome Cance  wrote:
> > >> > > Thank you for this response, I was thinking of a solution like
> this but
> > >> > what
> > >> > > I don't like in this solution is the use of a constant for server
> side
> > >> > > ressource bundle.
> >
> > >> > > If I can, I want to use a function to refer to an
> internationalized
> > >> > string.
> >
> > >> > > In summary:
> >
> > >> > > I want to do on my server side:
> > >> > > myConstants.myMessage();
> > >> > > (like I do on client side)
> >
> > >> > > instead of:
> > >> > > myConstants.getString("myMessage");
> > >> > > (avoid the ressource bundle mechanism to have unicity on client
> and
> > >> > server
> > >> > > internationalization)
> >
> > >> > > But if I can't I will use your solution.
> >
> > >> > > ---
> > >> > > Jérôme CANCE
> >
> > >> > > On Mon, Oct 5, 2009 at 2:18 PM, Lothar Kimmeringer <
> j...@kimmeringer.de
> > >> > >wrote:
> >
> > >> > > > Jerome C. schrieb:
> >
> > >> > > > > I need to use internationalization files on server side (send
> email,
> > >> > > > > and email content is internationalized).
> > >> > > > > When I use GWT.create on my server side, it does not run
> (exception).
> >
> > >> > > > [...]
> >
> > >> > > > > If I can, I don't want to use two different mechanisms for
> client and
> > >> > > > > server internationalization.
> >
> > >> > > > I solved it by adding the locale-string to the parameters of the
> > >> > > > servlet-method to be called:
> >
> > >> > > > public String getSomething(String param1, long param2, String
> locale)
> > >> > > > throws RemoteServiceException {
> > >> > > >  ResourceBundle rb = getResourceBundle(locale);
> > >> > > >  try{
> > >> > > >doSomething()
> > >> > > >  }
> > >> > > >  catch(Exception e){
> > >> > > >throw new
> >
> > >> >
> RemoteServiceException(rb.getString("ServiceGeneral_Error_SomethingHappened­­"));
> > >> > > >  }
> > >> > > > }
> >
> > >> > > > public static ResourceBundle getResourceBundle(String locale) {
> > >> > > >  Locale loc = getLocale(locale);
> > >> > > >  ResourceBundle rb =
> > >> > > >
> Utf8ResourceBundle.getBundle(AdminToolsI18NConstants.class.getName(),
> > >> > loc,
> > >> > > > AdminToolsI18NConstants.class.getClassLoader());
> > >> > > >  return rb;
> > >> > > > }
> >
> > >> > > > public static Locale getLocale(String locale){
> > >> > > >  if (locale == null){
> > >> > > >return null;
> > >> > > >  }
> > >> > > >  StringTokenizer tt = new StringTokenizer (locale, "_");
> > >> > > >  Locale loc = new Locale(tt.nextToken(), tt.hasMoreTokens() ?
> > >> > > > tt.nextToken() : "", tt.hasMoreTokens() ? tt.nextToken() : "");
> > >> > > >  return loc;
> > >> > > > }
> >
> > >> > > > The Utf8ResourceBundle is inspired by
> > >> > > >http://www.thoughtsabout.net/blog/archives/44.html
> > >> > > > That way you can use the ResourceBundle-files you created for
> the
> > >> > > > GWT-client. In each bundle I added one property, e.g.
> >
> > >> > > > Locale = DE
> >
> > >> > > > So a call in the GWT-client looks like this:
> >
> > >> > > > public static final MyI18NConstants CONSTANTS =
> (MyI18NConstants)
> > >> > > > GWT.create(MyI18NConstants.class);
> >
> > >> > > > [...]
> >
> > >> > > >  GeneralServices.Util.getInstance().getSomething(param1, param2,
> > >> > > > CONSTANTS.Locale(), new AsyncCallback(){
> > >> > > >[...]
> > >> > > >public void onFailure(Throwable caught) {
> > >> > > >  Window.alert(caught.getMessage());
> > >> > > >}
> > >> > > >  };
> >
> > >> > > > If you have defined Messages instead of Constants you can do the
> > >> > filling
> > >> > > > of the parameters by a simple text-replacement, e.g. by
> replaceAll:
> >
> > >> > > > rb.getString(...).replaceAll("\{0\}", e.getMessage());
> >
> > >> > > > Regards, Lothar- 引用テキストを表示しない -
> >
> > >> > > - 引用テキストを表示 -- 引用テキストを表示しない -
> >
> > >> - 引用テキストを表示 -
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: server side internationalization

2009-10-05 Thread Sebastien

Hu,

One year ago I write a simple support of I18N on server side. The
mechanism was based on Java reflexion. All is in a single class:
http://code.google.com/p/gwt-fusionchart/source/browse/trunk/fusionchart_server/src/com/raisepartner/chartfusion/web/server/gwti18n/GWTI18N.java
The simple call to GWTI18N.create(XXXMessages.class) provides the
expected instance implemented your interface and load properties.

Maybe this could help you.

Regards,
Seb

On 6 oct, 02:18, bufferings  wrote:
> hi
>
> I'm very sorry.
> I made a mistake in my writing.
>
> >  (2) Use KtrI18NCreator.create() in your server side code
>
> Please use
> KtrI18N.createConstants() or KtrI18N.createMessages().
> These are static methods.
>
> --
> bufferings
>
> 2009/10/6 bufferings :
>
>
>
> >> that's exactly what I need and it runs perfectly !
>
> >> Thanks a lot !
>
> > Glad to hear that.
>
> >> Bufferings, when I look at your site, the procedure to make it work seems 
> >> to
> >> be more complex. Why ?
>
> > From my site's [How Does It Work?]==
> > Kotori I18N uses the super-source trick. It gives the super-source
> > code to the client, and gives the real code to the server. In fact, It
> > uses the GWT#create(Class) for the client as usual, and it uses the
> > javassist for the server to create an implimentation of the interface
> > given on the runtime.
>
> > For the first time I thought it was going to be simple, but it didn't
> > become so because of the limitation of GWT#create(Class) that it must
> > be called with a class literal. To cope with the limitation, I created
> > Kotori I18N Plugin that automatically create the super-source in your
> > project and replace the KtrI18N#createXXX to GWT#create(Class).
>
> > Is it confusing? Yes, I think so. But I don't know the other way to
> > get over the limitation. I hope GWT to remove the limitation. If the
> > limitation would be removed, I will throw the plugin away with
> > pleasure.
> > ==
>
> >> I don't add the super-source tag and it runs like a charm.
>
> > If you want to use KtrI18N.create only on the server side not on the
> > client, you don't have to use super-source and you don't have to edit
> > your gwt.xml module file.
>
> > All you have to do is
> >  (1) Put ktr-i18n.jar and javassist.jar in your classpath
> >  (2) Use KtrI18NCreator.create() in your server side code
>
> > --
> > bufferings
>
> > On 10月5日, 午後11:45, Jerome Cance  wrote:
> >> Wooah,
>
> >> that's exactly what I need and it runs perfectly !
>
> >> Thanks a lot !
>
> >> I think this kind of feature should be available directly in the GWT
> >> project.
>
> >> Bufferings, when I look at your site, the procedure to make it work seems 
> >> to
> >> be more complex. Why ?
> >> I don't add the super-source tag and it runs like a charm.
>
> >> ---
> >> Jérôme CANCE
>
> >> On Mon, Oct 5, 2009 at 4:20 PM, bufferings  wrote:
>
> >> > Hi Jerome
>
> >> > > I want to do on my server side:
> >> > > myConstants.myMessage();
>
> >> > I also thought about the same thing with you, and I created that with
> >> > javassist.
> >> > [Kotori I18N Project]
> >> >http://code.google.com/p/kotori/wiki/KotoriI18N?wl=en
> >> > I think a part of the project is useful to you.
>
> >> > If you try using the library,
> >> > (1) download "Kotori I18N"(ktr-i18n-0.1.0-alpha-v200909202315.zip).
> >> > In this time, you don't have to download "Kotori I18N Plugin(Eclipse
> >> > plugin)", which is a trick for the seamless use on both the client and
> >> > the server.
> >> > (2) Put ktr-i18n.jar and javassist.jar in your classpath.
> >> > (3) Use KtrI18NCreator.create() in your server side code like
> >> > GWT.create in the client.
>
> >> > If you don't use the library,
> >> > I think a part of it is useful to you.
>
> >> >http://code.google.com/p/kotori/source/browse/#svn/trunk/ktr-i18n/src...
>
> >> > --
> >> > bufferings
>
> >> > On 10月5日, 午後9:35, Jerome Cance  wrote:
> >> > > Thank you for this response, I was thinking of a solution like this but
> >> > what
> >> > > I don't like in this solution is the use of a constant for server side
> >> > > ressource bundle.

Re: server side internationalization

2009-10-05 Thread bufferings

hi

I'm very sorry.
I made a mistake in my writing.

>  (2) Use KtrI18NCreator.create() in your server side code

Please use
KtrI18N.createConstants() or KtrI18N.createMessages().
These are static methods.

--
bufferings

2009/10/6 bufferings :
>
>> that's exactly what I need and it runs perfectly !
>>
>> Thanks a lot !
>
> Glad to hear that.
>
>> Bufferings, when I look at your site, the procedure to make it work seems to
>> be more complex. Why ?
>
> From my site's [How Does It Work?]==
> Kotori I18N uses the super-source trick. It gives the super-source
> code to the client, and gives the real code to the server. In fact, It
> uses the GWT#create(Class) for the client as usual, and it uses the
> javassist for the server to create an implimentation of the interface
> given on the runtime.
>
> For the first time I thought it was going to be simple, but it didn't
> become so because of the limitation of GWT#create(Class) that it must
> be called with a class literal. To cope with the limitation, I created
> Kotori I18N Plugin that automatically create the super-source in your
> project and replace the KtrI18N#createXXX to GWT#create(Class).
>
> Is it confusing? Yes, I think so. But I don't know the other way to
> get over the limitation. I hope GWT to remove the limitation. If the
> limitation would be removed, I will throw the plugin away with
> pleasure.
> ==
>
>> I don't add the super-source tag and it runs like a charm.
>
> If you want to use KtrI18N.create only on the server side not on the
> client, you don't have to use super-source and you don't have to edit
> your gwt.xml module file.
>
> All you have to do is
>  (1) Put ktr-i18n.jar and javassist.jar in your classpath
>  (2) Use KtrI18NCreator.create() in your server side code
>
> --
> bufferings
>
>
> On 10月5日, 午後11:45, Jerome Cance  wrote:
>> Wooah,
>>
>> that's exactly what I need and it runs perfectly !
>>
>> Thanks a lot !
>>
>> I think this kind of feature should be available directly in the GWT
>> project.
>>
>> Bufferings, when I look at your site, the procedure to make it work seems to
>> be more complex. Why ?
>> I don't add the super-source tag and it runs like a charm.
>>
>> ---
>> Jérôme CANCE
>>
>>
>>
>> On Mon, Oct 5, 2009 at 4:20 PM, bufferings  wrote:
>>
>> > Hi Jerome
>>
>> > > I want to do on my server side:
>> > > myConstants.myMessage();
>>
>> > I also thought about the same thing with you, and I created that with
>> > javassist.
>> > [Kotori I18N Project]
>> >http://code.google.com/p/kotori/wiki/KotoriI18N?wl=en
>> > I think a part of the project is useful to you.
>>
>> > If you try using the library,
>> > (1) download "Kotori I18N"(ktr-i18n-0.1.0-alpha-v200909202315.zip).
>> > In this time, you don't have to download "Kotori I18N Plugin(Eclipse
>> > plugin)", which is a trick for the seamless use on both the client and
>> > the server.
>> > (2) Put ktr-i18n.jar and javassist.jar in your classpath.
>> > (3) Use KtrI18NCreator.create() in your server side code like
>> > GWT.create in the client.
>>
>> > If you don't use the library,
>> > I think a part of it is useful to you.
>>
>> >http://code.google.com/p/kotori/source/browse/#svn/trunk/ktr-i18n/src...
>>
>> > --
>> > bufferings
>>
>> > On 10月5日, 午後9:35, Jerome Cance  wrote:
>> > > Thank you for this response, I was thinking of a solution like this but
>> > what
>> > > I don't like in this solution is the use of a constant for server side
>> > > ressource bundle.
>>
>> > > If I can, I want to use a function to refer to an internationalized
>> > string.
>>
>> > > In summary:
>>
>> > > I want to do on my server side:
>> > > myConstants.myMessage();
>> > > (like I do on client side)
>>
>> > > instead of:
>> > > myConstants.getString("myMessage");
>> > > (avoid the ressource bundle mechanism to have unicity on client and
>> > server
>> > > internationalization)
>>
>> > > But if I can't I will use your solution.
>>
>> > > ---
>> > > Jérôme CANCE
>>
>> > > On Mon, Oct 5, 2009 at 2:18 PM, Lothar Kimmeringer > > >wrote:
>>
>> > > > Jerom

Re: server side internationalization

2009-10-05 Thread bufferings

> that's exactly what I need and it runs perfectly !
>
> Thanks a lot !

Glad to hear that.

> Bufferings, when I look at your site, the procedure to make it work seems to
> be more complex. Why ?

>From my site's [How Does It Work?]==
Kotori I18N uses the super-source trick. It gives the super-source
code to the client, and gives the real code to the server. In fact, It
uses the GWT#create(Class) for the client as usual, and it uses the
javassist for the server to create an implimentation of the interface
given on the runtime.

For the first time I thought it was going to be simple, but it didn't
become so because of the limitation of GWT#create(Class) that it must
be called with a class literal. To cope with the limitation, I created
Kotori I18N Plugin that automatically create the super-source in your
project and replace the KtrI18N#createXXX to GWT#create(Class).

Is it confusing? Yes, I think so. But I don't know the other way to
get over the limitation. I hope GWT to remove the limitation. If the
limitation would be removed, I will throw the plugin away with
pleasure.
==

> I don't add the super-source tag and it runs like a charm.

If you want to use KtrI18N.create only on the server side not on the
client, you don't have to use super-source and you don't have to edit
your gwt.xml module file.

All you have to do is
 (1) Put ktr-i18n.jar and javassist.jar in your classpath
 (2) Use KtrI18NCreator.create() in your server side code

--
bufferings


On 10月5日, 午後11:45, Jerome Cance  wrote:
> Wooah,
>
> that's exactly what I need and it runs perfectly !
>
> Thanks a lot !
>
> I think this kind of feature should be available directly in the GWT
> project.
>
> Bufferings, when I look at your site, the procedure to make it work seems to
> be more complex. Why ?
> I don't add the super-source tag and it runs like a charm.
>
> ---
> Jérôme CANCE
>
>
>
> On Mon, Oct 5, 2009 at 4:20 PM, bufferings  wrote:
>
> > Hi Jerome
>
> > > I want to do on my server side:
> > > myConstants.myMessage();
>
> > I also thought about the same thing with you, and I created that with
> > javassist.
> > [Kotori I18N Project]
> >http://code.google.com/p/kotori/wiki/KotoriI18N?wl=en
> > I think a part of the project is useful to you.
>
> > If you try using the library,
> > (1) download "Kotori I18N"(ktr-i18n-0.1.0-alpha-v200909202315.zip).
> > In this time, you don't have to download "Kotori I18N Plugin(Eclipse
> > plugin)", which is a trick for the seamless use on both the client and
> > the server.
> > (2) Put ktr-i18n.jar and javassist.jar in your classpath.
> > (3) Use KtrI18NCreator.create() in your server side code like
> > GWT.create in the client.
>
> > If you don't use the library,
> > I think a part of it is useful to you.
>
> >http://code.google.com/p/kotori/source/browse/#svn/trunk/ktr-i18n/src...
>
> > --
> > bufferings
>
> > On 10月5日, 午後9:35, Jerome Cance  wrote:
> > > Thank you for this response, I was thinking of a solution like this but
> > what
> > > I don't like in this solution is the use of a constant for server side
> > > ressource bundle.
>
> > > If I can, I want to use a function to refer to an internationalized
> > string.
>
> > > In summary:
>
> > > I want to do on my server side:
> > > myConstants.myMessage();
> > > (like I do on client side)
>
> > > instead of:
> > > myConstants.getString("myMessage");
> > > (avoid the ressource bundle mechanism to have unicity on client and
> > server
> > > internationalization)
>
> > > But if I can't I will use your solution.
>
> > > ---
> > > Jérôme CANCE
>
> > > On Mon, Oct 5, 2009 at 2:18 PM, Lothar Kimmeringer  > >wrote:
>
> > > > Jerome C. schrieb:
>
> > > > > I need to use internationalization files on server side (send email,
> > > > > and email content is internationalized).
> > > > > When I use GWT.create on my server side, it does not run (exception).
>
> > > > [...]
>
> > > > > If I can, I don't want to use two different mechanisms for client and
> > > > > server internationalization.
>
> > > > I solved it by adding the locale-string to the parameters of the
> > > > servlet-method to be called:
>
> > > > public String getSomething(String param1, long param2, String locale)
> > > > throws RemoteServiceException 

Re: server side internationalization

2009-10-05 Thread Jerome Cance
Wooah,

that's exactly what I need and it runs perfectly !

Thanks a lot !

I think this kind of feature should be available directly in the GWT
project.

Bufferings, when I look at your site, the procedure to make it work seems to
be more complex. Why ?
I don't add the super-source tag and it runs like a charm.

---
Jérôme CANCE



On Mon, Oct 5, 2009 at 4:20 PM, bufferings  wrote:

>
> Hi Jerome
>
> > I want to do on my server side:
> > myConstants.myMessage();
>
> I also thought about the same thing with you, and I created that with
> javassist.
> [Kotori I18N Project]
> http://code.google.com/p/kotori/wiki/KotoriI18N?wl=en
> I think a part of the project is useful to you.
>
> If you try using the library,
> (1) download "Kotori I18N"(ktr-i18n-0.1.0-alpha-v200909202315.zip).
> In this time, you don't have to download "Kotori I18N Plugin(Eclipse
> plugin)", which is a trick for the seamless use on both the client and
> the server.
> (2) Put ktr-i18n.jar and javassist.jar in your classpath.
> (3) Use KtrI18NCreator.create() in your server side code like
> GWT.create in the client.
>
> If you don't use the library,
> I think a part of it is useful to you.
>
> http://code.google.com/p/kotori/source/browse/#svn/trunk/ktr-i18n/src/bufferings/ktr/i18n/server
>
> --
> bufferings
>
>
> On 10月5日, 午後9:35, Jerome Cance  wrote:
> > Thank you for this response, I was thinking of a solution like this but
> what
> > I don't like in this solution is the use of a constant for server side
> > ressource bundle.
> >
> > If I can, I want to use a function to refer to an internationalized
> string.
> >
> > In summary:
> >
> > I want to do on my server side:
> > myConstants.myMessage();
> > (like I do on client side)
> >
> > instead of:
> > myConstants.getString("myMessage");
> > (avoid the ressource bundle mechanism to have unicity on client and
> server
> > internationalization)
> >
> > But if I can't I will use your solution.
> >
> > ---
> > Jérôme CANCE
> >
> > On Mon, Oct 5, 2009 at 2:18 PM, Lothar Kimmeringer  >wrote:
> >
> >
> >
> >
> >
> > > Jerome C. schrieb:
> >
> > > > I need to use internationalization files on server side (send email,
> > > > and email content is internationalized).
> > > > When I use GWT.create on my server side, it does not run (exception).
> >
> > > [...]
> >
> > > > If I can, I don't want to use two different mechanisms for client and
> > > > server internationalization.
> >
> > > I solved it by adding the locale-string to the parameters of the
> > > servlet-method to be called:
> >
> > > public String getSomething(String param1, long param2, String locale)
> > > throws RemoteServiceException {
> > >  ResourceBundle rb = getResourceBundle(locale);
> > >  try{
> > >doSomething()
> > >  }
> > >  catch(Exception e){
> > >throw new
> > >
> RemoteServiceException(rb.getString("ServiceGeneral_Error_SomethingHappened­"));
> > >  }
> > > }
> >
> > > public static ResourceBundle getResourceBundle(String locale) {
> > >  Locale loc = getLocale(locale);
> > >  ResourceBundle rb =
> > > Utf8ResourceBundle.getBundle(AdminToolsI18NConstants.class.getName(),
> loc,
> > > AdminToolsI18NConstants.class.getClassLoader());
> > >  return rb;
> > > }
> >
> > > public static Locale getLocale(String locale){
> > >  if (locale == null){
> > >return null;
> > >  }
> > >  StringTokenizer tt = new StringTokenizer (locale, "_");
> > >  Locale loc = new Locale(tt.nextToken(), tt.hasMoreTokens() ?
> > > tt.nextToken() : "", tt.hasMoreTokens() ? tt.nextToken() : "");
> > >  return loc;
> > > }
> >
> > > The Utf8ResourceBundle is inspired by
> > >http://www.thoughtsabout.net/blog/archives/44.html
> > > That way you can use the ResourceBundle-files you created for the
> > > GWT-client. In each bundle I added one property, e.g.
> >
> > > Locale = DE
> >
> > > So a call in the GWT-client looks like this:
> >
> > > public static final MyI18NConstants CONSTANTS = (MyI18NConstants)
> > > GWT.create(MyI18NConstants.class);
> >
> > > [...]
> >
> > >  GeneralServices.Util.getInstance().g

Re: server side internationalization

2009-10-05 Thread bufferings

Hi Jerome

> I want to do on my server side:
> myConstants.myMessage();

I also thought about the same thing with you, and I created that with
javassist.
[Kotori I18N Project] http://code.google.com/p/kotori/wiki/KotoriI18N?wl=en
I think a part of the project is useful to you.

If you try using the library,
(1) download "Kotori I18N"(ktr-i18n-0.1.0-alpha-v200909202315.zip).
In this time, you don't have to download "Kotori I18N Plugin(Eclipse
plugin)", which is a trick for the seamless use on both the client and
the server.
(2) Put ktr-i18n.jar and javassist.jar in your classpath.
(3) Use KtrI18NCreator.create() in your server side code like
GWT.create in the client.

If you don't use the library,
I think a part of it is useful to you.
http://code.google.com/p/kotori/source/browse/#svn/trunk/ktr-i18n/src/bufferings/ktr/i18n/server

--
bufferings


On 10月5日, 午後9:35, Jerome Cance  wrote:
> Thank you for this response, I was thinking of a solution like this but what
> I don't like in this solution is the use of a constant for server side
> ressource bundle.
>
> If I can, I want to use a function to refer to an internationalized string.
>
> In summary:
>
> I want to do on my server side:
> myConstants.myMessage();
> (like I do on client side)
>
> instead of:
> myConstants.getString("myMessage");
> (avoid the ressource bundle mechanism to have unicity on client and server
> internationalization)
>
> But if I can't I will use your solution.
>
> ---
> Jérôme CANCE
>
> On Mon, Oct 5, 2009 at 2:18 PM, Lothar Kimmeringer wrote:
>
>
>
>
>
> > Jerome C. schrieb:
>
> > > I need to use internationalization files on server side (send email,
> > > and email content is internationalized).
> > > When I use GWT.create on my server side, it does not run (exception).
>
> > [...]
>
> > > If I can, I don't want to use two different mechanisms for client and
> > > server internationalization.
>
> > I solved it by adding the locale-string to the parameters of the
> > servlet-method to be called:
>
> > public String getSomething(String param1, long param2, String locale)
> > throws RemoteServiceException {
> >  ResourceBundle rb = getResourceBundle(locale);
> >  try{
> >    doSomething()
> >  }
> >  catch(Exception e){
> >    throw new
> > RemoteServiceException(rb.getString("ServiceGeneral_Error_SomethingHappened­"));
> >  }
> > }
>
> > public static ResourceBundle getResourceBundle(String locale) {
> >  Locale loc = getLocale(locale);
> >  ResourceBundle rb =
> > Utf8ResourceBundle.getBundle(AdminToolsI18NConstants.class.getName(), loc,
> > AdminToolsI18NConstants.class.getClassLoader());
> >  return rb;
> > }
>
> > public static Locale getLocale(String locale){
> >  if (locale == null){
> >    return null;
> >  }
> >  StringTokenizer tt = new StringTokenizer (locale, "_");
> >  Locale loc = new Locale(tt.nextToken(), tt.hasMoreTokens() ?
> > tt.nextToken() : "", tt.hasMoreTokens() ? tt.nextToken() : "");
> >  return loc;
> > }
>
> > The Utf8ResourceBundle is inspired by
> >http://www.thoughtsabout.net/blog/archives/44.html
> > That way you can use the ResourceBundle-files you created for the
> > GWT-client. In each bundle I added one property, e.g.
>
> > Locale = DE
>
> > So a call in the GWT-client looks like this:
>
> > public static final MyI18NConstants CONSTANTS = (MyI18NConstants)
> > GWT.create(MyI18NConstants.class);
>
> > [...]
>
> >  GeneralServices.Util.getInstance().getSomething(param1, param2,
> > CONSTANTS.Locale(), new AsyncCallback(){
> >    [...]
> >    public void onFailure(Throwable caught) {
> >      Window.alert(caught.getMessage());
> >    }
> >  };
>
> > If you have defined Messages instead of Constants you can do the filling
> > of the parameters by a simple text-replacement, e.g. by replaceAll:
>
> > rb.getString(...).replaceAll("\{0\}", e.getMessage());
>
> > Regards, Lothar- 引用テキストを表示しない -
>
> - 引用テキストを表示 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: server side internationalization

2009-10-05 Thread Lothar Kimmeringer

Hello Jerome,

Jerome Cance schrieb:
> Thank you for this response, I was thinking of a solution like this but
> what I don't like in this solution is the use of a constant for server
> side ressource bundle.
> 
> If I can, I want to use a function to refer to an internationalized string.

Check out the history of this list, this topic came up a couple of
times. I was participating there as well and was thinking of a
solution using Java-Proxies. I also planned to give that a try but
in lack of time I haven't been able to do so, yet.


Regards, Lothar

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: server side internationalization

2009-10-05 Thread Jerome Cance
Thank you for this response, I was thinking of a solution like this but what
I don't like in this solution is the use of a constant for server side
ressource bundle.

If I can, I want to use a function to refer to an internationalized string.

In summary:

I want to do on my server side:
myConstants.myMessage();
(like I do on client side)


instead of:
myConstants.getString("myMessage");
(avoid the ressource bundle mechanism to have unicity on client and server
internationalization)

But if I can't I will use your solution.

---
Jérôme CANCE



On Mon, Oct 5, 2009 at 2:18 PM, Lothar Kimmeringer wrote:

>
> Jerome C. schrieb:
>
> > I need to use internationalization files on server side (send email,
> > and email content is internationalized).
> > When I use GWT.create on my server side, it does not run (exception).
>
> [...]
>
> > If I can, I don't want to use two different mechanisms for client and
> > server internationalization.
>
> I solved it by adding the locale-string to the parameters of the
> servlet-method to be called:
>
> public String getSomething(String param1, long param2, String locale)
> throws RemoteServiceException {
>  ResourceBundle rb = getResourceBundle(locale);
>  try{
>doSomething()
>  }
>  catch(Exception e){
>throw new
> RemoteServiceException(rb.getString("ServiceGeneral_Error_SomethingHappened"));
>  }
> }
>
> public static ResourceBundle getResourceBundle(String locale) {
>  Locale loc = getLocale(locale);
>  ResourceBundle rb =
> Utf8ResourceBundle.getBundle(AdminToolsI18NConstants.class.getName(), loc,
> AdminToolsI18NConstants.class.getClassLoader());
>  return rb;
> }
>
> public static Locale getLocale(String locale){
>  if (locale == null){
>return null;
>  }
>  StringTokenizer tt = new StringTokenizer (locale, "_");
>  Locale loc = new Locale(tt.nextToken(), tt.hasMoreTokens() ?
> tt.nextToken() : "", tt.hasMoreTokens() ? tt.nextToken() : "");
>  return loc;
> }
>
> The Utf8ResourceBundle is inspired by
> http://www.thoughtsabout.net/blog/archives/44.html
> That way you can use the ResourceBundle-files you created for the
> GWT-client. In each bundle I added one property, e.g.
>
> Locale = DE
>
> So a call in the GWT-client looks like this:
>
> public static final MyI18NConstants CONSTANTS = (MyI18NConstants)
> GWT.create(MyI18NConstants.class);
>
> [...]
>
>  GeneralServices.Util.getInstance().getSomething(param1, param2,
> CONSTANTS.Locale(), new AsyncCallback(){
>[...]
>public void onFailure(Throwable caught) {
>  Window.alert(caught.getMessage());
>}
>  };
>
> If you have defined Messages instead of Constants you can do the filling
> of the parameters by a simple text-replacement, e.g. by replaceAll:
>
> rb.getString(...).replaceAll("\{0\}", e.getMessage());
>
>
> Regards, Lothar
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: server side internationalization

2009-10-05 Thread Lothar Kimmeringer

Jerome C. schrieb:

> I need to use internationalization files on server side (send email,
> and email content is internationalized).
> When I use GWT.create on my server side, it does not run (exception).

[...]

> If I can, I don't want to use two different mechanisms for client and
> server internationalization.

I solved it by adding the locale-string to the parameters of the
servlet-method to be called:

public String getSomething(String param1, long param2, String locale) throws 
RemoteServiceException {
  ResourceBundle rb = getResourceBundle(locale);
  try{
doSomething()
  }
  catch(Exception e){
throw new 
RemoteServiceException(rb.getString("ServiceGeneral_Error_SomethingHappened"));
  }
}

public static ResourceBundle getResourceBundle(String locale) {
  Locale loc = getLocale(locale);
  ResourceBundle rb = 
Utf8ResourceBundle.getBundle(AdminToolsI18NConstants.class.getName(), loc, 
AdminToolsI18NConstants.class.getClassLoader());
  return rb;
}

public static Locale getLocale(String locale){
  if (locale == null){
return null;
  }
  StringTokenizer tt = new StringTokenizer (locale, "_");
  Locale loc = new Locale(tt.nextToken(), tt.hasMoreTokens() ? tt.nextToken() : 
"", tt.hasMoreTokens() ? tt.nextToken() : "");
  return loc;
}

The Utf8ResourceBundle is inspired by
http://www.thoughtsabout.net/blog/archives/44.html
That way you can use the ResourceBundle-files you created for the
GWT-client. In each bundle I added one property, e.g.

Locale = DE

So a call in the GWT-client looks like this:

public static final MyI18NConstants CONSTANTS = (MyI18NConstants) 
GWT.create(MyI18NConstants.class);

[...]

  GeneralServices.Util.getInstance().getSomething(param1, param2, 
CONSTANTS.Locale(), new AsyncCallback(){
[...]
public void onFailure(Throwable caught) {
  Window.alert(caught.getMessage());
}
  };

If you have defined Messages instead of Constants you can do the filling
of the parameters by a simple text-replacement, e.g. by replaceAll:

rb.getString(...).replaceAll("\{0\}", e.getMessage());


Regards, Lothar

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



server side internationalization

2009-10-05 Thread Jerome C.

Hello,

I need to use internationalization files on server side (send email,
and email content is internationalized).
When I use GWT.create on my server side, it does not run (exception).

Is there  a solution to do that ?
I use Spring on my server side, so if there is a solution to use gwt
l18n files with spring, it will be useful.

If I can, I don't want to use two different mechanisms for client and
server internationalization.

Thanks a lot

Jerome C.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Internationalization deffered binding error

2009-07-06 Thread Christian Goudreau
I found my answer ! It's was really simple, but too simple to be quoted in
the documentation. You must have a file MyConstants.properties that act as
default even if you don't really use it.

I had MyConstants_fr.properties and MyConstants_en.properties and no
MyConstants.properties. That was why I got those errors.

Anyway, I hope it'll help a least one person !

Christian

On Mon, Jul 6, 2009 at 12:42 PM, Christian Goudreau <
goudreau.christ...@gmail.com> wrote:

> Hi, I have an error when attempting to compile my module.
>
> ERROR] Line 10:  Failed to resolve 'com.mesy.client.MyConstants' via
> deferred binding
>
> The thing is, it works fine when I run it. Any idea what to do ?
>
> Thanks
>
> Christian
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Internationalization deffered binding error

2009-07-06 Thread Christian Goudreau
Hi, I have an error when attempting to compile my module.

ERROR] Line 10:  Failed to resolve 'com.mesy.client.MyConstants' via
deferred binding

The thing is, it works fine when I run it. Any idea what to do ?

Thanks

Christian

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Internationalization not working for all strings

2008-12-17 Thread Owz

Thanks for the suggestions.

I've actually just managed to solve the problem. It was partly down to
my inexperience with property files and partly because I'm a numpty!
Basically, the strings that weren't being localised were all defined
with a "-" (hyphen) e.g.

clear-sort: Clear Sort

The hyphen was causing the problem, so simply changing it to a
"_" (underscore) solved the problem. e.g.

clear_sort: Clear Sort

I should have really spotted the pattern earlier but there we go!

Cheers.

On Dec 16, 7:34 pm, Martin Trummer  wrote:
> just some thoughts:
>  * maybe there are some hidden characters, that your editor does not
> show
>  * maybe the translation has been copied from the default and it just
> seems not to translate
>  * you could post some of those random strings here - maybe this helps
> anyone to get a better idea about the problem
>
> On Dec 16, 5:33 pm, Owz  wrote:
>
> > I'm doing some localization within my application written with GWT
> > 1.5.3 & GWT-Ext 2.0.5. I have around 6 different properties files and
> > I use the i18nCreator command-line tool to create the interfaces. I've
> > got 2 locales, English as default in the original properties files and
> > French in fr_FR.properties files.
>
> > All text is shown fine when using the default properties files and
> > most are shown fine when running in the French locale except for a few
> > random strings. These strings continue to show in english for no
> > apparent reason. It's not any single properties file that's causing
> > problems as some stings in a single properties file display fine but
> > others don't. These strings don't have any odd characters and eclipse
> > has been set to use uft-8.
>
> > Does anyone have any suggestions as to why these random strings could
> > be reverting back to the default string? I can't seem to fins much by
> > searching (mainly because I'm not sure what to search for!).
>
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Internationalization not working for all strings

2008-12-17 Thread Owz

Thanks for the suggestions.

I've actually just managed to solve the problem. It was partly down to
my inexperience with property files and partly because I'm a numpty!
Basically, the strings that weren't being localised were all defined
with a "-" (hyphen) e.g.

clear-sort: Clear Sort

The hyphen was causing the problem, so simply changing it to a
"_" (underscore) solved the problem. e.g.

clear_sort: Clear Sort

I should have really spotted the pattern earlier but there we go!

Cheers.

On Dec 16, 7:34 pm, Martin Trummer  wrote:
> just some thoughts:
>  * maybe there are some hidden characters, that your editor does not
> show
>  * maybe the translation has been copied from the default and it just
> seems not to translate
>  * you could post some of those random strings here - maybe this helps
> anyone to get a better idea about the problem
>
> On Dec 16, 5:33 pm, Owz  wrote:
>
> > I'm doing some localization within my application written with GWT
> > 1.5.3 & GWT-Ext 2.0.5. I have around 6 different properties files and
> > I use the i18nCreator command-line tool to create the interfaces. I've
> > got 2 locales, English as default in the original properties files and
> > French in fr_FR.properties files.
>
> > All text is shown fine when using the default properties files and
> > most are shown fine when running in the French locale except for a few
> > random strings. These strings continue to show in english for no
> > apparent reason. It's not any single properties file that's causing
> > problems as some stings in a single properties file display fine but
> > others don't. These strings don't have any odd characters and eclipse
> > has been set to use uft-8.
>
> > Does anyone have any suggestions as to why these random strings could
> > be reverting back to the default string? I can't seem to fins much by
> > searching (mainly because I'm not sure what to search for!).
>
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Internationalization not working for all strings

2008-12-16 Thread Martin Trummer

just some thoughts:
 * maybe there are some hidden characters, that your editor does not
show
 * maybe the translation has been copied from the default and it just
seems not to translate
 * you could post some of those random strings here - maybe this helps
anyone to get a better idea about the problem

On Dec 16, 5:33 pm, Owz  wrote:
> I'm doing some localization within my application written with GWT
> 1.5.3 & GWT-Ext 2.0.5. I have around 6 different properties files and
> I use the i18nCreator command-line tool to create the interfaces. I've
> got 2 locales, English as default in the original properties files and
> French in fr_FR.properties files.
>
> All text is shown fine when using the default properties files and
> most are shown fine when running in the French locale except for a few
> random strings. These strings continue to show in english for no
> apparent reason. It's not any single properties file that's causing
> problems as some stings in a single properties file display fine but
> others don't. These strings don't have any odd characters and eclipse
> has been set to use uft-8.
>
> Does anyone have any suggestions as to why these random strings could
> be reverting back to the default string? I can't seem to fins much by
> searching (mainly because I'm not sure what to search for!).
>
> Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Internationalization not working for all strings

2008-12-16 Thread Owz

I'm doing some localization within my application written with GWT
1.5.3 & GWT-Ext 2.0.5. I have around 6 different properties files and
I use the i18nCreator command-line tool to create the interfaces. I've
got 2 locales, English as default in the original properties files and
French in fr_FR.properties files.

All text is shown fine when using the default properties files and
most are shown fine when running in the French locale except for a few
random strings. These strings continue to show in english for no
apparent reason. It's not any single properties file that's causing
problems as some stings in a single properties file display fine but
others don't. These strings don't have any odd characters and eclipse
has been set to use uft-8.

Does anyone have any suggestions as to why these random strings could
be reverting back to the default string? I can't seem to fins much by
searching (mainly because I'm not sure what to search for!).

Thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



  1   2   >