Translate KeyBindings tab headers

cusax-fix
Ingo Bauersachs 14 years ago
parent 847d09ad68
commit 33f301aa7d

@ -1081,6 +1081,9 @@ plugin.keybindings.globalchooser.SHORTCUT_NAME=Name
plugin.keybindings.globalchooser.SHORTCUT_PRIMARY=Primary shortcut
plugin.keybindings.globalchooser.SHORTCUT_SECOND=Second shortcut
plugin.keybindings.PLUGIN_NAME=Keybindings
plugin.keybindings.CHAT=Chat
plugin.keybindings.MAIN=Main
plugin.keybindings.GLOBAL=Global shortcuts
# Notification Configuration Form
plugin.notificationconfig.ENABLE_NOTIF=Enable

@ -87,7 +87,8 @@ public void focusLost(FocusEvent event)
// adds listener that receives events to set bindings
this.addKeyListener(newChooser.makeAdaptor());
chooserPanes.addTab(getReadableConstant(category.toString()),
chooserPanes.addTab(KeybindingChooserActivator.getResources()
.getI18NString("plugin.keybindings." + category.toString()),
scroller);
this.choosers.put(bindingSet, newChooser);
}
@ -95,40 +96,12 @@ public void focusLost(FocusEvent event)
// global shortcut
GlobalShortcutConfigForm globalBindingPanel =
new GlobalShortcutConfigForm();
chooserPanes.addTab("Global shortcut", globalBindingPanel);
chooserPanes.addTab(KeybindingChooserActivator.getResources()
.getI18NString("plugin.keybindings.GLOBAL"), globalBindingPanel);
add(chooserPanes);
}
/**
* Provides a more readable version of constant names. Spaces replace
* underscores and this changes the input to lowercase except the first
* letter of each word. For instance, "RARE_CARDS" would become "Rare
* Cards".
*
* @param input string to be converted
* @return reader friendly variant of constant name
*/
private static String getReadableConstant(String input)
{
char[] name = input.toCharArray();
boolean isStartOfWord = true;
for (int i = 0; i < name.length; ++i)
{
char chr = name[i];
if (chr == '_')
name[i] = ' ';
else if (isStartOfWord)
name[i] = Character.toUpperCase(chr);
else
name[i] = Character.toLowerCase(chr);
isStartOfWord = chr == '_';
}
return new String(name);
}
/**
* Keybinding chooser with customized appearance and functionality for the
* SIP Communicator.

@ -17,11 +17,6 @@
*/
public class GlobalShortcutEntry
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* Disabled keystroke.
*/

Loading…
Cancel
Save