#349 Add tags field to MessageKey, add test to verify presence in files
This commit is contained in:
@@ -79,7 +79,7 @@ public enum MessageKey {
|
||||
|
||||
INVALID_NAME_LENGTH("name_len"),
|
||||
|
||||
INVALID_NAME_CHARACTERS("regex"),
|
||||
INVALID_NAME_CHARACTERS("regex", "REG_EX"),
|
||||
|
||||
ADD_EMAIL_MESSAGE("add_email"),
|
||||
|
||||
@@ -87,7 +87,7 @@ public enum MessageKey {
|
||||
|
||||
USAGE_CAPTCHA("usage_captcha"),
|
||||
|
||||
CAPTCHA_WRONG_ERROR("wrong_captcha"),
|
||||
CAPTCHA_WRONG_ERROR("wrong_captcha", "THE_CAPTCHA"),
|
||||
|
||||
CAPTCHA_SUCCESS("valid_captcha"),
|
||||
|
||||
@@ -119,16 +119,32 @@ public enum MessageKey {
|
||||
|
||||
ANTIBOT_AUTO_ENABLED_MESSAGE("antibot_auto_enabled"),
|
||||
|
||||
ANTIBOT_AUTO_DISABLED_MESSAGE("antibot_auto_disabled");
|
||||
ANTIBOT_AUTO_DISABLED_MESSAGE("antibot_auto_disabled", "%m");
|
||||
|
||||
|
||||
private String key;
|
||||
private String[] tags;
|
||||
|
||||
MessageKey(String key) {
|
||||
MessageKey(String key, String... tags) {
|
||||
this.key = key;
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the key used in the messages file.
|
||||
*
|
||||
* @return The key
|
||||
*/
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of tags (texts) that are replaced with actual content in AuthMe.
|
||||
*
|
||||
* @return List of tags
|
||||
*/
|
||||
public String[] getTags() {
|
||||
return tags;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ user_regged: '&cYou already have registered this username!'
|
||||
usage_reg: '&cUsage: /register <password> <ConfirmPassword>'
|
||||
max_reg: '&cYou have exceeded the maximum number of registrations for your connection!'
|
||||
no_perm: '&4You don''t have the permission to perform this action!'
|
||||
error: '&4An unexpected error occurred, please contact an Administrator!'
|
||||
error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
login_msg: '&cPlease, login with the command "/login <password>"'
|
||||
reg_msg: '&3Please, register to the server with the command "/register <password> <ConfirmPassword>"'
|
||||
reg_email_msg: '&3Please, register to the server with the command "/register <email> <confirmEmail>"'
|
||||
@@ -39,20 +39,20 @@ regex: '&4Your username contains illegal characters. Allowed chars: REG_EX'
|
||||
add_email: '&3Please add your email to your account with the command "/email add <yourEmail> <confirmEmail>"'
|
||||
recovery_email: '&3Forgot your password? Please use the command "/email recovery <yourEmail>"'
|
||||
usage_captcha: '&3To login you have to solve a captcha code, please use the command "/captcha <theCaptcha>"'
|
||||
wrong_captcha: '&cWrong Captcha, please type "/captcha THE_CAPTCHA" into the chat!'
|
||||
wrong_captcha: '&cWrong captcha, please type "/captcha THE_CAPTCHA" into the chat!'
|
||||
valid_captcha: '&2Captcha code solved correctly!'
|
||||
kick_forvip: '&3A VIP Player has joined the server when it was full!'
|
||||
kick_forvip: '&3A VIP player has joined the server when it was full!'
|
||||
kick_fullserver: '&4The server is full, try again later!'
|
||||
usage_email_add: '&cUsage: /email add <email> <confirmEmail>'
|
||||
usage_email_change: '&cUsage: /email change <oldEmail> <newEmail>'
|
||||
usage_email_recovery: '&cUsage: /email recovery <Email>'
|
||||
new_email_invalid: '&cInvalid New Email, try again!'
|
||||
old_email_invalid: '&cInvalid Old Email, try again!'
|
||||
email_invalid: '&cInvalid Email address, try again!'
|
||||
new_email_invalid: '&cInvalid new email, try again!'
|
||||
old_email_invalid: '&cInvalid old email, try again!'
|
||||
email_invalid: '&cInvalid email address, try again!'
|
||||
email_added: '&2Email address successfully added to your account!'
|
||||
email_confirm: '&cPlease confirm your email address!'
|
||||
email_changed: '&2Email address changed correctly!'
|
||||
email_send: '&2Recovery email sent correctly! Check your email inbox!'
|
||||
email_send: '&2Recovery email sent successfully! Please check your email inbox!'
|
||||
email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
|
||||
country_banned: '&4Your country is banned from this server!'
|
||||
antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!'
|
||||
|
||||
Reference in New Issue
Block a user