diff --git a/core/src/main/java/org/jivesoftware/AccountCreationWizard.java b/core/src/main/java/org/jivesoftware/AccountCreationWizard.java index 84b496b3b..2632c28ae 100644 --- a/core/src/main/java/org/jivesoftware/AccountCreationWizard.java +++ b/core/src/main/java/org/jivesoftware/AccountCreationWizard.java @@ -281,11 +281,15 @@ public void finished() { * @param condition the error code. */ private void accountCreationFailed( StanzaError.Condition condition ) { - String message = Res.getString("message.create.account"); + String message; if (condition == StanzaError.Condition.conflict) { message = Res.getString("message.already.exists"); usernameField.setText(""); usernameField.requestFocus(); + } else if (condition == StanzaError.Condition.not_allowed || condition == StanzaError.Condition.forbidden) { + message = Res.getString("message.create.account.not.allowed"); + } else { + message = Res.getString("message.create.account"); } UIManager.put("OptionPane.okButtonText", Res.getString("ok")); JOptionPane.showMessageDialog(this, message, Res.getString("title.create.problem"), JOptionPane.ERROR_MESSAGE); @@ -293,7 +297,7 @@ private void accountCreationFailed( StanzaError.Condition condition ) { } /** - * Called if the account was created succesfully. + * Called if the account was created successfully. */ private void accountCreationSuccessful() { registered = true; diff --git a/core/src/main/resources/i18n/spark_i18n.properties b/core/src/main/resources/i18n/spark_i18n.properties index e3e94a3b8..03cd20a05 100644 --- a/core/src/main/resources/i18n/spark_i18n.properties +++ b/core/src/main/resources/i18n/spark_i18n.properties @@ -480,6 +480,7 @@ message.add.to.roster = Add To roster message.add.user = Add user to your roster? message.alert.notify = Alert notification message.already.exists = Account already exists, please try a different username +message.create.account.not.allowed = Account creation is not allowed on the server message.approve.subscription = Allow {0} to add you to their roster? message.authenticating = Authenticating message.away.idle = Away due to idle