#1055 Remove multiple "please register" messages

Part 1:
- Use only one message entry for "Please register", that may have to be adapted to reflect the proper /register arguments
- Remove other message entries from code and from the messages files

Breaking change: reg_email_msg is also removed
This commit is contained in:
ljacqu
2017-01-07 09:01:03 +01:00
parent 044e3e3845
commit 385f7d6b1d
39 changed files with 13 additions and 295 deletions
@@ -1,9 +1,6 @@
package fr.xephi.authme.util;
import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.process.register.RegisterSecondaryArgument;
import fr.xephi.authme.process.register.RegistrationType;
import java.util.regex.Pattern;
@@ -62,30 +59,4 @@ public final class Utils {
return Runtime.getRuntime().availableProcessors();
}
/**
* Returns the proper message key for the given registration types.
*
* @param registrationType the registration type
* @param secondaryArgType secondary argument type for the register command
* @return the message key
*/
// TODO #1037: Remove this method
public static MessageKey getRegisterMessage(RegistrationType registrationType,
RegisterSecondaryArgument secondaryArgType) {
if (registrationType == RegistrationType.PASSWORD) {
if (secondaryArgType == RegisterSecondaryArgument.CONFIRMATION) {
return MessageKey.REGISTER_MESSAGE;
} else if (secondaryArgType == RegisterSecondaryArgument.NONE) {
return MessageKey.REGISTER_NO_REPEAT_MESSAGE;
} else { /* EMAIL_MANDATORY || EMAIL_OPTIONAL */
return MessageKey.REGISTER_PASSWORD_EMAIL_MESSAGE;
}
} else { /* registrationType == EMAIL */
if (secondaryArgType == RegisterSecondaryArgument.NONE) {
return MessageKey.REGISTER_EMAIL_NO_REPEAT_MESSAGE;
} else { /* CONFIRMATION || EMAIL_MANDATORY || EMAIL_OPTIONAL */
return MessageKey.REGISTER_EMAIL_MESSAGE;
}
}
}
}