Enable translation of the event configuration

cusax-fix
Ingo Bauersachs 14 years ago
parent 072a2cb90a
commit 9b8b97ae86

@ -1078,6 +1078,29 @@ plugin.notificationconfig.PLAY_SOUND=Play a sound:
plugin.notificationconfig.EXEC_PROG=Execute a program:
plugin.notificationconfig.DISPLAY_POPUP=Show a message in a pop-up window
plugin.notificationconfig.POPUP_NOTIF_HANDLER=Popup notifications type:
plugin.notificationconfig.SOUND_FILE=Sound file:
plugin.notificationconfig.PROGRAM_FILE=Program file:
plugin.notificationconfig.BROWSE_SOUND=Choose a sound file
plugin.notificationconfig.BROWSE_PROGRAM=Choose a program
plugin.notificationconfig.tableheader.ENABLE=Enable or disable this feature
plugin.notificationconfig.tableheader.EXECUTE=Execute a program
plugin.notificationconfig.tableheader.POPUP=Display a messagebox
plugin.notificationconfig.tableheader.SOUND=Play a sound
plugin.notificationconfig.tableheader.DESCRIPTION=Description of event
plugin.notificationconfig.event.IncomingCall=Incoming Call
plugin.notificationconfig.event.SecurityMessage=Security Message
plugin.notificationconfig.event.IncomingFile=Incoming File
plugin.notificationconfig.event.LogFilesArchived=Log Files Archived
plugin.notificationconfig.event.CallSecurityError=Call Security Error
plugin.notificationconfig.event.NetworkNotifications=Network Notifications
plugin.notificationconfig.event.Dialing=Dialing
plugin.notificationconfig.event.ProactiveNotification=Proactive Notification
plugin.notificationconfig.event.CallSecurityOn=Call Security On
plugin.notificationconfig.event.IncomingMessage=Incoming Message
plugin.notificationconfig.event.OutgoingCall=Outgoing Call
plugin.notificationconfig.event.BusyCall=Busy Call
plugin.notificationconfig.event.CallSaved=Call Saved
plugin.notificationconfig.event.HangUp=Hang Up
# ZRTP Securing
impl.media.security.WARNING_NO_RS_MATCH=<html>No retained shared secret available.<br/><b>SAS verification is recommended</b></html>

@ -73,8 +73,10 @@ public NotificationConfigurationPanel()
initNotificationsList();
JLabel soundFileLabel = new JLabel("Sound file:");
JLabel programFileLabel = new JLabel("Program file:");
JLabel soundFileLabel = new JLabel(
Resources.getString("plugin.notificationconfig.SOUND_FILE"));
JLabel programFileLabel = new JLabel(
Resources.getString("plugin.notificationconfig.PROGRAM_FILE"));
labelsPanel.add(soundFileLabel);
labelsPanel.add(programFileLabel);
@ -133,10 +135,14 @@ public NotificationConfigurationPanel()
add(southPanel, BorderLayout.SOUTH);
fileChooserSound = GenericFileDialog.create(null, "Choose a sound...",
SipCommFileChooser.LOAD_FILE_OPERATION);
fileChooserProgram = GenericFileDialog.create(null,
"Choose a program...", SipCommFileChooser.LOAD_FILE_OPERATION);
fileChooserSound =
GenericFileDialog.create(null,
Resources.getString("plugin.notificationconfig.BROWSE_SOUND"),
SipCommFileChooser.LOAD_FILE_OPERATION);
fileChooserProgram =
GenericFileDialog.create(null,
Resources.getString("plugin.notificationconfig.BROWSE_PROGRAM"),
SipCommFileChooser.LOAD_FILE_OPERATION);
fileChooserSound.addFilter(new SoundFilter());
}
@ -145,11 +151,13 @@ public NotificationConfigurationPanel()
*/
private void initNotificationsList()
{
String[] columnToolTips = { "Enable or disable this feature",
"Execute a program",
"Display a messagebox",
"Play a sound",
"Description of event" };
String[] columnToolTips = {
"plugin.notificationconfig.tableheader.ENABLE",
"plugin.notificationconfig.tableheader.EXECUTE",
"plugin.notificationconfig.tableheader.POPUP",
"plugin.notificationconfig.tableheader.SOUND",
"plugin.notificationconfig.tableheader.DESCRIPTION"
};
JLabel icon1
= new JLabel(new ImageIcon(Resources.getImageInBytes(

@ -6,12 +6,11 @@
*/
package net.java.sip.communicator.plugin.notificationconfiguration;
import net.java.sip.communicator.service.notification.*;
/**
* The <tt>NotificationsTableEntry</tt> is a class which defined the different
* entry in the utilitary "NotificationConfiguration" JTable. It
* regroups one entry's whole parameters.
* The <tt>NotificationEntry</tt> is a class which defines the different
* entries in the <tt>NotificationConfiguration<tt> JTable. It stores the
* configuration parameters of an entry.
*
* @author Alexandre Maillard
*/
public class NotificationEntry
@ -19,40 +18,37 @@ public class NotificationEntry
/**
* Parameter which defines if the notification is enabled or disabled.
*/
private boolean enabled = false;
private boolean enabled;
/**
* Parameter which defines if the program's execution is activated.
*/
private boolean program = false;
private boolean program;
/**
* Program filenames which is executed.
*/
private String programFile = "";
private String programFile;
/**
* Parameter which defines if the popup is activated.
*/
private boolean popup = false;
private boolean popup;
/**
* Parameter which defines if the sound is activated.
*/
private boolean sound = false;
private boolean sound;
/**
* Name of sound file which is play
*/
private String soundFile = "";
private String soundFile;
/**
* Parameter which describes, in a simple sentence, the notification.
*/
private String event = "";
private final NotificationService notificationService
= NotificationConfigurationActivator.getNotificationService();
private String event;
/**
* Empty class constructor.
@ -87,11 +83,11 @@ public NotificationEntry(
{
this.enabled = enabled;
this.program = program;
setProgramFile(programFile);
this.programFile = programFile;
this.popup = popup;
this.sound = sound;
setSoundFile(soundFile);
setEvent(event);
this.soundFile = soundFile;
this.event = event;
}
/**

@ -374,7 +374,7 @@ public String getToolTipText(MouseEvent e)
int index = columnModel.getColumnIndexAtX(p.x);
int realIndex =
columnModel.getColumn(index).getModelIndex();
return columnToolTips[realIndex];
return Resources.getString(columnToolTips[realIndex]);
}
};
}

@ -11,8 +11,6 @@
import javax.swing.*;
import javax.swing.table.*;
import net.java.sip.communicator.util.*;
/**
* @author Alexandre Maillard
* @author Yana Stamcheva
@ -53,9 +51,8 @@ public Component getTableCellRendererComponent(
setForeground(entry.getEnabled() ? Color.BLACK : Color.GRAY);
setHorizontalAlignment(SwingConstants.LEFT);
setIcon(null);
setText(
StringUtils.convertCamelCaseToDisplayString(
entry.getEvent()));
setText(Resources.getString("plugin.notificationconfig.event."
+ entry.getEvent()));
}
else if (value instanceof String)
{

Loading…
Cancel
Save