Commit 21b41a7c authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Setting localization strings for newer text strings.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk/src/plugins/gateway@7279 b35dd754-fafc-0310-a699-88a17e54d16e
parent af4184c3
......@@ -166,6 +166,15 @@
## Added key: 'gateway.sip.illegalaccount'
## Updated key: 'gateway.web.settings.unstable.title'
## Updated key: 'gateway.web.settings.unstable.notice'
## Added key: 'gateway.web.registrations.xmppnotfound'
## Added key: 'gateway.web.registrations.regnotfound'
## Added key: 'gateway.web.registrations.notenabled'
## Added key: 'gateway.web.registrations.illegaldomain'
## Added key: 'gateway.web.registrations.invaliduser'
## Added key: 'gateway.msn.illegalaccount'
## Added key: 'gateway.msn.disconnect'
## Added key: 'gateway.msn.wink'
## Added key: 'gateway.msn.nudge'
# Temporary Tags Until Fixed Properly
......@@ -320,3 +329,8 @@ gateway.web.registrations.user=User
gateway.web.registrations.confirmdelete=Are you sure you want to delete this registration?
gateway.web.registrations.registrations=Registrations
gateway.web.registrations.title=Gateway Registrations
gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
......@@ -153,3 +153,8 @@ gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with
gateway.msn.disconnect=You were disconnected from the MSN service.
gateway.msn.wink=You have received an MSN wink.
gateway.msn.nudge=You have received an MSN nudge.
gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file
......@@ -153,3 +153,8 @@ gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with
gateway.msn.disconnect=You were disconnected from the MSN service.
gateway.msn.wink=You have received an MSN wink.
gateway.msn.nudge=You have received an MSN nudge.
gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file
......@@ -153,3 +153,8 @@ gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with
gateway.msn.disconnect=You were disconnected from the MSN service.
gateway.msn.wink=You have received an MSN wink.
gateway.msn.nudge=You have received an MSN nudge.
gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file
......@@ -153,3 +153,8 @@ gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with
gateway.msn.disconnect=You were disconnected from the MSN service.
gateway.msn.wink=You have received an MSN wink.
gateway.msn.nudge=You have received an MSN nudge.
gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file
......@@ -24,6 +24,7 @@ import org.jivesoftware.wildfire.gateway.Registration;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.NotFoundException;
import org.jivesoftware.util.LocaleUtils;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.Attribute;
......@@ -219,7 +220,7 @@ public class ConfigManager {
jid = new JID(user, XMPPServer.getInstance().getServerInfo().getName(), null);
}
if (!plugin.getTransportInstance(transportType).isEnabled()) {
return "Transport is not enabled. Please enable before attempting adds.";
return LocaleUtils.getLocalizedString("gateway.web.registrations.notenabled", "gateway");
}
try {
plugin.getTransportInstance(transportType).getTransport().addNewRegistration(jid, legacyUsername, legacyPassword, legacyNickname, false);
......@@ -227,15 +228,15 @@ public class ConfigManager {
}
catch (UserNotFoundException e) {
Log.error("Not found while adding account for "+jid.toString());
return "Unable to find XMPP user account.";
return LocaleUtils.getLocalizedString("gateway.web.registrations.xmppnotfound", "gateway");
}
catch (IllegalAccessException e) {
Log.error("Domain of JID specified for registration is not on this server: "+jid.toString());
return "XMPP user account domain is not on this server.";
return LocaleUtils.getLocalizedString("gateway.web.registrations.illegaldomain", "gateway");
}
catch (IllegalArgumentException e) {
Log.error("Username specified for registration is not valid.");
return "Invalid username specified for legacy service.";
return LocaleUtils.getLocalizedString("gateway.web.registrations.invaliduser", "gateway");
}
}
......@@ -251,7 +252,7 @@ public class ConfigManager {
try {
Registration reg = new Registration(registrationID);
if (!plugin.getTransportInstance(reg.getTransportType().toString()).isEnabled()) {
return "Transport is not enabled. Please enable before attempting deletes.";
return LocaleUtils.getLocalizedString("gateway.web.registrations.notenabled", "gateway");
}
plugin.getTransportInstance(reg.getTransportType().toString()).getTransport().deleteRegistration(reg.getJID());
return null;
......@@ -259,12 +260,12 @@ public class ConfigManager {
catch (NotFoundException e) {
// Ok, nevermind.
Log.error("Not found while deleting id "+registrationID, e);
return "Unable to find XMPP user account.";
return LocaleUtils.getLocalizedString("gateway.web.registrations.xmppnotfound", "gateway");
}
catch (UserNotFoundException e) {
// Ok, nevermind.
Log.error("Not found while deleting id "+registrationID, e);
return "Unable to find registration.";
return LocaleUtils.getLocalizedString("gateway.web.registrations.regnotfound", "gateway");
}
}
......@@ -291,7 +292,7 @@ public class ConfigManager {
catch (NotFoundException e) {
// Ok, nevermind.
Log.error("Not found while editing id "+registrationID, e);
return "Unable to find registration.";
return LocaleUtils.getLocalizedString("gateway.web.registrations.regnotfound", "gateway");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment