Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Swing Plug-in: UIManager.getString("LoginDialog.cancel")(Where is the translation ?)
Swing Plug-in: UIManager.getString("LoginDialog.cancel") [message #818963] Mon, 12 March 2012 06:19 Go to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 675
Registered: October 2011
Senior Member
In my project, I have my own LoginDialog (in the SWING plugin of my application).

I moved to the new version of Scout with a migration of NLS suport (see: migrate from 3.7 to 3.8).

Where is the text corresponding to
UIManager.getString("LoginDialog.cancel")

See Line 174 in LoginDialog

In my Application getString(..) provides me a text with Mnemonic (&Cancel, &Abbrechen, ...). This is not compatible with the dialog. I got the "&" displayed in the Button.

How can I change my translation Texts to have "Abbrechen" instead of "&Abbrechen".

.
Re: Swing Plug-in: UIManager.getString("LoginDialog.cancel") [message #819059 is a reply to message #818963] Mon, 12 March 2012 08:48 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias Villiger
Messages: 78
Registered: September 2011
Member
The text that is displayed on the cancel button is retrieved from the swing UIManager as you correctly explained.
The key "LoginDialog.cancel" is put into the UIManager by the UIDefaultsInjector class (see line 141).

There you can see that the Scout NLS Text with key "Cancel" is used. As this is a normal Scout TextProviderService you can overwrite it by creating a text with the same key in your project specific TextProviderService.

In general: If a translation for a key exists in more than one TextProviderService, the service with the highest ranking (check plugin.xml) is used. This gives you the opportunity to overwrite every text that is provided by the scout runtime.

Did this solve your issue?

Kind regards
matthias
Re: Swing Plug-in: UIManager.getString("LoginDialog.cancel") [message #819098 is a reply to message #819059] Mon, 12 March 2012 09:40 Go to previous message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 675
Registered: October 2011
Senior Member
I had an overwritten definition with "&" for key "Cancel"... I removed this entry to use standard Scout Text...

Thanks for your help (and the pointer to UIDefaultsInjector).

It works now!
Previous Topic:Multiple SQL operations and commit
Next Topic:Deploy on Linux
Goto Forum:
  


Current Time: Fri Aug 29 18:36:20 EDT 2014

Powered by FUDForum. Page generated in 0.01601 seconds