#1467 Rearrange old keys migration so no entries get lost
- 'error' was an old entry but now we have multiple entries under 'error' (which is now a section), so we need to ensure that we migrate the old 'error' entry before the migration sets anything under that path
This commit is contained in:
parent
f44353ed4c
commit
1d6d9eb764
@ -27,7 +27,11 @@ public class MessageUpdater {
|
||||
/**
|
||||
* Configuration data object for all message keys incl. comments associated to sections.
|
||||
*/
|
||||
public static final ConfigurationData CONFIGURATION_DATA = buildConfigurationData();
|
||||
private static final ConfigurationData CONFIGURATION_DATA = buildConfigurationData();
|
||||
|
||||
public static ConfigurationData getConfigurationData() {
|
||||
return CONFIGURATION_DATA;
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies any necessary migrations to the user's messages file and saves it if it has been modified.
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package fr.xephi.authme.message.updater;
|
||||
|
||||
import ch.jalu.configme.resource.PropertyResource;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import fr.xephi.authme.message.MessageKey;
|
||||
|
||||
@ -15,16 +16,11 @@ import static com.google.common.collect.ImmutableMap.of;
|
||||
*/
|
||||
final class OldMessageKeysMigrater {
|
||||
|
||||
private static final Map<MessageKey, Map<String, String>> PLACEHOLDER_REPLACEMENTS =
|
||||
ImmutableMap.<MessageKey, Map<String, String>>builder()
|
||||
.put(MessageKey.PASSWORD_CHARACTERS_ERROR, of("REG_EX", "%valid_chars"))
|
||||
.put(MessageKey.INVALID_NAME_CHARACTERS, of("REG_EX", "%valid_chars"))
|
||||
.put(MessageKey.USAGE_CAPTCHA, of("<theCaptcha>", "%captcha_code"))
|
||||
.put(MessageKey.CAPTCHA_FOR_REGISTRATION_REQUIRED, of("<theCaptcha>", "%captcha_code"))
|
||||
.put(MessageKey.CAPTCHA_WRONG_ERROR, of("THE_CAPTCHA", "%captcha_code"))
|
||||
.build();
|
||||
|
||||
private static final Map<MessageKey, String> KEYS_TO_OLD_PATH = ImmutableMap.<MessageKey, String>builder()
|
||||
@VisibleForTesting
|
||||
static final Map<MessageKey, String> KEYS_TO_OLD_PATH = ImmutableMap.<MessageKey, String>builder()
|
||||
.put(MessageKey.LOGIN_SUCCESS, "login")
|
||||
.put(MessageKey.ERROR, "error")
|
||||
.put(MessageKey.DENIED_COMMAND, "denied_command")
|
||||
.put(MessageKey.SAME_IP_ONLINE, "same_ip_online")
|
||||
.put(MessageKey.DENIED_CHAT, "denied_chat")
|
||||
@ -36,11 +32,9 @@ final class OldMessageKeysMigrater {
|
||||
.put(MessageKey.UNREGISTERED_SUCCESS, "unregistered")
|
||||
.put(MessageKey.REGISTRATION_DISABLED, "reg_disabled")
|
||||
.put(MessageKey.SESSION_RECONNECTION, "valid_session")
|
||||
.put(MessageKey.LOGIN_SUCCESS, "login")
|
||||
.put(MessageKey.ACCOUNT_NOT_ACTIVATED, "vb_nonActiv")
|
||||
.put(MessageKey.NAME_ALREADY_REGISTERED, "user_regged")
|
||||
.put(MessageKey.NO_PERMISSION, "no_perm")
|
||||
.put(MessageKey.ERROR, "error")
|
||||
.put(MessageKey.LOGIN_MESSAGE, "login_msg")
|
||||
.put(MessageKey.REGISTER_MESSAGE, "reg_msg")
|
||||
.put(MessageKey.MAX_REGISTER_EXCEEDED, "max_reg")
|
||||
@ -121,6 +115,15 @@ final class OldMessageKeysMigrater {
|
||||
.put(MessageKey.DAYS, "days")
|
||||
.build();
|
||||
|
||||
private static final Map<MessageKey, Map<String, String>> PLACEHOLDER_REPLACEMENTS =
|
||||
ImmutableMap.<MessageKey, Map<String, String>>builder()
|
||||
.put(MessageKey.PASSWORD_CHARACTERS_ERROR, of("REG_EX", "%valid_chars"))
|
||||
.put(MessageKey.INVALID_NAME_CHARACTERS, of("REG_EX", "%valid_chars"))
|
||||
.put(MessageKey.USAGE_CAPTCHA, of("<theCaptcha>", "%captcha_code"))
|
||||
.put(MessageKey.CAPTCHA_FOR_REGISTRATION_REQUIRED, of("<theCaptcha>", "%captcha_code"))
|
||||
.put(MessageKey.CAPTCHA_WRONG_ERROR, of("THE_CAPTCHA", "%captcha_code"))
|
||||
.build();
|
||||
|
||||
private OldMessageKeysMigrater() {
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cКоманда: /login парола'
|
||||
wrong_password: '&cГрешна парола!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Успешен вход!'
|
||||
login_request: '&cМоля влезте с: /login парола'
|
||||
timeout_error: '&4Времето за вход изтече, беше кикнат от сървъра. Моля опитайте отново!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cПотребителското име не е регистрирано!'
|
||||
not_logged_in: '&cНе си влязъл!'
|
||||
no_permission: '&4Нямаш нужните права за това действие!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4Получи се неочаквана грешка, моля свържете се с администратора!'
|
||||
max_registration: '&cТи си достигнал максималният брой регистрации (%reg_count/%max_acc %reg_names)!'
|
||||
logged_in: '&cВече си вписан!'
|
||||
kick_for_vip: '&3VIP потребител влезе докато сървъра беше пълен, ти беше изгонен!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'час'
|
||||
hours: 'часа'
|
||||
day: 'ден'
|
||||
days: 'дена'
|
||||
days: 'дена'
|
||||
|
||||
@ -24,7 +24,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cUse: /login <senha>'
|
||||
wrong_password: '&cSenha incorreta!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Login realizado com sucesso!'
|
||||
login_request: '&cPor favor, faça o login com o comando "/login <senha>"'
|
||||
timeout_error: '&4Tempo limite de sessão excedido, você foi expulso do servidor, por favor, tente novamente!'
|
||||
|
||||
@ -35,7 +35,7 @@ error:
|
||||
unregistered_user: '&cEste usuário não está registrado!'
|
||||
not_logged_in: '&cVocê não está logado!'
|
||||
no_permission: '&4Você não tem permissão para executar esta ação!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4Ocorreu um erro inesperado, por favor contacte um administrador!'
|
||||
max_registration: '&cVocê excedeu o número máximo de inscrições (%reg_count/%max_acc %reg_names) do seu IP!'
|
||||
logged_in: '&cVocê já está logado!'
|
||||
kick_for_vip: '&3Um jogador VIP juntou-se ao servidor enquanto ele estava cheio!'
|
||||
@ -137,4 +137,4 @@ time:
|
||||
hour: 'hora'
|
||||
hours: 'horas'
|
||||
day: 'dia'
|
||||
days: 'dias'
|
||||
days: 'dias'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cPoužij: "/login TvojeHeslo".'
|
||||
wrong_password: '&cŠpatné heslo.'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&cÚspěšně přihlášen!'
|
||||
login_request: '&cProsím přihlaš se pomocí "/login TvojeHeslo".'
|
||||
timeout_error: '&cČas pro přihlášení vypršel!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cUživatelské jméno není zaregistrováno.'
|
||||
not_logged_in: '&cNejsi přihlášený!'
|
||||
no_permission: '&cNa tento příkaz nemáš dostatečné pravomoce.'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&cVyskytla se chyba - kontaktujte prosím administrátora ...'
|
||||
max_registration: '&cPřekročil(a) jsi limit pro počet účtů (%reg_count/%max_acc %reg_names) z jedné IP adresy.'
|
||||
logged_in: '&cJsi již přihlášen!'
|
||||
kick_for_vip: '&cOmlouváme se, ale VIP hráč se připojil na plný server!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'hodiny'
|
||||
hours: 'hodin'
|
||||
day: 'dny'
|
||||
days: 'dnu'
|
||||
days: 'dnu'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cBenutze: /login <passwort>'
|
||||
wrong_password: '&cFalsches Passwort'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Successful login!'
|
||||
login_request: '&cBitte logge dich ein mit "/login <passwort>"'
|
||||
timeout_error: '&4Zeitüberschreitung beim Login'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cBenutzername nicht registriert!'
|
||||
not_logged_in: '&cNicht eingeloggt!'
|
||||
no_permission: '&4Du hast keine Rechte, um diese Aktion auszuführen!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4Ein Fehler ist aufgetreten. Bitte kontaktiere einen Administrator.'
|
||||
max_registration: '&cDu hast die maximale Anzahl an Accounts erreicht (%reg_count/%max_acc %reg_names).'
|
||||
logged_in: '&cBereits eingeloggt!'
|
||||
kick_for_vip: '&3Ein VIP-Spieler hat den vollen Server betreten!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'Stunde'
|
||||
hours: 'Stunden'
|
||||
day: 'Tag'
|
||||
days: 'Tage'
|
||||
days: 'Tage'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cUzado: /login <pasvorto>'
|
||||
wrong_password: '&cErara pasvorto!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Sukcesa ensaluto!'
|
||||
login_request: '&cBonvolu ensaluti per la komando: /login <pasvorto>'
|
||||
timeout_error: '&4Salutnomo tempolimo superis, vi estis piedbatita el la servilo, bonvolu provi denove!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cTiu uzanto ne estas registrita!'
|
||||
not_logged_in: '&cVi ne estas ensalutita!'
|
||||
no_permission: '&4Vi ne havas la permeson por fari ĉi tiun funkcion!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4Neatendita eraro, bonvolu kontakti administranto!'
|
||||
max_registration: 'Vi superis la maksimuman nombron de enregistroj (%reg_count/%max_acc %reg_names) pro via ligo!'
|
||||
logged_in: '&cVi jam estas ensalutinta!'
|
||||
kick_for_vip: '&3VIP ludanto aliĝis al la servilo kiam ĝi pleniĝis!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'horo'
|
||||
hours: 'horoj'
|
||||
day: 'tago'
|
||||
days: 'tagoj'
|
||||
days: 'tagoj'
|
||||
|
||||
@ -22,7 +22,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cUso: /login contraseña'
|
||||
wrong_password: '&cContraseña incorrecta'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&c¡Sesión iniciada!'
|
||||
login_request: '&cInicia sesión con "/login contraseña"'
|
||||
timeout_error: '&fTiempo de espera para inicio de sesión excedido'
|
||||
|
||||
@ -33,7 +33,7 @@ error:
|
||||
unregistered_user: '&cUsuario no registrado'
|
||||
not_logged_in: '&c¡No has iniciado sesión!'
|
||||
no_permission: '&cNo tienes permiso'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&fHa ocurrido un error. Por favor contacta al administrador.'
|
||||
max_registration: '&fHas excedido la cantidad máxima de registros para tu cuenta'
|
||||
logged_in: '&c¡Ya has iniciado sesión!'
|
||||
kick_for_vip: '&c¡Un jugador VIP ha ingresado al servidor lleno!'
|
||||
@ -135,4 +135,4 @@ time:
|
||||
hour: 'hora'
|
||||
hours: 'horas'
|
||||
day: 'día'
|
||||
days: 'días'
|
||||
days: 'días'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cKasutus: /login <Parool>'
|
||||
wrong_password: '&cVale salasõna!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Edukalt sisselogitud!'
|
||||
login_request: '&cPalun logi sisse kasutades käsklust: /login <Parool>'
|
||||
timeout_error: '&4Sisselogimise taimer täis, palun logi sisse ja proovi uuesti!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cSee kasutaja ei ole registreeritud.'
|
||||
not_logged_in: '&cSa ei ole sisse loginud!'
|
||||
no_permission: '&4Sul ei ole selle käskluse kasutamiseks õigust.'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4Süsteemi viga, teata sellest serveri meeskonda.'
|
||||
max_registration: '&cSu IP peal (%reg_count/%max_acc %reg_names) on liiga palju kontosid!'
|
||||
logged_in: '&cJuba sisselogitud!'
|
||||
kick_for_vip: '&3VIP kasutaja liitus serveriga, kui see oli täis. Sind visati välja, et talle ruumi teha.'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'tund'
|
||||
hours: 'tundi'
|
||||
day: 'päev'
|
||||
days: 'päeva'
|
||||
days: 'päeva'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cErabili: /login pasahitza'
|
||||
wrong_password: '&cPasahitz okerra'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&cOngi etorri!'
|
||||
login_request: '&cMesedez erabili "/login pasahitza" saioa hasteko'
|
||||
timeout_error: '&fDenbora gehiegi egon zara saioa hasi gabe'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cErabiltzailea ez dago erregistratuta'
|
||||
not_logged_in: '&cSaioa hasi gabe!'
|
||||
no_permission: '&cBaimenik ez'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&fErrorea; Mesedez jarri kontaktuan administratzaile batekin'
|
||||
max_registration: '&fKontuko 2 erabiltzaile bakarrik izan ditzakezu'
|
||||
logged_in: '&cDagoeneko saioa hasita!'
|
||||
kick_for_vip: '&cVIP erabiltzaile bat sartu da zerbitzaria beteta zegoenean!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
# TODO hour: 'hour'
|
||||
# TODO hours: 'hours'
|
||||
# TODO day: 'day'
|
||||
# TODO days: 'days'
|
||||
# TODO days: 'days'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cKäyttötapa: /login salasana'
|
||||
wrong_password: '&cVäärä salasana'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&cKirjauduit onnistuneesti'
|
||||
login_request: '&cKirjaudu palvelimmelle komennolla "/login salasana"'
|
||||
timeout_error: '&fKirjautumisaika meni umpeen.'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cSalasanat eivät täsmää'
|
||||
not_logged_in: '&cEt ole kirjautunut sisään!'
|
||||
no_permission: '&cEi oikeuksia'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&fVirhe: Ota yhteys palveluntarjoojaan!'
|
||||
max_registration: '&fSinulla ei ole oikeuksia tehdä enempää pelaajatilejä!'
|
||||
logged_in: '&cOlet jo kirjautunut!'
|
||||
kick_for_vip: '&cVIP pelaaja liittyi täyteen palvelimeen!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
# TODO hour: 'hour'
|
||||
# TODO hours: 'hours'
|
||||
# TODO day: 'day'
|
||||
# TODO days: 'days'
|
||||
# TODO days: 'days'
|
||||
|
||||
@ -25,7 +25,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cUsage: /login <MotDePasse>'
|
||||
wrong_password: '&cMauvais mot de passe !'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&aConnexion effectuée !'
|
||||
login_request: '&cPour vous connecter, utilisez "/login <MotDePasse>"'
|
||||
timeout_error: 'Vous avez été expulsé car vous êtes trop lent pour vous enregistrer/connecter !'
|
||||
|
||||
@ -36,7 +36,7 @@ error:
|
||||
unregistered_user: '&cUtilisateur non-inscrit.'
|
||||
not_logged_in: '&cUtilisateur non connecté !'
|
||||
no_permission: '&cVous n''êtes pas autorisé à utiliser cette commande.'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&cUne erreur est apparue, veuillez contacter un administrateur.'
|
||||
max_registration: 'Vous avez atteint la limite d''inscription !%nl%&cVous avez %reg_count sur %max_acc : %reg_names'
|
||||
logged_in: '&aVous êtes déjà connecté.'
|
||||
kick_for_vip: 'Un joueur VIP a rejoint le serveur à votre place (serveur plein).'
|
||||
@ -138,4 +138,4 @@ time:
|
||||
hour: 'heure'
|
||||
hours: 'heures'
|
||||
day: 'jour'
|
||||
days: 'jours'
|
||||
days: 'jours'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cUso: /login <contrasinal>'
|
||||
wrong_password: '&cContrasinal equivocado'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&cIdentificación con éxito!'
|
||||
login_request: '&cPor favor, identifícate con "/login <password>"'
|
||||
timeout_error: '&fRematou o tempo da autentificación'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cEse nome de usuario non está rexistrado'
|
||||
not_logged_in: '&cNon te identificaches!'
|
||||
no_permission: '&cNon tes o permiso'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&fOcurriu un erro; contacta cun administrador'
|
||||
max_registration: '&fExcediches o máximo de rexistros para a túa Conta'
|
||||
logged_in: '&cXa estás identificado!'
|
||||
kick_for_vip: '&cUn xogador VIP uniuse ao servidor cheo!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
# TODO hour: 'hour'
|
||||
# TODO hours: 'hours'
|
||||
# TODO day: 'day'
|
||||
# TODO days: 'days'
|
||||
# TODO days: 'days'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cBejelentkezés: "&7/login <jelszó>&c".'
|
||||
wrong_password: '&4A jelszó helytelen!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&aSikeresen beléptél!'
|
||||
login_request: '&cKérlek, jelentkezz be: "&7/login <jelszó>&c"!'
|
||||
timeout_error: 'Bejelentkezési időtúllépés!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cEz a felhasználó nincs regisztrálva!'
|
||||
not_logged_in: '&cNem vagy bejelentkezve!'
|
||||
no_permission: '&cNincs jogosultságod a használatára!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&cHiba lépett fel! Lépj kapcsolatba a szerver tulajával!'
|
||||
max_registration: '&cElérted a maximálisan beregisztrálható karakterek számát. (%reg_count/%max_acc %reg_names)'
|
||||
logged_in: '&cMár be vagy jelentkezve!'
|
||||
kick_for_vip: '&3VIP játékos csatlakozott a szerverhez!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'óra'
|
||||
hours: 'óra'
|
||||
day: 'nap'
|
||||
days: 'nap'
|
||||
days: 'nap'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cUsage: /login <password>'
|
||||
wrong_password: '&cPassword salah!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Login berhasil!'
|
||||
login_request: '&cSilahkan login menggunakan command "/login <password>"'
|
||||
timeout_error: '&4Jangka waktu login telah habis, kamu di keluarkan dari server. Silahkan coba lagi!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cUser ini belum terdaftar!'
|
||||
not_logged_in: '&cKamu belum login!'
|
||||
no_permission: '&4Kamu tidak mempunyai izin melakukan ini!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4Terjadi kesalahan tak dikenal, silahkan hubungi Administrator!'
|
||||
max_registration: '&Kamu telah mencapai batas maksimum pendaftaran di server ini!'
|
||||
logged_in: '&cKamu telah login!'
|
||||
kick_for_vip: '&3Player VIP mencoba masuk pada saat server sedang penuh!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
# TODO hour: 'hour'
|
||||
# TODO hours: 'hours'
|
||||
# TODO day: 'day'
|
||||
# TODO days: 'days'
|
||||
# TODO days: 'days'
|
||||
|
||||
@ -22,7 +22,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cUtilizzo: /login <password>'
|
||||
wrong_password: '&cPassword non corretta!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Autenticazione eseguita correttamente!'
|
||||
login_request: '&cPer favore, esegui l''autenticazione con il comando: /login <password>'
|
||||
timeout_error: '&4Tempo scaduto per eseguire l''autenticazione, sei stato espulso dal server, per favore riprova!'
|
||||
|
||||
@ -33,7 +33,7 @@ error:
|
||||
unregistered_user: '&cL''utente non ha ancora eseguito la registrazione.'
|
||||
not_logged_in: '&cNon hai ancora eseguito l''autenticazione!'
|
||||
no_permission: '&4Non hai il permesso di eseguire questa operazione.'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4Qualcosa è andato storto, riporta questo errore ad un amministratore!'
|
||||
max_registration: '&cHai raggiunto il numero massimo di registrazioni (%reg_count/%max_acc %reg_names) per questo indirizzo IP!'
|
||||
logged_in: '&cHai già eseguito l''autenticazione, non è necessario eseguirla nuovamente!'
|
||||
kick_for_vip: '&3Un utente VIP è entrato mentre il server era pieno e ha preso il tuo posto!'
|
||||
@ -135,4 +135,4 @@ time:
|
||||
hour: 'ora'
|
||||
hours: 'ore'
|
||||
day: 'giorno'
|
||||
days: 'giorni'
|
||||
days: 'giorni'
|
||||
|
||||
@ -23,7 +23,7 @@ password:
|
||||
login:
|
||||
command_usage: '&c사용법: /login <비밀번호>'
|
||||
wrong_password: '&c비밀번호가 잘못되었습니다!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2로그인 되었습니다!'
|
||||
login_request: '&c다음 명령어로 로그인 해주세요: /login <비밀번호>'
|
||||
timeout_error: '&4로그인 시간이 초과 되어 서버에서 추방당했습니다. 다시 시도하세요!'
|
||||
|
||||
@ -34,7 +34,7 @@ error:
|
||||
unregistered_user: '&c이 유저는 등록되지 않았습니다!'
|
||||
not_logged_in: '&c로그인이 되어있지 않습니다!'
|
||||
no_permission: '&4이 작업을 수행할 수 있는 권한이 없습니다!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4예기치 않은 오류가 발생했습니다, 관리자에게 알려주세요!'
|
||||
max_registration: '&c당신은 가입할 수 있는 계정 한도를 초과했습니다 (%reg_count/%max_acc %reg_names)!'
|
||||
logged_in: '&c이미 로그인되어 있습니다!'
|
||||
kick_for_vip: '&3서버가 꽉 차있을땐 VIP 플레이어만 접속이 가능합니다!'
|
||||
@ -136,4 +136,4 @@ time:
|
||||
hour: '시간'
|
||||
hours: '시간'
|
||||
day: '일'
|
||||
days: '일'
|
||||
days: '일'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&eKomandos panaudojimas: /login slaptazodis'
|
||||
wrong_password: '&cNeteisingas slaptazosdis'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&aSekmingai prisijungete'
|
||||
login_request: '&ePrasome prisijungti: /login slaptazodis'
|
||||
timeout_error: '&cNespejote prisijungti'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cVartotojas neprisiregistraves'
|
||||
not_logged_in: '&cTu neprisijunges!'
|
||||
no_permission: '&cNera leidimo'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&cAtsirado klaida, praneskite adminstratoriui.'
|
||||
max_registration: '&cJus pasiekete maksimalu registraciju skaiciu.'
|
||||
logged_in: '&cTu aju prisijunges!'
|
||||
kick_for_vip: '&cA VIP prisijunge i pilna serveri!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
# TODO hour: 'hour'
|
||||
# TODO hours: 'hours'
|
||||
# TODO day: 'day'
|
||||
# TODO days: 'days'
|
||||
# TODO days: 'days'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cGebruik: /login <wachtwoord>'
|
||||
wrong_password: '&cFout wachtwoord'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&cSuccesvol ingelogd!'
|
||||
login_request: '&cLog in met: /login <wachtwoord>'
|
||||
timeout_error: 'Login time-out: het duurde te lang tot je inlogde.'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cDeze gebruikersnaam is niet geregistreerd!'
|
||||
not_logged_in: '&cNiet ingelogd!'
|
||||
no_permission: '&cJe hebt geen rechten om deze actie uit te voeren!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: 'Er is een onverwachte fout opgetreden, neem contact op met een administrator!'
|
||||
max_registration: 'Je hebt het maximum aantal registraties overschreden (%reg_count/%max_acc: %reg_names).'
|
||||
logged_in: '&cJe bent al ingelogd!'
|
||||
kick_for_vip: '&cEen VIP-gebruiker heeft ingelogd toen de server vol was!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'uur'
|
||||
hours: 'uren'
|
||||
day: 'dag'
|
||||
days: 'dagen'
|
||||
days: 'dagen'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cUżycie: /login hasło'
|
||||
wrong_password: '&cNiepoprawne hasło.'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&aHasło zaakceptowane!'
|
||||
login_request: '&2Proszę się zalogować przy użyciu &6/login <hasło>'
|
||||
timeout_error: '&cUpłynął limit czasu zalogowania'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&fGracz nie jest zarejestrowany.'
|
||||
not_logged_in: '&4Nie jesteś zalogowany!'
|
||||
no_permission: '&4Nie posiadasz wymaganych uprawnień.'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&fWystąpił błąd, prosimy skontaktować się z administracją serwera.'
|
||||
max_registration: '&cPrzekroczyłeś limit zarejestrowanych kont na serwerze &8(&e%reg_count/%max_acc %reg_names&8) &cdla twojego połączenia.'
|
||||
logged_in: '&fJesteś już zalogowany!'
|
||||
kick_for_vip: '&cGracz VIP dołączył do gry!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'godziny'
|
||||
hours: 'godzin'
|
||||
day: 'dzień'
|
||||
days: 'dni'
|
||||
days: 'dni'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cUse: /login <password>'
|
||||
wrong_password: '&cPassword errada!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&bAutenticado com sucesso!'
|
||||
login_request: '&cIdentifique-se com "/login <password>"'
|
||||
timeout_error: '&fExcedeu o tempo para autenticação'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cUsername não registado'
|
||||
not_logged_in: '&cNão autenticado!'
|
||||
no_permission: '&cSem Permissões'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&fOcorreu um erro; Por favor contacte um administrador'
|
||||
max_registration: '&cAtingiu o numero máximo de %reg_count contas registas, maximo de contas %max_acc'
|
||||
logged_in: '&cJá se encontra autenticado!'
|
||||
kick_for_vip: '&cUm jogador VIP entrou no servidor cheio!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'hora'
|
||||
hours: 'horas'
|
||||
day: 'dia'
|
||||
days: 'dias'
|
||||
days: 'dias'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cFoloseste comanda "/login <parola>" pentru a te autentifica.'
|
||||
wrong_password: '&cParola gresita!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Te-ai autentificat cu succes!'
|
||||
login_request: '&cTe rugam sa te autentifici folosind comanda "/login <parola>"'
|
||||
timeout_error: '&4A expirat timpul de autentificare si ai fost dat afara de server, te rugam incearca din nou!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cAcest jucator nu este inregistrat!'
|
||||
not_logged_in: '&cNu te-ai autentificat!'
|
||||
no_permission: '&4Nu ai permisiunea!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4A aparut o eroare, te rugam contacteaza un administrator!'
|
||||
max_registration: '&cTe-ai inregistrat cu prea multe conturi pe acelasi ip! (%reg_count/%max_acc %reg_names)'
|
||||
logged_in: '&cEsti deja autentificat!'
|
||||
kick_for_vip: '&3Un V.I.P a intrat pe server cand era plin!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'ora'
|
||||
hours: 'ore'
|
||||
day: 'zi'
|
||||
days: 'zile'
|
||||
days: 'zile'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cИспользование: /login <пароль>'
|
||||
wrong_password: '&cНеправильный пароль!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Вы успешно вошли!'
|
||||
login_request: '&3Авторизация: /login <Пароль>'
|
||||
timeout_error: '&4Время авторизации истекло.'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cИгрок с таким именем не зарегистрирован.'
|
||||
not_logged_in: '&cВы ещё не вошли!'
|
||||
no_permission: '&4Недостаточно прав.'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&cПроизошла ошибка. Свяжитесь с администратором.'
|
||||
max_registration: '&cПревышено максимальное количество регистраций на сервере! (%reg_count/%max_acc %reg_names)'
|
||||
logged_in: '&cВы уже авторизированы!'
|
||||
kick_for_vip: '&3VIP-игрок зашёл на переполненный сервер.'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'ч.'
|
||||
hours: 'ч.'
|
||||
day: 'дн.'
|
||||
days: 'дн.'
|
||||
days: 'дн.'
|
||||
|
||||
@ -27,7 +27,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cPoužitie: /login <heslo>'
|
||||
wrong_password: '&cZadal si zlé heslo.'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&cBol si úspešne prihlásený!'
|
||||
login_request: '&cPrihlás sa príkazom "/login <heslo>".'
|
||||
timeout_error: '&fVypršal čas na prihlásenie, pripoj sa a skús to znovu.'
|
||||
|
||||
@ -38,7 +38,7 @@ error:
|
||||
unregistered_user: '&cZadané meno nie je zaregistrované!'
|
||||
not_logged_in: '&cNie si ešte prihlásený!'
|
||||
no_permission: '&cNemáš dostatočné práva na vykonanie tejto činnosti.'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&fNastala chyba, prosím kontaktuj Administrátora.'
|
||||
max_registration: '&fPrekročil si maximum registrovaných účtov(%reg_count/%max_acc|%reg_names).'
|
||||
logged_in: '&cAktuálne si už prihlásený!'
|
||||
kick_for_vip: '&3Uvoľnil si miesto pre VIP hráča!'
|
||||
@ -140,4 +140,4 @@ time:
|
||||
hour: 'hod.'
|
||||
hours: 'hod.'
|
||||
day: 'd.'
|
||||
days: 'd.'
|
||||
days: 'd.'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cKullanim: /login <sifre>'
|
||||
wrong_password: '&cYanlis sifre!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Giris basarili!'
|
||||
login_request: '&cLutfen giris komutunu kullanin "/login <sifre>"'
|
||||
timeout_error: '&4Giris izni icin verilen zaman suresini astigin icin sunucudan atildin, tekrar deneyin!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cBu oyuncu kayitli degil!'
|
||||
not_logged_in: '&cGiris yapmadin!'
|
||||
no_permission: '&4Bunu yapmak icin iznin yok!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4Beklenmedik bir hata olustu, yetkili ile iletisime gecin!'
|
||||
max_registration: '&cSen maksimum kayit sinirini astin (%reg_count/%max_acc %reg_names)!'
|
||||
logged_in: '&cZaten giris yaptin!'
|
||||
kick_for_vip: '&3Bir VIP oyuna giris yaptigi icin atildin!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'saat'
|
||||
hours: 'saat'
|
||||
day: 'gun'
|
||||
days: 'gun'
|
||||
days: 'gun'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cСинтаксис: /login <пароль>'
|
||||
wrong_password: '&cНевірний пароль!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Успішна авторизація!'
|
||||
login_request: '&cДля авторизації, введіть команду "/login <пароль>"'
|
||||
timeout_error: '&4Час для авторизації сплинув. Будь ласка, спробуйте ще раз!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cЦей гравець не є зареєстрованим.'
|
||||
not_logged_in: '&cВи не авторизовані!'
|
||||
no_permission: '&4У вас недостатньо прав, щоб застосувати цю команду!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4[AuthMe] Error. Будь ласка, повідомте адміністратора!'
|
||||
max_registration: '&cВичерпано ліміт реєстрацій (%reg_count/%max_acc %reg_names) для вашого підключення!'
|
||||
logged_in: '&cВи вже авторизовані!'
|
||||
kick_for_vip: '&3Вас кікнуто, внаслідок того, що VIP гравець зайшов на сервер коли небуло вільних місць.'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
# TODO hour: 'hour'
|
||||
# TODO hours: 'hours'
|
||||
# TODO day: 'day'
|
||||
# TODO days: 'days'
|
||||
# TODO days: 'days'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&cSử dụng: /login <mật khẩu>'
|
||||
wrong_password: '&cSai mật khẩu!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2Đăng nhập thành công!'
|
||||
login_request: '&cXin vui lòng đăng nhập bằng lệnh "/login <mật khẩu>"'
|
||||
timeout_error: '&4Thời gian đăng nhập đã hết, bạn đã bị văng khỏi máy chủ. Xin vui lòng thử lại!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&cNgười dùng này đã được đăng ký!'
|
||||
not_logged_in: '&cBạn chưa đăng nhập!'
|
||||
no_permission: '&4Bạn không có quyền truy cập lệnh này!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4Lỗi! Vui lòng liên hệ quản trị viên hoặc admin'
|
||||
max_registration: '&cBạn đã vượt quá giới hạn tối đa đăng ký tài khoản (%reg_count/%max_acc %reg_names) cho những lần kết nối tài khoản!'
|
||||
logged_in: '&cBạn đã đăng nhập!'
|
||||
kick_for_vip: '&eChỉ có thành viên VIP mới được tham gia khi máy chủ đầy!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: 'giờ'
|
||||
hours: 'giờ'
|
||||
day: 'ngày'
|
||||
days: 'ngày'
|
||||
days: 'ngày'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&8[&6玩家系统&8] &c正确用法:“/login <密码>”'
|
||||
wrong_password: '&8[&6玩家系统&8] &c错误的密码'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&8[&6玩家系统&8] &c已成功登录!'
|
||||
login_request: '&8[&6玩家系统&8] &c请输入“/login <密码>”以登录'
|
||||
timeout_error: '&8[&6玩家系统&8] &f给你登录的时间已经过了'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&8[&6玩家系统&8] &c此用户名还未注册过'
|
||||
not_logged_in: '&8[&6玩家系统&8] &c你还未登录!'
|
||||
no_permission: '&8[&6玩家系统&8] &c没有权限'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&8[&6玩家系统&8] &f发现错误,请联系管理员'
|
||||
max_registration: '&8[&6玩家系统&8] &f你不允许再为你的IP在服务器注册更多用户了!'
|
||||
logged_in: '&8[&6玩家系统&8] &c你已经登陆过了!'
|
||||
kick_for_vip: '&8[&6玩家系统&8] &cA VIP玩家加入了已满的服务器!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
hour: '小时'
|
||||
hours: '小时'
|
||||
day: '天'
|
||||
days: '天'
|
||||
days: '天'
|
||||
|
||||
@ -24,7 +24,7 @@ password:
|
||||
login:
|
||||
command_usage: '&8[&6用戶系統&8] &f用法:《 /login <密碼> 》'
|
||||
wrong_password: '&8[&6用戶系統&8] &c你輸入了錯誤的密碼。'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&8[&6用戶系統&8] &a你成功登入了。'
|
||||
login_request: '&8[&6用戶系統&8] &c請使用這個指令來登入:《 /login <密碼> 》'
|
||||
timeout_error: '&8[&6用戶系統&8] &f登入逾時。'
|
||||
|
||||
@ -35,7 +35,7 @@ error:
|
||||
unregistered_user: '&8[&6用戶系統&8] &c此用戶名沒有已登記資料。'
|
||||
not_logged_in: '&8[&6用戶系統&8] &c你還沒有登入 !'
|
||||
no_permission: '&8[&6用戶系統&8] &b嗯~你想幹甚麼?'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&8[&6用戶系統&8] &f發生錯誤,請與管理員聯絡。'
|
||||
max_registration: '&8[&6用戶系統&8] &f你的IP地址已達到註冊數上限。 &7(info: %reg_count/%max_acc %reg_names)'
|
||||
logged_in: '&8[&6用戶系統&8] &c你已經登入過了。'
|
||||
kick_for_vip: '&c喔!因為有VIP玩家登入了伺服器。'
|
||||
@ -137,4 +137,4 @@ time:
|
||||
hour: '小時'
|
||||
hours: '小時'
|
||||
day: '日'
|
||||
days: '日'
|
||||
days: '日'
|
||||
|
||||
@ -20,7 +20,7 @@ password:
|
||||
login:
|
||||
command_usage: '&b使用方法: 輸入"/login [你的密碼]" 來登入'
|
||||
wrong_password: '&c密碼錯誤!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&2你已成功登入!'
|
||||
login_request: '&c [請先登入] 請按T , 然後輸入 "/login [你的密碼]" 。'
|
||||
timeout_error: '&4超過登錄超時,您已從伺服器中踢出,請重試!'
|
||||
|
||||
@ -31,7 +31,7 @@ error:
|
||||
unregistered_user: '&c此用戶尚未注冊!'
|
||||
not_logged_in: '&c你尚未登入!'
|
||||
no_permission: '&4您沒有執行此操作的權限!'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&4發生錯誤!請聯繫伺服器管理員!'
|
||||
max_registration: '&c您已超過註冊的最大數量(%reg_count/%max_acc %reg_names)!'
|
||||
logged_in: '&c您已經登錄!'
|
||||
kick_for_vip: '&3一名VIP玩家在服務器已滿時已加入伺服器!'
|
||||
@ -133,4 +133,4 @@ time:
|
||||
# TODO hour: 'hour'
|
||||
# TODO hours: 'hours'
|
||||
# TODO day: 'day'
|
||||
# TODO days: 'days'
|
||||
# TODO days: 'days'
|
||||
|
||||
@ -23,7 +23,7 @@ password:
|
||||
login:
|
||||
command_usage: '&b【AuthMe】&6用法: &c"/login <密碼>"'
|
||||
wrong_password: '&b【AuthMe】&6密碼錯誤!'
|
||||
# TODO success: '&2Successful login!'
|
||||
success: '&b【AuthMe】&6密碼正確,您已成功登入!'
|
||||
login_request: '&b【AuthMe】&6請使用 &c"/login <密碼>" &6來登入。'
|
||||
timeout_error: '&b【AuthMe】&6超過登入時間,請稍後再試一次'
|
||||
|
||||
@ -34,7 +34,7 @@ error:
|
||||
unregistered_user: '&b【AuthMe】&6這個帳號還沒有註冊過'
|
||||
not_logged_in: '&b【AuthMe】&6您還沒有登入!'
|
||||
no_permission: '&b【AuthMe】&6您沒有使用該指令的權限。'
|
||||
# TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!'
|
||||
unexpected_error: '&b【AuthMe】&6發生錯誤,請聯繫管理員'
|
||||
max_registration: '&b【AuthMe】&6您的 IP 位置所註冊的帳號數量已經達到最大。'
|
||||
logged_in: '&b【AuthMe】&6您已經登入了!'
|
||||
kick_for_vip: '&b【AuthMe】&6您已經被請出。&c原因 : 有 VIP 玩家登入伺服器'
|
||||
@ -136,4 +136,4 @@ time:
|
||||
hour: '時'
|
||||
hours: '時'
|
||||
day: '天'
|
||||
days: '天'
|
||||
days: '天'
|
||||
|
||||
@ -108,7 +108,7 @@ public class MessageUpdaterTest {
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// when
|
||||
Set<String> messageKeysFromConfigData = MessageUpdater.CONFIGURATION_DATA.getProperties().stream()
|
||||
Set<String> messageKeysFromConfigData = MessageUpdater.getConfigurationData().getProperties().stream()
|
||||
.map(Property::getPath)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
@ -125,7 +125,7 @@ public class MessageUpdaterTest {
|
||||
|
||||
// when
|
||||
Map<String, String[]> comments = ReflectionTestUtils.getFieldValue(
|
||||
ConfigurationData.class, MessageUpdater.CONFIGURATION_DATA, "sectionComments");
|
||||
ConfigurationData.class, MessageUpdater.getConfigurationData(), "sectionComments");
|
||||
|
||||
// then
|
||||
assertThat(comments.keySet(), equalTo(rootPaths));
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
package fr.xephi.authme.message.updater;
|
||||
|
||||
import fr.xephi.authme.message.MessageKey;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
/**
|
||||
* Test for {@link OldMessageKeysMigrater}.
|
||||
*/
|
||||
public class OldMessageKeysMigraterTest {
|
||||
|
||||
@Test
|
||||
public void shouldHasOldKeysThatAreNewParentsFirstInMap() {
|
||||
// given
|
||||
Set<String> parentPaths = collectParentPathsFromMessageKeys();
|
||||
Set<String> encounteredParents = new HashSet<>();
|
||||
|
||||
// when / then
|
||||
for (Map.Entry<MessageKey, String> entry : OldMessageKeysMigrater.KEYS_TO_OLD_PATH.entrySet()) {
|
||||
if (parentPaths.contains(entry.getValue()) && encounteredParents.contains(entry.getValue())) {
|
||||
fail("Entry migrating old path '" + entry.getValue()
|
||||
+ "' should come before any new paths with it as parent");
|
||||
}
|
||||
String parent = entry.getKey().getKey().split("\\.")[0];
|
||||
encounteredParents.add(parent);
|
||||
}
|
||||
}
|
||||
|
||||
private Set<String> collectParentPathsFromMessageKeys() {
|
||||
return Arrays.stream(MessageKey.values())
|
||||
.map(mk -> mk.getKey().split("\\.")[0])
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
@ -25,7 +25,7 @@ import java.util.regex.Pattern;
|
||||
* were at the top of the file and to separate comments by new lines (which ConfigMe
|
||||
* currently doesn't support).
|
||||
*/
|
||||
public class MessagesFileWriter {
|
||||
public final class MessagesFileWriter {
|
||||
|
||||
/** Marker used inside a text to signal that it should be a comment later on. */
|
||||
private static final String COMMENT_MARKER = "::COMMENT::";
|
||||
@ -52,7 +52,7 @@ public class MessagesFileWriter {
|
||||
|
||||
// Create property resource with new defaults, save with ConfigMe for proper sections & comments
|
||||
PropertyResource resource = createPropertyResourceWithCommentEntries();
|
||||
new SettingsManager(resource, null, MessageUpdater.CONFIGURATION_DATA).save();
|
||||
new SettingsManager(resource, null, MessageUpdater.getConfigurationData()).save();
|
||||
|
||||
// Go through the newly saved file and replace texts with comment marker to actual YAML comments
|
||||
// and add initial comments back to the file
|
||||
@ -89,7 +89,7 @@ public class MessagesFileWriter {
|
||||
* @return the first comment generated by ConfigMe (comment of the first root path)
|
||||
*/
|
||||
private static String getFirstCommentByConfigMe() {
|
||||
ConfigurationData configurationData = MessageUpdater.CONFIGURATION_DATA;
|
||||
ConfigurationData configurationData = MessageUpdater.getConfigurationData();
|
||||
String firstRootPath = configurationData.getProperties().get(0).getPath().split("\\.")[0];
|
||||
return "# " + configurationData.getCommentsForSection(firstRootPath)[0];
|
||||
}
|
||||
@ -100,7 +100,7 @@ public class MessagesFileWriter {
|
||||
*/
|
||||
private PropertyResource createPropertyResourceWithCommentEntries() {
|
||||
YamlFileResource resource = new MigraterYamlFileResource(file);
|
||||
for (Property<?> property : MessageUpdater.CONFIGURATION_DATA.getProperties()) {
|
||||
for (Property<?> property : MessageUpdater.getConfigurationData().getProperties()) {
|
||||
String text = resource.getString(property.getPath());
|
||||
if (text == null) {
|
||||
resource.setValue(property.getPath(), COMMENT_MARKER + defaultFile.getString(property.getPath()));
|
||||
@ -132,6 +132,7 @@ public class MessagesFileWriter {
|
||||
newLines.add(line);
|
||||
}
|
||||
}
|
||||
newLines.add(""); // Makes sure file ends with new line
|
||||
|
||||
FileIoUtils.writeToFile(file.toPath(), String.join("\n", newLines));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user