Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 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 10:19 Go to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
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 12:48 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 232
Registered: September 2011
Senior 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 13:40 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
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 Apr 19 12:17:28 GMT 2024

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

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

Back to the top