Updating Roster Dialog.

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@5502 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Derek DeMoro
2006-09-25 16:35:37 +00:00
committed by derek
parent 6a5ff1f56d
commit c4a3beee78
2 changed files with 17 additions and 7 deletions

View File

@ -220,7 +220,7 @@ public class RosterDialog implements PropertyChangeListener, ActionListener {
} }
String value = (String)pane.getValue(); String value = (String)pane.getValue();
String errorMessage = "General Error"; String errorMessage = Res.getString("title.error");
if (Res.getString("cancel").equals(value)) { if (Res.getString("cancel").equals(value)) {
dialog.setVisible(false); dialog.setVisible(false);
} }
@ -251,16 +251,16 @@ public class RosterDialog implements PropertyChangeListener, ActionListener {
if (isSharedGroup) { if (isSharedGroup) {
errorMessage = "You cannot add new contacts to a Shared Group."; errorMessage = Res.getString("message.cannot.add.contact.to.shared.group");
} }
else if (!ModelUtil.hasLength(contact)) { else if (!ModelUtil.hasLength(contact)) {
errorMessage = "Please specify the contact JID (ex. lisa@jivesoftware.org)"; errorMessage = Res.getString("message.specify.contact.jid");
} }
else if (StringUtils.parseBareAddress(contact).indexOf("@") == -1) { else if (StringUtils.parseBareAddress(contact).indexOf("@") == -1) {
errorMessage = "The JID you specified is invalid. (ex. lisa@jivesoftware.com)"; errorMessage = Res.getString("message.invalid.jid.error");
} }
else if (!ModelUtil.hasLength(group)) { else if (!ModelUtil.hasLength(group)) {
errorMessage = "You must specify a Group to add the user to."; errorMessage = Res.getString("message.specify.group");
} }
else if (ModelUtil.hasLength(contact) && ModelUtil.hasLength(group) && !isSharedGroup) { else if (ModelUtil.hasLength(contact) && ModelUtil.hasLength(group) && !isSharedGroup) {
addEntry(); addEntry();

View File

@ -49,8 +49,10 @@
## Added key: 'title.file.transfer.preferences' ## Added key: 'title.file.transfer.preferences'
## Added key: 'menuitem.about' ## Added key: 'menuitem.about'
## Added key: 'message.invalid.status' ## Added key: 'message.invalid.status'
## ## Added key: 'message.cannot.add.contact.to.shared.group
## Added key: 'message.specify.contact.jid'
## Added key: 'message.invalid.jid.error'
## Added key: 'message.specify.group'
ok = Ok ok = Ok
cancel = Cancel cancel = Cancel
@ -398,6 +400,14 @@ message.enter.room.password = Enter Room Password
message.add.contact.to.list = Add contact to contact list message.add.contact.to.list = Add contact to contact list
message.autenticating = Authenticating message.autenticating = Authenticating
message.invalid.status = Specify a valid status message. message.invalid.status = Specify a valid status message.
message.cannot.add.contact.to.shared.group = You cannot add new contacts to a Shared Group.
message.specify.contact.jid = Please specify the contact JID (ex. ddman@jabber.org)
message.invalid.jid.error = The JID specified is invalid.
message.specify.group = Specify contact group to add the new user to.
title.passwords.no.match = Confirm passwords. title.passwords.no.match = Confirm passwords.
title.create.problem = Account Creation Problem title.create.problem = Account Creation Problem