Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Babel » Date pattern translation
Date pattern translation [message #735579] Wed, 12 October 2011 09:33 Go to next message
Arnaud MERGEY is currently offline Arnaud MERGEY
Messages: 131
Registered: March 2010
Location: France
Senior Member
Hello,

Since I am using babel fr translation of org.eclipse.core.databinding/org/eclipse/core/internal/databinding/messages.properties

I have exceptions above by using databinding in a plugin

I seems following the key DateFormat_DateTime has been translated from dd.MM.yyyy HH:mm:ss.SSS Z to jj.MM.aaaa HH:mm:ss.SSS Z but it is used as a date format pattern. This key should propably be same in fr than english, what do you think ?

java.lang.IllegalArgumentException: Illegal pattern character 'j'
at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:769)
at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:576)
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:501)
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:476)
at com.ibm.icu.text.SimpleDateFormat.<init>(SimpleDateFormat.java:218)
at org.eclipse.core.internal.databinding.conversion.DateConversionSupport.<init>(DateConversionSupport.java:45)
at org.eclipse.core.internal.databinding.conversion.StringToDateConverter.<init>(StringToDateConverter.java:24)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.eclipse.core.databinding.UpdateStrategy.createConverter(UpdateStrategy.java:154)
at org.eclipse.core.databinding.UpdateValueStrategy.fillDefaults(UpdateValueStrategy.java:262)
at org.eclipse.core.databinding.DataBindingContext.bindValue(DataBindingContext.java:162)

The key is http://babel.eclipse.org/babel/translate.php?project=eclipse&version=3.7&file=org.eclipse.core.databinding/org/eclipse/core/internal/databinding/messages.properties&string=DateFormat_DateTime

Regards,
Arnaud

[Updated on: Wed, 12 October 2011 09:50]

Report message to a moderator

Re: Date pattern translation [message #735610 is a reply to message #735579] Wed, 12 October 2011 11:29 Go to previous messageGo to next message
Kit Lo is currently offline Kit Lo
Messages: 99
Registered: July 2009
Member
I agree with that. Is there a test scenario to show the problem?

Would you like to contribute the correction to the Babel database?

Thanks,
Kit Lo
Eclipse Babel Project Lead
Re: Date pattern translation [message #735648 is a reply to message #735610] Wed, 12 October 2011 13:26 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEY
Messages: 131
Registered: March 2010
Location: France
Senior Member
Hello,

you can reproduce with the attached snippet
The snippet contains a project with target platform and launchers.

You can import the project in a workspace then select target platform defined in target.target, put a debug breakpoint for java.lang.IllegalArgumentException

then launch in debug snippet.i18n.viewapp fr (RCP) you should see the exception while the databinding between date and text in the view.

regarding rhe correction to the babel database, how can i contribute ? should I have to create a bug ?

regards,
Arnaud
Re: Date pattern translation [message #735650 is a reply to message #735648] Wed, 12 October 2011 13:27 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEY
Messages: 131
Registered: March 2010
Location: France
Senior Member
I forgot the snippet
Re: Date pattern translation [message #743409 is a reply to message #735650] Fri, 21 October 2011 12:53 Go to previous message
Kit Lo is currently offline Kit Lo
Messages: 99
Registered: July 2009
Member
To contribute the correction, you just have to go to this link:

http://babel.eclipse.org/babel/translate.php?project=eclipse&version=3.7&file=org.eclipse.core.databinding/org/eclipse/core/internal/databinding/messages.properties&string=DateFormat_DateTime

type in the correct translation, then click the Submit button. Thanks!

Kit Lo
Eclipse babel Project Lead
Previous Topic:ResourceBundleEditor dead?
Next Topic:BIRT translation
Goto Forum:
  


Current Time: Sat Sep 20 18:20:49 GMT 2014

Powered by FUDForum. Page generated in 0.12247 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software