diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserContextService.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserContextService.java index 4af1d5cee..131cd19ce 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserContextService.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserContextService.java @@ -124,11 +124,11 @@ public class UserContextService { // New password must be different from old password if (newPassword.equals(credentials.getPassword())) - throw new GuacamoleClientException("The new password must be different from the expired password."); + throw new GuacamoleClientException("LOGIN.ERROR_PASSWORD_SAME"); // New password must not be blank if (newPassword.isEmpty()) - throw new GuacamoleClientException("The new password may not be blank."); + throw new GuacamoleClientException("LOGIN.ERROR_PASSWORD_BLANK"); // STUB: Change password if new password given logger.info("Resetting expired password of user \"{}\".", user.getIdentifier()); diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/en.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/en.json index adeadf508..2a4098d9a 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/en.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/en.json @@ -1,4 +1,10 @@ { + + "LOGIN" : { + "ERROR_PASSWORD_BLANK" : "@:APP.ERROR_PASSWORD_BLANK", + "ERROR_PASSWORD_SAME" : "The new password must be different from the expired password." + }, + "USER_ATTRIBUTES" : { "FIELD_HEADER_DISABLED" : "Login disabled:", @@ -7,4 +13,5 @@ "SECTION_HEADER_RESTRICTIONS" : "Account Restrictions" } + } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ru_RU.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ru_RU.json new file mode 100644 index 000000000..30a0c2ad6 --- /dev/null +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ru_RU.json @@ -0,0 +1,7 @@ +{ + + "LOGIN" : { + "ERROR_PASSWORD_BLANK" : "@:APP.ERROR_PASSWORD_BLANK" + } + +} diff --git a/guacamole/src/main/webapp/translations/en.json b/guacamole/src/main/webapp/translations/en.json index 1027a45fb..5a761501f 100644 --- a/guacamole/src/main/webapp/translations/en.json +++ b/guacamole/src/main/webapp/translations/en.json @@ -23,6 +23,7 @@ "DIALOG_HEADER_ERROR" : "Error", + "ERROR_PASSWORD_BLANK" : "Your password cannot be blank.", "ERROR_PASSWORD_MISMATCH" : "The provided passwords do not match.", "FIELD_HEADER_PASSWORD" : "Password:", @@ -435,7 +436,7 @@ "DIALOG_HEADER_ERROR" : "@:APP.DIALOG_HEADER_ERROR", - "ERROR_PASSWORD_BLANK" : "Your password cannot be blank.", + "ERROR_PASSWORD_BLANK" : "@:APP.ERROR_PASSWORD_BLANK", "ERROR_PASSWORD_MISMATCH" : "@:APP.ERROR_PASSWORD_MISMATCH", "FIELD_HEADER_LANGUAGE" : "Display language:", diff --git a/guacamole/src/main/webapp/translations/ru.json b/guacamole/src/main/webapp/translations/ru.json index 05096ba5a..dd3947b83 100644 --- a/guacamole/src/main/webapp/translations/ru.json +++ b/guacamole/src/main/webapp/translations/ru.json @@ -23,6 +23,7 @@ "DIALOG_HEADER_ERROR" : "Ошибка", + "ERROR_PASSWORD_BLANK" : "Пароль не может быть пустым.", "ERROR_PASSWORD_MISMATCH" : "Указанные пароли не совпадают.", "FIELD_HEADER_PASSWORD" : "Пароль:", @@ -414,7 +415,7 @@ "DIALOG_HEADER_ERROR" : "@:APP.DIALOG_HEADER_ERROR", - "ERROR_PASSWORD_BLANK" : "Пароль не может быть пустым.", + "ERROR_PASSWORD_BLANK" : "@:APP.ERROR_PASSWORD_BLANK", "ERROR_PASSWORD_MISMATCH" : "@:APP.ERROR_PASSWORD_MISMATCH", "FIELD_HEADER_LANGUAGE" : "Язык:",