Skip to main content



      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 06:19 Go to next message
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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: Wed Jul 23 20:52:52 EDT 2025

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

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

Back to the top