From f44353ed4cd8e8d696fb8c3495aff89075b0408f Mon Sep 17 00:00:00 2001 From: ljacqu Date: Thu, 1 Feb 2018 20:35:30 +0100 Subject: [PATCH] #1467 Fix messages verification tool task + remove empty messages in YML files --- .../message/updater/MessageUpdater.java | 20 +-- src/main/resources/messages/messages_bg.yml | 32 ++-- src/main/resources/messages/messages_br.yml | 24 +-- src/main/resources/messages/messages_cz.yml | 24 +-- src/main/resources/messages/messages_de.yml | 24 +-- src/main/resources/messages/messages_eo.yml | 24 +-- src/main/resources/messages/messages_es.yml | 6 +- src/main/resources/messages/messages_et.yml | 24 +-- src/main/resources/messages/messages_eu.yml | 102 ++++++------ src/main/resources/messages/messages_fi.yml | 96 ++++++------ src/main/resources/messages/messages_fr.yml | 6 +- src/main/resources/messages/messages_gl.yml | 90 +++++------ src/main/resources/messages/messages_hu.yml | 10 +- src/main/resources/messages/messages_id.yml | 92 +++++------ src/main/resources/messages/messages_it.yml | 6 +- src/main/resources/messages/messages_ko.yml | 10 +- src/main/resources/messages/messages_lt.yml | 116 +++++++------- src/main/resources/messages/messages_nl.yml | 24 +-- src/main/resources/messages/messages_pl.yml | 6 +- src/main/resources/messages/messages_pt.yml | 24 +-- src/main/resources/messages/messages_ro.yml | 24 +-- src/main/resources/messages/messages_ru.yml | 10 +- src/main/resources/messages/messages_sk.yml | 24 +-- src/main/resources/messages/messages_tr.yml | 32 ++-- src/main/resources/messages/messages_uk.yml | 58 +++---- src/main/resources/messages/messages_vn.yml | 30 ++-- src/main/resources/messages/messages_zhcn.yml | 6 +- src/main/resources/messages/messages_zhhk.yml | 24 +-- src/main/resources/messages/messages_zhmc.yml | 54 +++---- src/main/resources/messages/messages_zhtw.yml | 10 +- .../message/updater/MessageUpdaterTest.java | 38 +++++ .../tools/messages/MessageFileComments.java | 13 -- .../tools/messages/MessageFileElement.java | 20 --- .../messages/MessageFileElementMerger.java | 132 ---------------- .../messages/MessageFileElementReader.java | 77 --------- .../java/tools/messages/MessageFileEntry.java | 85 ---------- .../tools/messages/MessageFileVerifier.java | 14 +- .../tools/messages/MessagesFileWriter.java | 148 ++++++++++++++++++ .../tools/messages/VerifyMessagesTask.java | 25 ++- 39 files changed, 726 insertions(+), 858 deletions(-) delete mode 100644 src/test/java/tools/messages/MessageFileComments.java delete mode 100644 src/test/java/tools/messages/MessageFileElement.java delete mode 100644 src/test/java/tools/messages/MessageFileElementMerger.java delete mode 100644 src/test/java/tools/messages/MessageFileElementReader.java delete mode 100644 src/test/java/tools/messages/MessageFileEntry.java create mode 100644 src/test/java/tools/messages/MessagesFileWriter.java diff --git a/src/main/java/fr/xephi/authme/message/updater/MessageUpdater.java b/src/main/java/fr/xephi/authme/message/updater/MessageUpdater.java index a833d4c19..38ed7f07a 100644 --- a/src/main/java/fr/xephi/authme/message/updater/MessageUpdater.java +++ b/src/main/java/fr/xephi/authme/message/updater/MessageUpdater.java @@ -24,7 +24,10 @@ import java.util.Set; */ public class MessageUpdater { - private static final ConfigurationData CONFIGURATION_DATA = buildConfigurationData(); + /** + * Configuration data object for all message keys incl. comments associated to sections. + */ + public static final ConfigurationData CONFIGURATION_DATA = buildConfigurationData(); /** * Applies any necessary migrations to the user's messages file and saves it if it has been modified. @@ -49,14 +52,14 @@ public class MessageUpdater { private boolean migrateAndSave(File userFile, JarMessageSource jarMessageSource) { // YamlConfiguration escapes all special characters when saving, making the file hard to use, so use ConfigMe YamlFileResource userResource = new MigraterYamlFileResource(userFile); - SettingsManager settingsManager = new SettingsManager(userResource, null, CONFIGURATION_DATA); // Step 1: Migrate any old keys in the file to the new paths boolean movedOldKeys = migrateOldKeys(userResource); // Step 2: Take any missing messages from the message files shipped in the AuthMe JAR - boolean addedMissingKeys = addMissingKeys(jarMessageSource, userResource, settingsManager); + boolean addedMissingKeys = addMissingKeys(jarMessageSource, userResource); if (movedOldKeys || addedMissingKeys) { + SettingsManager settingsManager = new SettingsManager(userResource, null, CONFIGURATION_DATA); settingsManager.save(); ConsoleLogger.debug("Successfully saved {0}", userFile); return true; @@ -72,12 +75,11 @@ public class MessageUpdater { return hasChange; } - private boolean addMissingKeys(JarMessageSource jarMessageSource, YamlFileResource userResource, - SettingsManager settingsManager) { + private boolean addMissingKeys(JarMessageSource jarMessageSource, YamlFileResource userResource) { int addedKeys = 0; for (Property property : CONFIGURATION_DATA.getProperties()) { - if (!property.isPresent(userResource)) { - settingsManager.setProperty((Property) property, jarMessageSource.getMessageFromJar(property)); + if (userResource.getString(property.getPath()) == null) { + userResource.setValue(property.getPath(), jarMessageSource.getMessageFromJar(property)); ++addedKeys; } } @@ -131,11 +133,11 @@ public class MessageUpdater { /** * Extension of {@link YamlFileResource} to fine-tune the export style. */ - private static final class MigraterYamlFileResource extends YamlFileResource { + public static final class MigraterYamlFileResource extends YamlFileResource { private Yaml singleQuoteYaml; - MigraterYamlFileResource(File file) { + public MigraterYamlFileResource(File file) { super(file, new MessageMigraterPropertyReader(file), new LeafPropertiesGenerator()); } diff --git a/src/main/resources/messages/messages_bg.yml b/src/main/resources/messages/messages_bg.yml index 64341683c..3dcdd9359 100644 --- a/src/main/resources/messages/messages_bg.yml +++ b/src/main/resources/messages/messages_bg.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cКоманда: /login парола' wrong_password: '&cГрешна парола!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cМоля влезте с: /login парола' timeout_error: '&4Времето за вход изтече, беше кикнат от сървъра. Моля опитайте отново!' @@ -31,7 +31,7 @@ error: unregistered_user: '&cПотребителското име не е регистрирано!' not_logged_in: '&cНе си влязъл!' no_permission: '&4Нямаш нужните права за това действие!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' max_registration: '&cТи си достигнал максималният брой регистрации (%reg_count/%max_acc %reg_names)!' logged_in: '&cВече си вписан!' kick_for_vip: '&3VIP потребител влезе докато сървъра беше пълен, ти беше изгонен!' @@ -91,7 +91,7 @@ email: already_used: '&4Имейл адреса вече се използва, опитайте с друг.' incomplete_settings: 'Грешка: Не всички настройки са написани за изпращане на имейл адрес. Моля свържете се с администратора!' send_failure: 'Съобщението не беше изпратено. Моля свържете се с администратора.' - change_password_expired: '' + # TODO change_password_expired: 'You cannot change your password using this command anymore.' email_cooldown_error: '&cВече е бил изпратен имейл адрес. Трябва а изчакаш %time преди да пратиш нов.' # Password recovery by email @@ -102,27 +102,27 @@ recovery: code: code_sent: 'Възстановяващият код беше изпратен на твоят email адрес.' incorrect: 'Възстановяващият код е неправилен! Използвайте: /email recovery имейл, за да генерирате нов' - tries_exceeded: '' - correct: '' - change_password: '' + # TODO tries_exceeded: 'You have exceeded the maximum number attempts to enter the recovery code. Use "/email recovery [email]" to generate a new one.' + # TODO correct: 'Recovery code entered correctly!' + # TODO change_password: 'Please use the command /email setpassword to change your password immediately.' # Captcha captcha: usage_captcha: '&3Моля въведе цифрите/буквите от капчата: /captcha %captcha_code' wrong_captcha: '&cКода е грешен, използвайте: "/captcha %captcha_code" в чата!' valid_captcha: '&2Кода е валиден!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -133,4 +133,4 @@ time: hour: 'час' hours: 'часа' day: 'ден' - days: 'дена' + days: 'дена' \ No newline at end of file diff --git a/src/main/resources/messages/messages_br.yml b/src/main/resources/messages/messages_br.yml index 3318f8a35..6758dd1e4 100644 --- a/src/main/resources/messages/messages_br.yml +++ b/src/main/resources/messages/messages_br.yml @@ -24,7 +24,7 @@ password: login: command_usage: '&cUse: /login ' wrong_password: '&cSenha incorreta!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cPor favor, faça o login com o comando "/login "' 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!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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!' @@ -115,18 +115,18 @@ captcha: usage_captcha: '&3Para iniciar sessão você tem que resolver um código captcha, utilize o comando "/captcha %captcha_code"' wrong_captcha: '&cCaptcha errado, por favor, escreva "/captcha %captcha_code" no chat!' valid_captcha: '&2Código Captcha resolvido corretamente!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -137,4 +137,4 @@ time: hour: 'hora' hours: 'horas' day: 'dia' - days: 'dias' + days: 'dias' \ No newline at end of file diff --git a/src/main/resources/messages/messages_cz.yml b/src/main/resources/messages/messages_cz.yml index 6d98a3cda..f5916bf29 100644 --- a/src/main/resources/messages/messages_cz.yml +++ b/src/main/resources/messages/messages_cz.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cPoužij: "/login TvojeHeslo".' wrong_password: '&cŠpatné heslo.' - success: '' + # TODO success: '&2Successful login!' 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.' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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!' @@ -111,18 +111,18 @@ captcha: usage_captcha: '&cPoužij: /captcha %captcha_code' wrong_captcha: '&cŠpatné opsana Captcha, pouzij prosim: /captcha %captcha_code' valid_captcha: '&cZadaná captcha je v pořádku!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -133,4 +133,4 @@ time: hour: 'hodiny' hours: 'hodin' day: 'dny' - days: 'dnu' + days: 'dnu' \ No newline at end of file diff --git a/src/main/resources/messages/messages_de.yml b/src/main/resources/messages/messages_de.yml index 38d18f2f2..0a524f5c6 100644 --- a/src/main/resources/messages/messages_de.yml +++ b/src/main/resources/messages/messages_de.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cBenutze: /login ' wrong_password: '&cFalsches Passwort' - success: '' + # TODO success: '&2Successful login!' login_request: '&cBitte logge dich ein mit "/login "' 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!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an 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!' @@ -111,18 +111,18 @@ captcha: usage_captcha: '&3Um dich einzuloggen, tippe dieses Captcha so ein: /captcha %captcha_code' wrong_captcha: '&cFalsches Captcha, bitte nutze: /captcha %captcha_code' valid_captcha: '&2Das Captcha ist korrekt!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -133,4 +133,4 @@ time: hour: 'Stunde' hours: 'Stunden' day: 'Tag' - days: 'Tage' + days: 'Tage' \ No newline at end of file diff --git a/src/main/resources/messages/messages_eo.yml b/src/main/resources/messages/messages_eo.yml index 0d71447d3..41a5739ac 100644 --- a/src/main/resources/messages/messages_eo.yml +++ b/src/main/resources/messages/messages_eo.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cUzado: /login ' wrong_password: '&cErara pasvorto!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cBonvolu ensaluti per la komando: /login ' 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!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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!' @@ -111,18 +111,18 @@ captcha: usage_captcha: '&3Ensaluti vi devas solvi captcha kodo, bonvolu uzi la komando: /captcha %captcha_code' wrong_captcha: '&cMalĝusta captcha, bonvolu tajpi "/captcha %captcha_code" en la babilejo!' valid_captcha: '&2Captcha kodo solvita ĝuste!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -133,4 +133,4 @@ time: hour: 'horo' hours: 'horoj' day: 'tago' - days: 'tagoj' + days: 'tagoj' \ No newline at end of file diff --git a/src/main/resources/messages/messages_es.yml b/src/main/resources/messages/messages_es.yml index 98c417f1f..7326ea977 100644 --- a/src/main/resources/messages/messages_es.yml +++ b/src/main/resources/messages/messages_es.yml @@ -22,7 +22,7 @@ password: login: command_usage: '&cUso: /login contraseña' wrong_password: '&cContraseña incorrecta' - success: '' + # TODO success: '&2Successful login!' 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' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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' \ No newline at end of file diff --git a/src/main/resources/messages/messages_et.yml b/src/main/resources/messages/messages_et.yml index f0eb19163..2de633a7f 100644 --- a/src/main/resources/messages/messages_et.yml +++ b/src/main/resources/messages/messages_et.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cKasutus: /login ' wrong_password: '&cVale salasõna!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cPalun logi sisse kasutades käsklust: /login ' 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.' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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.' @@ -111,18 +111,18 @@ captcha: usage_captcha: '&3Sisselogimiseks pead lahendama captcha. Tee seda kasutades käsklust: /captcha %captcha_code' wrong_captcha: '&cVale captcha, kirjuta "/captcha %captcha_code" chatti!' valid_captcha: '&2Captcha lahendatud!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -133,4 +133,4 @@ time: hour: 'tund' hours: 'tundi' day: 'päev' - days: 'päeva' + days: 'päeva' \ No newline at end of file diff --git a/src/main/resources/messages/messages_eu.yml b/src/main/resources/messages/messages_eu.yml index e729aafcd..9d4ce4b7a 100644 --- a/src/main/resources/messages/messages_eu.yml +++ b/src/main/resources/messages/messages_eu.yml @@ -6,42 +6,42 @@ registration: command_usage: '&cErabili: /register pasahitza pasahitza' reg_only: '&fErregistratuako erabiltzaileak bakarrik! Mesedez bisitatu http://example.com erregistratzeko' success: '&cOndo erregistratu zara!' - kicked_admin_registered: '' + # TODO kicked_admin_registered: 'An admin just registered you; please log in again' # Password errors on registration password: match_error: '&fPasahitzak ez datoz bat' - name_in_password: '' - unsafe_password: '' - forbidden_characters: '' + # TODO name_in_password: '&cYou can''t use your name as password, please choose another one...' + # TODO unsafe_password: '&cThe chosen password isn''t safe, please choose another one...' + # TODO forbidden_characters: '&4Your password contains illegal characters. Allowed chars: %valid_chars' wrong_length: '&fZure pasahitza motzegia edo luzeegia da' # Login login: command_usage: '&cErabili: /login pasahitza' wrong_password: '&cPasahitz okerra' - success: '' + # TODO success: '&2Successful login!' login_request: '&cMesedez erabili "/login pasahitza" saioa hasteko' timeout_error: '&fDenbora gehiegi egon zara saioa hasi gabe' # Errors error: - denied_command: '' - denied_chat: '' + # TODO denied_command: '&cIn order to use this command you must be authenticated!' + # TODO denied_chat: '&cIn order to chat you must be authenticated!' unregistered_user: '&cErabiltzailea ez dago erregistratuta' not_logged_in: '&cSaioa hasi gabe!' no_permission: '&cBaimenik ez' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' max_registration: '&fKontuko 2 erabiltzaile bakarrik izan ditzakezu' logged_in: '&cDagoeneko saioa hasita!' kick_for_vip: '&cVIP erabiltzaile bat sartu da zerbitzaria beteta zegoenean!' - tempban_max_logins: '' + # TODO tempban_max_logins: '&cYou have been temporarily banned for failing to log in too many times.' # AntiBot antibot: - kick_antibot: '' - auto_enabled: '' - auto_disabled: '' + # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' + # TODO auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' + # TODO auto_disabled: '&2[AntiBotService] AntiBot disabled after %m minutes!' # Unregister unregister: @@ -55,25 +55,25 @@ misc: logout: '&cAtera zara' reload: '&fConfiguration and database has been reloaded' usage_change_password: '&fErabili: /changepassword pasahitzZaharra pasahitzBerria' - two_factor_create: '' - accounts_owned_self: '' - accounts_owned_other: '' + # TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' + # TODO accounts_owned_self: 'You own %count accounts:' + # TODO accounts_owned_other: 'The player %name has %count accounts:' # Session messages session: valid_session: '&cSession login' - invalid_session: '' + # TODO invalid_session: '&cYour IP has been changed and your session data has expired!' # Error messages when joining on_join_validation: - same_ip_online: '' + # TODO same_ip_online: 'A player with the same IP is already in game!' same_nick_online: '&fZure izen berdina duen erabiltzaile bat zerbitzarian jolasten dago' name_length: '&cZure erabiltzaile izena motzegia edo luzeegia da' characters_in_name: '&cZure erabiltzaileak karaktere debekatuak ditu. Karaktere onartuak: %valid_chars' kick_full_server: '&cZerbitzaria beteta dago, Barkatu!' country_banned: '[AuthMe] Zure herrialdea blokeatuta dago zerbitzari honetan' - not_owner_error: '' - invalid_name_case: '' + # TODO not_owner_error: 'You are not the owner of this account. Please choose another name!' + # TODO invalid_name_case: 'You should join using username %valid, not %invalid.' # Email email: @@ -86,13 +86,13 @@ email: added: '[AuthMe] Emaila gehitu duzu !' request_confirmation: '[AuthMe] Konfirmatu zure emaila !' changed: '[AuthMe] Emaila aldatua!' - email_show: '' - no_email_for_account: '' - already_used: '' - incomplete_settings: '' - send_failure: '' - change_password_expired: '' - email_cooldown_error: '' + # TODO email_show: '&2Your current email address is: &f%email' + # TODO no_email_for_account: '&2You currently don''t have email address associated with this account.' + # TODO already_used: '&4The email address is already being used' + # TODO incomplete_settings: 'Error: not all required settings are set for sending emails. Please contact an admin.' + # TODO send_failure: 'The email could not be sent. Please contact an administrator.' + # TODO change_password_expired: 'You cannot change your password using this command anymore.' + # TODO email_cooldown_error: '&cAn email was already sent recently. You must wait %time before you can send a new one.' # Password recovery by email recovery: @@ -100,37 +100,37 @@ recovery: command_usage: '&fErabili: /email recovery ' email_sent: '[AuthMe] Berreskuratze emaila bidalita !' code: - code_sent: '' - incorrect: '' - tries_exceeded: '' - correct: '' - change_password: '' + # TODO code_sent: 'A recovery code to reset your password has been sent to your email.' + # TODO incorrect: 'The recovery code is not correct! You have %count tries remaining.' + # TODO tries_exceeded: 'You have exceeded the maximum number attempts to enter the recovery code. Use "/email recovery [email]" to generate a new one.' + # TODO correct: 'Recovery code entered correctly!' + # TODO change_password: 'Please use the command /email setpassword to change your password immediately.' # Captcha captcha: - usage_captcha: '' - wrong_captcha: '' - valid_captcha: '' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO usage_captcha: '&3To log in you have to solve a captcha code, please use the command: /captcha %captcha_code' + # TODO wrong_captcha: '&cWrong captcha, please type "/captcha %captcha_code" into the chat!' + # TODO valid_captcha: '&2Captcha code solved correctly!' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: - second: '' - seconds: '' - minute: '' - minutes: '' - hour: '' - hours: '' - day: '' - days: '' + # TODO second: 'second' + # TODO seconds: 'seconds' + # TODO minute: 'minute' + # TODO minutes: 'minutes' + # TODO hour: 'hour' + # TODO hours: 'hours' + # TODO day: 'day' + # TODO days: 'days' \ No newline at end of file diff --git a/src/main/resources/messages/messages_fi.yml b/src/main/resources/messages/messages_fi.yml index f2f958f7c..01b9906c8 100644 --- a/src/main/resources/messages/messages_fi.yml +++ b/src/main/resources/messages/messages_fi.yml @@ -6,42 +6,42 @@ registration: command_usage: '&cKäyttötapa: /register ' reg_only: '&fMene sivustolle: http://example.com rekisteröityäksesi!' success: '&cRekisteröidyit onnistuneesti!' - kicked_admin_registered: '' + # TODO kicked_admin_registered: 'An admin just registered you; please log in again' # Password errors on registration password: match_error: '&fSalasanat ei täsmää' - name_in_password: '' - unsafe_password: '' - forbidden_characters: '' + # TODO name_in_password: '&cYou can''t use your name as password, please choose another one...' + # TODO unsafe_password: '&cThe chosen password isn''t safe, please choose another one...' + # TODO forbidden_characters: '&4Your password contains illegal characters. Allowed chars: %valid_chars' wrong_length: '&fSalasanasi on liian pitkä tai lyhyt.' # Login login: command_usage: '&cKäyttötapa: /login salasana' wrong_password: '&cVäärä salasana' - success: '' + # TODO success: '&2Successful login!' login_request: '&cKirjaudu palvelimmelle komennolla "/login salasana"' timeout_error: '&fKirjautumisaika meni umpeen.' # Errors error: - denied_command: '' - denied_chat: '' + # TODO denied_command: '&cIn order to use this command you must be authenticated!' + # TODO denied_chat: '&cIn order to chat you must be authenticated!' unregistered_user: '&cSalasanat eivät täsmää' not_logged_in: '&cEt ole kirjautunut sisään!' no_permission: '&cEi oikeuksia' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' max_registration: '&fSinulla ei ole oikeuksia tehdä enempää pelaajatilejä!' logged_in: '&cOlet jo kirjautunut!' kick_for_vip: '&cVIP pelaaja liittyi täyteen palvelimeen!' - tempban_max_logins: '' + # TODO tempban_max_logins: '&cYou have been temporarily banned for failing to log in too many times.' # AntiBot antibot: - kick_antibot: '' - auto_enabled: '' - auto_disabled: '' + # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' + # TODO auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' + # TODO auto_disabled: '&2[AntiBotService] AntiBot disabled after %m minutes!' # Unregister unregister: @@ -55,9 +55,9 @@ misc: logout: '&cKirjauduit ulos palvelimelta.' reload: '&fAsetukset uudelleenladattu' usage_change_password: '&fKäyttötapa: /changepassword vanhaSalasana uusiSalasana' - two_factor_create: '' - accounts_owned_self: '' - accounts_owned_other: '' + # TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' + # TODO accounts_owned_self: 'You own %count accounts:' + # TODO accounts_owned_other: 'The player %name has %count accounts:' # Session messages session: @@ -66,14 +66,14 @@ session: # Error messages when joining on_join_validation: - same_ip_online: '' + # TODO same_ip_online: 'A player with the same IP is already in game!' same_nick_online: '&COlet jo palvelimella! &COdota käyttäjän aikakatkaisua tai ota yhteyttä palveluntarjoojaan.' name_length: '&cPelaajanimesi on liian lyhyt tai pitkä' characters_in_name: '&cPelaajanimesi sisältää luvattomia merkkejä. Hyväksytyt merkit: %valid_chars' kick_full_server: '&cPalvelin on täynnä, Yritä pian uudelleen!' - country_banned: '' - not_owner_error: '' - invalid_name_case: '' + # TODO country_banned: '&4Your country is banned from this server!' + # TODO not_owner_error: 'You are not the owner of this account. Please choose another name!' + # TODO invalid_name_case: 'You should join using username %valid, not %invalid.' # Email email: @@ -86,13 +86,13 @@ email: added: '[AuthMe] Sähköposti lisätty!' request_confirmation: '[AuthMe] Vahvistuta sähköposti!' changed: '[AuthMe] Sähköposti vaihdettu!' - email_show: '' - no_email_for_account: '' - already_used: '' - incomplete_settings: '' - send_failure: '' - change_password_expired: '' - email_cooldown_error: '' + # TODO email_show: '&2Your current email address is: &f%email' + # TODO no_email_for_account: '&2You currently don''t have email address associated with this account.' + # TODO already_used: '&4The email address is already being used' + # TODO incomplete_settings: 'Error: not all required settings are set for sending emails. Please contact an admin.' + # TODO send_failure: 'The email could not be sent. Please contact an administrator.' + # TODO change_password_expired: 'You cannot change your password using this command anymore.' + # TODO email_cooldown_error: '&cAn email was already sent recently. You must wait %time before you can send a new one.' # Password recovery by email recovery: @@ -100,37 +100,37 @@ recovery: command_usage: '&fKäyttötapa: /email recovery ' email_sent: '[AuthMe] Palautus sähköposti lähetetty!' code: - code_sent: '' - incorrect: '' - tries_exceeded: '' - correct: '' - change_password: '' + # TODO code_sent: 'A recovery code to reset your password has been sent to your email.' + # TODO incorrect: 'The recovery code is not correct! You have %count tries remaining.' + # TODO tries_exceeded: 'You have exceeded the maximum number attempts to enter the recovery code. Use "/email recovery [email]" to generate a new one.' + # TODO correct: 'Recovery code entered correctly!' + # TODO change_password: 'Please use the command /email setpassword to change your password immediately.' # Captcha captcha: usage_captcha: '&cKäyttötapa: /captcha %captcha_code' wrong_captcha: '&cVäärä varmistus, käytä : /captcha %captcha_code' valid_captcha: '&cSinun varmistus onnistui.!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: - second: '' - seconds: '' - minute: '' - minutes: '' - hour: '' - hours: '' - day: '' - days: '' + # TODO second: 'second' + # TODO seconds: 'seconds' + # TODO minute: 'minute' + # TODO minutes: 'minutes' + # TODO hour: 'hour' + # TODO hours: 'hours' + # TODO day: 'day' + # TODO days: 'days' \ No newline at end of file diff --git a/src/main/resources/messages/messages_fr.yml b/src/main/resources/messages/messages_fr.yml index fdfe622b7..c34911249 100644 --- a/src/main/resources/messages/messages_fr.yml +++ b/src/main/resources/messages/messages_fr.yml @@ -25,7 +25,7 @@ password: login: command_usage: '&cUsage: /login ' wrong_password: '&cMauvais mot de passe !' - success: '' + # TODO success: '&2Successful login!' login_request: '&cPour vous connecter, utilisez "/login "' 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.' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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' \ No newline at end of file diff --git a/src/main/resources/messages/messages_gl.yml b/src/main/resources/messages/messages_gl.yml index 1ae95174b..c8ebe4ab3 100644 --- a/src/main/resources/messages/messages_gl.yml +++ b/src/main/resources/messages/messages_gl.yml @@ -6,40 +6,40 @@ registration: command_usage: '&cUso: /register contrasinal confirmarContrasinal' reg_only: '&fSó xogadores rexistrados! Por favor, visita http://example.com para rexistrarte' success: '&cRexistrado con éxito!' - kicked_admin_registered: '' + # TODO kicked_admin_registered: 'An admin just registered you; please log in again' # Password errors on registration password: match_error: '&fO contrasinal non coincide' - name_in_password: '' - unsafe_password: '' - forbidden_characters: '' + # TODO name_in_password: '&cYou can''t use your name as password, please choose another one...' + # TODO unsafe_password: '&cThe chosen password isn''t safe, please choose another one...' + # TODO forbidden_characters: '&4Your password contains illegal characters. Allowed chars: %valid_chars' wrong_length: '&fO teu contrasinal non alcanza a lonxitude mínima ou excede a lonxitude máxima' # Login login: command_usage: '&cUso: /login ' wrong_password: '&cContrasinal equivocado' - success: '' + # TODO success: '&2Successful login!' login_request: '&cPor favor, identifícate con "/login "' timeout_error: '&fRematou o tempo da autentificación' # Errors error: - denied_command: '' - denied_chat: '' + # TODO denied_command: '&cIn order to use this command you must be authenticated!' + # TODO denied_chat: '&cIn order to chat you must be authenticated!' unregistered_user: '&cEse nome de usuario non está rexistrado' not_logged_in: '&cNon te identificaches!' no_permission: '&cNon tes o permiso' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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!' - tempban_max_logins: '' + # TODO tempban_max_logins: '&cYou have been temporarily banned for failing to log in too many times.' # AntiBot antibot: - kick_antibot: '' + # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' auto_enabled: '[AuthMe] AntiBotMod conectouse automáticamente debido a conexións masivas!' auto_disabled: '[AuthMe] AntiBotMod desactivouse automáticamente despois de %m minutos, esperemos que a invasión se detivera' @@ -55,9 +55,9 @@ misc: logout: '&cSesión pechada con éxito' reload: '&fRecargáronse a configuración e a base de datos' usage_change_password: '&fUso: /changepassword ' - two_factor_create: '' - accounts_owned_self: '' - accounts_owned_other: '' + # TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' + # TODO accounts_owned_self: 'You own %count accounts:' + # TODO accounts_owned_other: 'The player %name has %count accounts:' # Session messages session: @@ -66,14 +66,14 @@ session: # Error messages when joining on_join_validation: - same_ip_online: '' + # TODO same_ip_online: 'A player with the same IP is already in game!' same_nick_online: '&fXa está xogando alguén co mesmo nome' name_length: '&cO teu nome é demasiado curto ou demasiado longo' characters_in_name: '&cO teu nome contén caracteres ilegais. Caracteres permitidos: %valid_chars' kick_full_server: '&cO servidor está actualmente cheo, sentímolo!' country_banned: 'O teu país está bloqueado neste servidor' - not_owner_error: '' - invalid_name_case: '' + # TODO not_owner_error: 'You are not the owner of this account. Please choose another name!' + # TODO invalid_name_case: 'You should join using username %valid, not %invalid.' # Email email: @@ -86,13 +86,13 @@ email: added: '[AuthMe] Correo engadido!' request_confirmation: '[AuthMe] Confirma o teu correo!' changed: '[AuthMe] Cambiouse o correo!' - email_show: '' - no_email_for_account: '' - already_used: '' - incomplete_settings: '' - send_failure: '' - change_password_expired: '' - email_cooldown_error: '' + # TODO email_show: '&2Your current email address is: &f%email' + # TODO no_email_for_account: '&2You currently don''t have email address associated with this account.' + # TODO already_used: '&4The email address is already being used' + # TODO incomplete_settings: 'Error: not all required settings are set for sending emails. Please contact an admin.' + # TODO send_failure: 'The email could not be sent. Please contact an administrator.' + # TODO change_password_expired: 'You cannot change your password using this command anymore.' + # TODO email_cooldown_error: '&cAn email was already sent recently. You must wait %time before you can send a new one.' # Password recovery by email recovery: @@ -100,37 +100,37 @@ recovery: command_usage: '&fUso: /email recovery ' email_sent: '[AuthMe] Enviouse o correo de confirmación!' code: - code_sent: '' - incorrect: '' - tries_exceeded: '' - correct: '' - change_password: '' + # TODO code_sent: 'A recovery code to reset your password has been sent to your email.' + # TODO incorrect: 'The recovery code is not correct! You have %count tries remaining.' + # TODO tries_exceeded: 'You have exceeded the maximum number attempts to enter the recovery code. Use "/email recovery [email]" to generate a new one.' + # TODO correct: 'Recovery code entered correctly!' + # TODO change_password: 'Please use the command /email setpassword to change your password immediately.' # Captcha captcha: usage_captcha: '&cNecesitas escribir un captcha, por favor escribe: /captcha %captcha_code' wrong_captcha: '&cCaptcha equivocado, por favor usa: /captcha %captcha_code' valid_captcha: '&cO teu captcha é válido !' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: - second: '' - seconds: '' - minute: '' - minutes: '' - hour: '' - hours: '' - day: '' - days: '' + # TODO second: 'second' + # TODO seconds: 'seconds' + # TODO minute: 'minute' + # TODO minutes: 'minutes' + # TODO hour: 'hour' + # TODO hours: 'hours' + # TODO day: 'day' + # TODO days: 'days' \ No newline at end of file diff --git a/src/main/resources/messages/messages_hu.yml b/src/main/resources/messages/messages_hu.yml index a5a953415..773a9d7ed 100644 --- a/src/main/resources/messages/messages_hu.yml +++ b/src/main/resources/messages/messages_hu.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cBejelentkezés: "&7/login &c".' wrong_password: '&4A jelszó helytelen!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cKérlek, jelentkezz be: "&7/login &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!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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!' @@ -111,8 +111,8 @@ captcha: usage_captcha: '&3A bejelentkezéshez CAPTCHA szükséges, kérlek, használd a következő parancsot: "&7/captcha %captcha_code&3".' wrong_captcha: '&cHibás CAPTCHA, kérlek, írd be a következő parancsot: "&7/captcha %captcha_code&c"!' valid_captcha: '&2A CAPTCHA sikeresen feloldva!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: @@ -133,4 +133,4 @@ time: hour: 'óra' hours: 'óra' day: 'nap' - days: 'nap' + days: 'nap' \ No newline at end of file diff --git a/src/main/resources/messages/messages_id.yml b/src/main/resources/messages/messages_id.yml index 4d6c641e2..8afc1c665 100644 --- a/src/main/resources/messages/messages_id.yml +++ b/src/main/resources/messages/messages_id.yml @@ -3,50 +3,50 @@ registration: disabled: '&cRegister dalam game tidak diaktifkan!' name_taken: '&cKamu telah mendaftarkan username ini!' register_request: '&3Silahkan mendaftar ke server menggunakan command "/register "' - command_usage: '' + # TODO command_usage: '&cUsage: /register ' reg_only: '&4Hanya pengguna terdaftar yg bisa bergabung! Silahkan kunjungi http://example.com untuk mendaftar!' success: '&2Register berhasil!' - kicked_admin_registered: '' + # TODO kicked_admin_registered: 'An admin just registered you; please log in again' # Password errors on registration password: match_error: '&cPassword tidak cocok, silahkan periksa dan ulangi kembali!' name_in_password: '&cKamu tidak bisa menggunakan namamu sebagai password, silahkan coba yg lain...' unsafe_password: '&cPassword yg kamu pilih tidak aman, silahkan coba yg lain...' - forbidden_characters: '' + # TODO forbidden_characters: '&4Your password contains illegal characters. Allowed chars: %valid_chars' wrong_length: '&cPassword kamu terlalu panjang/pendek! Silahkan pilih yg lain!' # Login login: command_usage: '&cUsage: /login ' wrong_password: '&cPassword salah!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cSilahkan login menggunakan command "/login "' timeout_error: '&4Jangka waktu login telah habis, kamu di keluarkan dari server. Silahkan coba lagi!' # Errors error: - denied_command: '' - denied_chat: '' + # TODO denied_command: '&cIn order to use this command you must be authenticated!' + # TODO denied_chat: '&cIn order to chat you must be authenticated!' unregistered_user: '&cUser ini belum terdaftar!' not_logged_in: '&cKamu belum login!' no_permission: '&4Kamu tidak mempunyai izin melakukan ini!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an 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!' - tempban_max_logins: '' + # TODO tempban_max_logins: '&cYou have been temporarily banned for failing to log in too many times.' # AntiBot antibot: - kick_antibot: '' + # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' auto_enabled: '&4[AntiBotService] AntiBot diaktifkan dikarenakan banyak koneksi yg diterima!' auto_disabled: '&2[AntiBotService] AntiBot dimatikan setelah %m menit!' # Unregister unregister: success: '&cUnregister berhasil!' - command_usage: '' + # TODO command_usage: '&cUsage: /unregister ' # Other messages misc: @@ -55,9 +55,9 @@ misc: logout: '&2Berhasil logout!' reload: '&2Konfigurasi dan database telah dimuat ulang!' usage_change_password: '&cUsage: /changepassword ' - two_factor_create: '' - accounts_owned_self: '' - accounts_owned_other: '' + # TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' + # TODO accounts_owned_self: 'You own %count accounts:' + # TODO accounts_owned_other: 'The player %name has %count accounts:' # Session messages session: @@ -66,14 +66,14 @@ session: # Error messages when joining on_join_validation: - same_ip_online: '' + # TODO same_ip_online: 'A player with the same IP is already in game!' same_nick_online: '&4Username yg sama telah bermain di server ini!' name_length: '&4Username kamu terlalu panjang atau terlalu pendek!' characters_in_name: '&4Username kamu mengandung karakter illegal. Karakter yg diijinkan: %valid_chars' kick_full_server: '&4Server sedang penuh, silahkan coba lagi nanti!' - country_banned: '' - not_owner_error: '' - invalid_name_case: '' + # TODO country_banned: '&4Your country is banned from this server!' + # TODO not_owner_error: 'You are not the owner of this account. Please choose another name!' + # TODO invalid_name_case: 'You should join using username %valid, not %invalid.' # Email email: @@ -86,13 +86,13 @@ email: added: '&2Berhasil menambahkan alamat email ke akunmu!' request_confirmation: '&cSilahkan konfirmasi alamat email kamu!' changed: '&2Alamat email telah diubah dengan benar!' - email_show: '' - no_email_for_account: '' - already_used: '' - incomplete_settings: '' - send_failure: '' - change_password_expired: '' - email_cooldown_error: '' + # TODO email_show: '&2Your current email address is: &f%email' + # TODO no_email_for_account: '&2You currently don''t have email address associated with this account.' + # TODO already_used: '&4The email address is already being used' + # TODO incomplete_settings: 'Error: not all required settings are set for sending emails. Please contact an admin.' + # TODO send_failure: 'The email could not be sent. Please contact an administrator.' + # TODO change_password_expired: 'You cannot change your password using this command anymore.' + # TODO email_cooldown_error: '&cAn email was already sent recently. You must wait %time before you can send a new one.' # Password recovery by email recovery: @@ -100,37 +100,37 @@ recovery: command_usage: '&cUsage: /email recovery ' email_sent: '&2Email pemulihan akun telah dikirim! Silahkan periksa kotak masuk emailmu!' code: - code_sent: '' - incorrect: '' - tries_exceeded: '' - correct: '' - change_password: '' + # TODO code_sent: 'A recovery code to reset your password has been sent to your email.' + # TODO incorrect: 'The recovery code is not correct! You have %count tries remaining.' + # TODO tries_exceeded: 'You have exceeded the maximum number attempts to enter the recovery code. Use "/email recovery [email]" to generate a new one.' + # TODO correct: 'Recovery code entered correctly!' + # TODO change_password: 'Please use the command /email setpassword to change your password immediately.' # Captcha captcha: usage_captcha: '&3Kamu harus menyelesaikan kode captcha untuk login, silahkan gunakan command "/captcha %captcha_code"' wrong_captcha: '&cCaptcha salah, gunakan command "/captcha %captcha_code" pada chat!' valid_captcha: '&2Kode captcha terselesaikan!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: - second: '' - seconds: '' - minute: '' - minutes: '' - hour: '' - hours: '' - day: '' - days: '' + # TODO second: 'second' + # TODO seconds: 'seconds' + # TODO minute: 'minute' + # TODO minutes: 'minutes' + # TODO hour: 'hour' + # TODO hours: 'hours' + # TODO day: 'day' + # TODO days: 'days' \ No newline at end of file diff --git a/src/main/resources/messages/messages_it.yml b/src/main/resources/messages/messages_it.yml index fd59e5fa3..3aa9fdb6a 100644 --- a/src/main/resources/messages/messages_it.yml +++ b/src/main/resources/messages/messages_it.yml @@ -22,7 +22,7 @@ password: login: command_usage: '&cUtilizzo: /login ' wrong_password: '&cPassword non corretta!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cPer favore, esegui l''autenticazione con il comando: /login ' 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.' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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' \ No newline at end of file diff --git a/src/main/resources/messages/messages_ko.yml b/src/main/resources/messages/messages_ko.yml index cdc4f02d6..488f336f3 100644 --- a/src/main/resources/messages/messages_ko.yml +++ b/src/main/resources/messages/messages_ko.yml @@ -23,7 +23,7 @@ password: login: command_usage: '&c사용법: /login <비밀번호>' wrong_password: '&c비밀번호가 잘못되었습니다!' - success: '' + # TODO success: '&2Successful login!' login_request: '&c다음 명령어로 로그인 해주세요: /login <비밀번호>' timeout_error: '&4로그인 시간이 초과 되어 서버에서 추방당했습니다. 다시 시도하세요!' @@ -34,7 +34,7 @@ error: unregistered_user: '&c이 유저는 등록되지 않았습니다!' not_logged_in: '&c로그인이 되어있지 않습니다!' no_permission: '&4이 작업을 수행할 수 있는 권한이 없습니다!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' max_registration: '&c당신은 가입할 수 있는 계정 한도를 초과했습니다 (%reg_count/%max_acc %reg_names)!' logged_in: '&c이미 로그인되어 있습니다!' kick_for_vip: '&3서버가 꽉 차있을땐 VIP 플레이어만 접속이 가능합니다!' @@ -114,8 +114,8 @@ captcha: usage_captcha: '&3로그인 하려면 CAPTCHA 코드를 입력해야 합니다. 이 명령어를 사용하세요: /captcha %captcha_code' wrong_captcha: '&c잘못된 CAPTCHA 코드 입니다. "/captcha %captcha_code" 형태로 입력해주세요!' valid_captcha: '&2CAPTCHA 코드가 확인되었습니다!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: @@ -136,4 +136,4 @@ time: hour: '시간' hours: '시간' day: '일' - days: '일' + days: '일' \ No newline at end of file diff --git a/src/main/resources/messages/messages_lt.yml b/src/main/resources/messages/messages_lt.yml index 67fba54eb..58d59fa9d 100644 --- a/src/main/resources/messages/messages_lt.yml +++ b/src/main/resources/messages/messages_lt.yml @@ -6,42 +6,42 @@ registration: command_usage: '&eNaudojimas: /register slaptazodis pakartotiSlaptazodi' reg_only: '&cTik prisiregistravusiem zaidejams: apsilankykite: http://example.com tam kad uzsiregistruoti.' success: '&aSekmingai prisiregistravote.' - kicked_admin_registered: '' + # TODO kicked_admin_registered: 'An admin just registered you; please log in again' # Password errors on registration password: match_error: '&cSlaptazodziai nesutampa' - name_in_password: '' - unsafe_password: '' - forbidden_characters: '' + # TODO name_in_password: '&cYou can''t use your name as password, please choose another one...' + # TODO unsafe_password: '&cThe chosen password isn''t safe, please choose another one...' + # TODO forbidden_characters: '&4Your password contains illegal characters. Allowed chars: %valid_chars' wrong_length: '&cJusu slaptazodis buvo per ilgas arba per trumpas.' # Login login: command_usage: '&eKomandos panaudojimas: /login slaptazodis' wrong_password: '&cNeteisingas slaptazosdis' - success: '' + # TODO success: '&2Successful login!' login_request: '&ePrasome prisijungti: /login slaptazodis' timeout_error: '&cNespejote prisijungti' # Errors error: - denied_command: '' - denied_chat: '' + # TODO denied_command: '&cIn order to use this command you must be authenticated!' + # TODO denied_chat: '&cIn order to chat you must be authenticated!' unregistered_user: '&cVartotojas neprisiregistraves' not_logged_in: '&cTu neprisijunges!' no_permission: '&cNera leidimo' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' max_registration: '&cJus pasiekete maksimalu registraciju skaiciu.' logged_in: '&cTu aju prisijunges!' kick_for_vip: '&cA VIP prisijunge i pilna serveri!' - tempban_max_logins: '' + # TODO tempban_max_logins: '&cYou have been temporarily banned for failing to log in too many times.' # AntiBot antibot: - kick_antibot: '' - auto_enabled: '' - auto_disabled: '' + # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' + # TODO auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' + # TODO auto_disabled: '&2[AntiBotService] AntiBot disabled after %m minutes!' # Unregister unregister: @@ -55,9 +55,9 @@ misc: logout: '&aSekmingai atsijungete' reload: '&aNustatymai ir duomenu baze buvo perkrauta.' usage_change_password: '&ePanaudojimas: /changepassword senasSlaptazodis naujasSlaptazodis' - two_factor_create: '' - accounts_owned_self: '' - accounts_owned_other: '' + # TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' + # TODO accounts_owned_self: 'You own %count accounts:' + # TODO accounts_owned_other: 'The player %name has %count accounts:' # Session messages session: @@ -66,71 +66,71 @@ session: # Error messages when joining on_join_validation: - same_ip_online: '' + # TODO same_ip_online: 'A player with the same IP is already in game!' same_nick_online: '&cKazkas situo vardu jau zaidzia.' name_length: '&cJusu varsdas yra per ilgas arba per trumpas.' characters_in_name: '&cJusu varde yra neledziamu simboliu, leidziami: %valid_chars' kick_full_server: '&cServeris yra pilnas, Atsiprasome.' - country_banned: '' - not_owner_error: '' - invalid_name_case: '' + # TODO country_banned: '&4Your country is banned from this server!' + # TODO not_owner_error: 'You are not the owner of this account. Please choose another name!' + # TODO invalid_name_case: 'You should join using username %valid, not %invalid.' # Email email: add_email_request: '&ePrasau pridekite savo el.pasta : /email add Email confirmEmail' - usage_email_add: '' - usage_email_change: '' - new_email_invalid: '' - old_email_invalid: '' - invalid: '' - added: '' - request_confirmation: '' - changed: '' - email_show: '' - no_email_for_account: '' - already_used: '' - incomplete_settings: '' - send_failure: '' - change_password_expired: '' - email_cooldown_error: '' + # TODO usage_email_add: '&cUsage: /email add ' + # TODO usage_email_change: '&cUsage: /email change ' + # TODO new_email_invalid: '&cInvalid new email, try again!' + # TODO old_email_invalid: '&cInvalid old email, try again!' + # TODO invalid: '&cInvalid email address, try again!' + # TODO added: '&2Email address successfully added to your account!' + # TODO request_confirmation: '&cPlease confirm your email address!' + # TODO changed: '&2Email address changed correctly!' + # TODO email_show: '&2Your current email address is: &f%email' + # TODO no_email_for_account: '&2You currently don''t have email address associated with this account.' + # TODO already_used: '&4The email address is already being used' + # TODO incomplete_settings: 'Error: not all required settings are set for sending emails. Please contact an admin.' + # TODO send_failure: 'The email could not be sent. Please contact an administrator.' + # TODO change_password_expired: 'You cannot change your password using this command anymore.' + # TODO email_cooldown_error: '&cAn email was already sent recently. You must wait %time before you can send a new one.' # Password recovery by email recovery: forgot_password_hint: '&cPamirsote slaptazodi? Rasykite: /email recovery el.pastas' - command_usage: '' - email_sent: '' + # TODO command_usage: '&cUsage: /email recovery ' + # TODO email_sent: '&2Recovery email sent successfully! Please check your email inbox!' code: - code_sent: '' - incorrect: '' - tries_exceeded: '' - correct: '' - change_password: '' + # TODO code_sent: 'A recovery code to reset your password has been sent to your email.' + # TODO incorrect: 'The recovery code is not correct! You have %count tries remaining.' + # TODO tries_exceeded: 'You have exceeded the maximum number attempts to enter the recovery code. Use "/email recovery [email]" to generate a new one.' + # TODO correct: 'Recovery code entered correctly!' + # TODO change_password: 'Please use the command /email setpassword to change your password immediately.' # Captcha captcha: usage_captcha: '&cPanaudojimas: /captcha %captcha_code' wrong_captcha: '&cNeteisinga Captcha, naudokite : /captcha %captcha_code' valid_captcha: '&cJusu captcha Teisinga!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: - second: '' - seconds: '' - minute: '' - minutes: '' - hour: '' - hours: '' - day: '' - days: '' + # TODO second: 'second' + # TODO seconds: 'seconds' + # TODO minute: 'minute' + # TODO minutes: 'minutes' + # TODO hour: 'hour' + # TODO hours: 'hours' + # TODO day: 'day' + # TODO days: 'days' \ No newline at end of file diff --git a/src/main/resources/messages/messages_nl.yml b/src/main/resources/messages/messages_nl.yml index b0e0f30b5..0f8b8ba57 100644 --- a/src/main/resources/messages/messages_nl.yml +++ b/src/main/resources/messages/messages_nl.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cGebruik: /login ' wrong_password: '&cFout wachtwoord' - success: '' + # TODO success: '&2Successful login!' login_request: '&cLog in met: /login ' 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!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an 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!' @@ -111,18 +111,18 @@ captcha: usage_captcha: '&3Om in te loggen moet je een captcha-code oplossen, gebruik het commando: /captcha %captcha_code' wrong_captcha: '&cVerkeerde captcha-code, typ alsjeblieft "/captcha %captcha_code" in de chat!' valid_captcha: '&2De captcha-code is geldig!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -133,4 +133,4 @@ time: hour: 'uur' hours: 'uren' day: 'dag' - days: 'dagen' + days: 'dagen' \ No newline at end of file diff --git a/src/main/resources/messages/messages_pl.yml b/src/main/resources/messages/messages_pl.yml index 755c9cca7..44c0676a3 100644 --- a/src/main/resources/messages/messages_pl.yml +++ b/src/main/resources/messages/messages_pl.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cUżycie: /login hasło' wrong_password: '&cNiepoprawne hasło.' - success: '' + # TODO success: '&2Successful login!' login_request: '&2Proszę się zalogować przy użyciu &6/login ' 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ń.' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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' \ No newline at end of file diff --git a/src/main/resources/messages/messages_pt.yml b/src/main/resources/messages/messages_pt.yml index df5604152..33badd111 100644 --- a/src/main/resources/messages/messages_pt.yml +++ b/src/main/resources/messages/messages_pt.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cUse: /login ' wrong_password: '&cPassword errada!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cIdentifique-se com "/login "' 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' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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!' @@ -111,18 +111,18 @@ captcha: usage_captcha: '&cPrecisa digitar um captcha, escreva: /captcha %captcha_code' wrong_captcha: '&cCaptcha errado, por favor escreva: /captcha %captcha_code' valid_captcha: '&cO seu captcha é válido!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -133,4 +133,4 @@ time: hour: 'hora' hours: 'horas' day: 'dia' - days: 'dias' + days: 'dias' \ No newline at end of file diff --git a/src/main/resources/messages/messages_ro.yml b/src/main/resources/messages/messages_ro.yml index 11d77a1d9..11ef01a50 100644 --- a/src/main/resources/messages/messages_ro.yml +++ b/src/main/resources/messages/messages_ro.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cFoloseste comanda "/login " pentru a te autentifica.' wrong_password: '&cParola gresita!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cTe rugam sa te autentifici folosind comanda "/login "' 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!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an 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!' @@ -111,18 +111,18 @@ captcha: usage_captcha: '&3Pentru a te autentifica, te rugam sa folosesti comanda "/captcha %captcha_code"' wrong_captcha: '&cCodul de verificare este gresit, te rugam foloseste comanda "/captcha %captcha_code"!' valid_captcha: '&2Codul de verificare a fost scris corect!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -133,4 +133,4 @@ time: hour: 'ora' hours: 'ore' day: 'zi' - days: 'zile' + days: 'zile' \ No newline at end of file diff --git a/src/main/resources/messages/messages_ru.yml b/src/main/resources/messages/messages_ru.yml index 6378e2036..594292b98 100644 --- a/src/main/resources/messages/messages_ru.yml +++ b/src/main/resources/messages/messages_ru.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cИспользование: /login <пароль>' wrong_password: '&cНеправильный пароль!' - success: '' + # TODO success: '&2Successful login!' login_request: '&3Авторизация: /login <Пароль>' timeout_error: '&4Время авторизации истекло.' @@ -31,7 +31,7 @@ error: unregistered_user: '&cИгрок с таким именем не зарегистрирован.' not_logged_in: '&cВы ещё не вошли!' no_permission: '&4Недостаточно прав.' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' max_registration: '&cПревышено максимальное количество регистраций на сервере! (%reg_count/%max_acc %reg_names)' logged_in: '&cВы уже авторизированы!' kick_for_vip: '&3VIP-игрок зашёл на переполненный сервер.' @@ -111,8 +111,8 @@ captcha: usage_captcha: '&3Необходимо ввести текст с каптчи. Используйте «/captcha %captcha_code»' wrong_captcha: '&cНеверно! Используйте «/captcha %captcha_code».' valid_captcha: '&2Вы успешно решили каптчу!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: @@ -133,4 +133,4 @@ time: hour: 'ч.' hours: 'ч.' day: 'дн.' - days: 'дн.' + days: 'дн.' \ No newline at end of file diff --git a/src/main/resources/messages/messages_sk.yml b/src/main/resources/messages/messages_sk.yml index 652fa2bc4..204489f4d 100644 --- a/src/main/resources/messages/messages_sk.yml +++ b/src/main/resources/messages/messages_sk.yml @@ -27,7 +27,7 @@ password: login: command_usage: '&cPoužitie: /login ' wrong_password: '&cZadal si zlé heslo.' - success: '' + # TODO success: '&2Successful login!' login_request: '&cPrihlás sa príkazom "/login ".' 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.' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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!' @@ -118,18 +118,18 @@ captcha: usage_captcha: '&3Pre prihlásenie musíš vyriešiť captcha kód, prosím použi príkaz: /captcha %captcha_code' wrong_captcha: '&cNesprávny kód captcha, prosím napíš "/captcha %captcha_code" do chatu!' valid_captcha: '&2Správne si vyriešil captcha kód!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -140,4 +140,4 @@ time: hour: 'hod.' hours: 'hod.' day: 'd.' - days: 'd.' + days: 'd.' \ No newline at end of file diff --git a/src/main/resources/messages/messages_tr.yml b/src/main/resources/messages/messages_tr.yml index c92ae3028..13dc08dc8 100644 --- a/src/main/resources/messages/messages_tr.yml +++ b/src/main/resources/messages/messages_tr.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cKullanim: /login ' wrong_password: '&cYanlis sifre!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cLutfen giris komutunu kullanin "/login "' 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!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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!' @@ -91,7 +91,7 @@ email: already_used: '&4Eposta adresi zaten kullaniliyor.' incomplete_settings: 'Hata: Gonderilen epostada bazi ayarlar tamamlanmis degil. Yetkili ile iletisime gec.' send_failure: 'Eposta gonderilemedi. Yetkili ile iletisime gec.' - change_password_expired: '' + # TODO change_password_expired: 'You cannot change your password using this command anymore.' email_cooldown_error: '&cKisa bir sure once eposta gonderildi. Yeni bir eposta almak icin %time beklemelisin.' # Password recovery by email @@ -102,27 +102,27 @@ recovery: code: code_sent: 'Sifre sifirlama kodu eposta adresinize gonderildi.' incorrect: 'Kod dogru degil! Kullanim "/email recovery [eposta]" ile yeni bir kod olustur' - tries_exceeded: '' - correct: '' - change_password: '' + # TODO tries_exceeded: 'You have exceeded the maximum number attempts to enter the recovery code. Use "/email recovery [email]" to generate a new one.' + # TODO correct: 'Recovery code entered correctly!' + # TODO change_password: 'Please use the command /email setpassword to change your password immediately.' # Captcha captcha: usage_captcha: '&3Giris yapmak icin guvenlik kodunu komut yazarak girin "/captcha %captcha_code"' wrong_captcha: '&cYanlis guvenlik kodu, kullanim sekli "/captcha %captcha_code" sohbete yazin!' valid_captcha: '&2Guvenlik kodu dogrulandi!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -133,4 +133,4 @@ time: hour: 'saat' hours: 'saat' day: 'gun' - days: 'gun' + days: 'gun' \ No newline at end of file diff --git a/src/main/resources/messages/messages_uk.yml b/src/main/resources/messages/messages_uk.yml index 86f147e2a..20f2a27dd 100644 --- a/src/main/resources/messages/messages_uk.yml +++ b/src/main/resources/messages/messages_uk.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cСинтаксис: /login <пароль>' wrong_password: '&cНевірний пароль!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cДля авторизації, введіть команду "/login <пароль>"' timeout_error: '&4Час для авторизації сплинув. Будь ласка, спробуйте ще раз!' @@ -31,7 +31,7 @@ error: unregistered_user: '&cЦей гравець не є зареєстрованим.' not_logged_in: '&cВи не авторизовані!' no_permission: '&4У вас недостатньо прав, щоб застосувати цю команду!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' max_registration: '&cВичерпано ліміт реєстрацій (%reg_count/%max_acc %reg_names) для вашого підключення!' logged_in: '&cВи вже авторизовані!' kick_for_vip: '&3Вас кікнуто, внаслідок того, що VIP гравець зайшов на сервер коли небуло вільних місць.' @@ -86,13 +86,13 @@ email: added: '&2Електронну пошту успішно прив’язано до вашого акаунта.' request_confirmation: '&cАдреси не співпадають.' changed: '&2E-mail успішно змінено.' - email_show: '' - no_email_for_account: '' + # TODO email_show: '&2Your current email address is: &f%email' + # TODO no_email_for_account: '&2You currently don''t have email address associated with this account.' already_used: '&4До цієї електронної пошти прив’язано забагато акаунтів!' incomplete_settings: '&4[AuthMe] Error: Не всі необхідні налаштування є встановленими, щоб надсилати електронну пошту. Будь ласка, повідомте адміністратора!' - send_failure: '' - change_password_expired: '' - email_cooldown_error: '' + # TODO send_failure: 'The email could not be sent. Please contact an administrator.' + # TODO change_password_expired: 'You cannot change your password using this command anymore.' + # TODO email_cooldown_error: '&cAn email was already sent recently. You must wait %time before you can send a new one.' # Password recovery by email recovery: @@ -100,37 +100,37 @@ recovery: command_usage: '&cСинтаксис: /email recovery ' email_sent: '&2Лист для відновлення доступу надіслано. Будь ласка, провірте свою пошту!' code: - code_sent: '' - incorrect: '' - tries_exceeded: '' - correct: '' - change_password: '' + # TODO code_sent: 'A recovery code to reset your password has been sent to your email.' + # TODO incorrect: 'The recovery code is not correct! You have %count tries remaining.' + # TODO tries_exceeded: 'You have exceeded the maximum number attempts to enter the recovery code. Use "/email recovery [email]" to generate a new one.' + # TODO correct: 'Recovery code entered correctly!' + # TODO change_password: 'Please use the command /email setpassword to change your password immediately.' # Captcha captcha: usage_captcha: '&3Для продовження доведеться ввести капчу — "/captcha %captcha_code"' wrong_captcha: '&cНевірно введена капча! Спробуйте ще раз — "/captcha %captcha_code"' valid_captcha: '&2Капчу прийнято.' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: - second: '' - seconds: '' - minute: '' - minutes: '' - hour: '' - hours: '' - day: '' - days: '' + # TODO second: 'second' + # TODO seconds: 'seconds' + # TODO minute: 'minute' + # TODO minutes: 'minutes' + # TODO hour: 'hour' + # TODO hours: 'hours' + # TODO day: 'day' + # TODO days: 'days' \ No newline at end of file diff --git a/src/main/resources/messages/messages_vn.yml b/src/main/resources/messages/messages_vn.yml index a880c8a77..a62770045 100644 --- a/src/main/resources/messages/messages_vn.yml +++ b/src/main/resources/messages/messages_vn.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&cSử dụng: /login ' wrong_password: '&cSai mật khẩu!' - success: '' + # TODO success: '&2Successful login!' login_request: '&cXin vui lòng đăng nhập bằng lệnh "/login "' 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!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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!' @@ -102,27 +102,27 @@ recovery: code: code_sent: 'Một mã khôi phục mật khẩu đã được gửi đến địa chỉ email của bạn.' incorrect: 'Mã khôi phục không đúng! Dùng lệnh /email recovery [email] để tạo một mã mới' - tries_exceeded: '' - correct: '' - change_password: '' + # TODO tries_exceeded: 'You have exceeded the maximum number attempts to enter the recovery code. Use "/email recovery [email]" to generate a new one.' + # TODO correct: 'Recovery code entered correctly!' + # TODO change_password: 'Please use the command /email setpassword to change your password immediately.' # Captcha captcha: usage_captcha: '&eĐể đăng nhập vui lòng hãy nhập mã Captcha, gõ lệnh "/captcha %captcha_code"' wrong_captcha: '&cSai mã captcha, Vui lòng gõ lệnh "/captcha %captcha_code"!' valid_captcha: '&2Mã captcha đã được xác nhận!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -133,4 +133,4 @@ time: hour: 'giờ' hours: 'giờ' day: 'ngày' - days: 'ngày' + days: 'ngày' \ No newline at end of file diff --git a/src/main/resources/messages/messages_zhcn.yml b/src/main/resources/messages/messages_zhcn.yml index ac7fdc25d..19d436581 100644 --- a/src/main/resources/messages/messages_zhcn.yml +++ b/src/main/resources/messages/messages_zhcn.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&8[&6玩家系统&8] &c正确用法:“/login <密码>”' wrong_password: '&8[&6玩家系统&8] &c错误的密码' - success: '' + # TODO success: '&2Successful login!' 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没有权限' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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: '天' \ No newline at end of file diff --git a/src/main/resources/messages/messages_zhhk.yml b/src/main/resources/messages/messages_zhhk.yml index 74c5d71ea..3622458c1 100644 --- a/src/main/resources/messages/messages_zhhk.yml +++ b/src/main/resources/messages/messages_zhhk.yml @@ -24,7 +24,7 @@ password: login: command_usage: '&8[&6用戶系統&8] &f用法:《 /login <密碼> 》' wrong_password: '&8[&6用戶系統&8] &c你輸入了錯誤的密碼。' - success: '' + # TODO success: '&2Successful login!' 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嗯~你想幹甚麼?' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' 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玩家登入了伺服器。' @@ -115,18 +115,18 @@ captcha: usage_captcha: '&8[&6用戶系統&8] &f用法:《 /captcha %captcha_code 》' wrong_captcha: '&8[&6用戶系統&8] &c你所輸入的驗證碼無效,請使用 《 /captcha %captcha_code 》 再次輸入。' valid_captcha: '&8[&6用戶系統&8] &c你所輸入的驗證碼無效 !' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: @@ -137,4 +137,4 @@ time: hour: '小時' hours: '小時' day: '日' - days: '日' + days: '日' \ No newline at end of file diff --git a/src/main/resources/messages/messages_zhmc.yml b/src/main/resources/messages/messages_zhmc.yml index 458bce2b1..b8508b99a 100644 --- a/src/main/resources/messages/messages_zhmc.yml +++ b/src/main/resources/messages/messages_zhmc.yml @@ -20,7 +20,7 @@ password: login: command_usage: '&b使用方法: 輸入"/login [你的密碼]" 來登入' wrong_password: '&c密碼錯誤!' - success: '' + # TODO success: '&2Successful login!' login_request: '&c [請先登入] 請按T , 然後輸入 "/login [你的密碼]" 。' timeout_error: '&4超過登錄超時,您已從伺服器中踢出,請重試!' @@ -31,7 +31,7 @@ error: unregistered_user: '&c此用戶尚未注冊!' not_logged_in: '&c你尚未登入!' no_permission: '&4您沒有執行此操作的權限!' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' max_registration: '&c您已超過註冊的最大數量(%reg_count/%max_acc %reg_names)!' logged_in: '&c您已經登錄!' kick_for_vip: '&3一名VIP玩家在服務器已滿時已加入伺服器!' @@ -86,13 +86,13 @@ email: added: '&2電子郵件地址已成功添加到您的帳戶!' request_confirmation: '&c請確認你的電郵地址!' changed: '&2已正確地更改電子郵件地址!' - email_show: '' - no_email_for_account: '' + # TODO email_show: '&2Your current email address is: &f%email' + # TODO no_email_for_account: '&2You currently don''t have email address associated with this account.' already_used: '&4此電子郵件地址已被使用' incomplete_settings: '缺少必要的配置來為發送電子郵件。請聯繫管理員。' - send_failure: '' - change_password_expired: '' - email_cooldown_error: '' + # TODO send_failure: 'The email could not be sent. Please contact an administrator.' + # TODO change_password_expired: 'You cannot change your password using this command anymore.' + # TODO email_cooldown_error: '&cAn email was already sent recently. You must wait %time before you can send a new one.' # Password recovery by email recovery: @@ -102,35 +102,35 @@ recovery: code: code_sent: '已將重設密碼的恢復代碼發送到您的電子郵件。' incorrect: '恢復代碼錯誤!使用指令: "/email recovery [電郵地址]" 生成新的一個恢復代碼。' - tries_exceeded: '' - correct: '' - change_password: '' + # TODO tries_exceeded: 'You have exceeded the maximum number attempts to enter the recovery code. Use "/email recovery [email]" to generate a new one.' + # TODO correct: 'Recovery code entered correctly!' + # TODO change_password: 'Please use the command /email setpassword to change your password immediately.' # Captcha captcha: usage_captcha: '&3T要登錄您必須使用captcha驗證碼,請使用命令: "/captcha %captcha_code"' wrong_captcha: '&c驗證碼錯誤!請按T在聊天中輸入 "/captcha %captcha_code"' valid_captcha: '&2驗證碼正確!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: - code_required: '' - command_usage: '' - incorrect_code: '' - success: '' - already_verified: '' - code_expired: '' - email_needed: '' + # TODO code_required: '&3This command is sensitive and requires an email verification! Check your inbox and follow the email''s instructions.' + # TODO command_usage: '&cUsage: /verification ' + # TODO incorrect_code: '&cIncorrect code, please type "/verification " into the chat, using the code you received by email' + # TODO success: '&2Your identity has been verified! You can now execute all commands within the current session!' + # TODO already_verified: '&2You can already execute every sensitive command within the current session!' + # TODO code_expired: '&3Your code has expired! Execute another sensitive command to get a new code!' + # TODO email_needed: '&3To verify your identity you need to link an email address with your account!!' # Time units time: - second: '' - seconds: '' - minute: '' - minutes: '' - hour: '' - hours: '' - day: '' - days: '' + # TODO second: 'second' + # TODO seconds: 'seconds' + # TODO minute: 'minute' + # TODO minutes: 'minutes' + # TODO hour: 'hour' + # TODO hours: 'hours' + # TODO day: 'day' + # TODO days: 'days' \ No newline at end of file diff --git a/src/main/resources/messages/messages_zhtw.yml b/src/main/resources/messages/messages_zhtw.yml index 81cfca473..556021dda 100644 --- a/src/main/resources/messages/messages_zhtw.yml +++ b/src/main/resources/messages/messages_zhtw.yml @@ -23,7 +23,7 @@ password: login: command_usage: '&b【AuthMe】&6用法: &c"/login <密碼>"' wrong_password: '&b【AuthMe】&6密碼錯誤!' - success: '' + # TODO success: '&2Successful login!' 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您沒有使用該指令的權限。' - unexpected_error: '' + # TODO unexpected_error: '&4An unexpected error occurred, please contact an administrator!' max_registration: '&b【AuthMe】&6您的 IP 位置所註冊的帳號數量已經達到最大。' logged_in: '&b【AuthMe】&6您已經登入了!' kick_for_vip: '&b【AuthMe】&6您已經被請出。&c原因 : 有 VIP 玩家登入伺服器' @@ -114,8 +114,8 @@ captcha: usage_captcha: '&b【AuthMe】&6請用 &c"/captcha %captcha_code" &6來輸入您的驗證碼.' wrong_captcha: '&b【AuthMe】&6錯誤的驗證碼,請使用 "/captcha %captcha_code" 再試一次.' valid_captcha: '&b【AuthMe】&6驗證碼無效!' - captcha_for_registration: '' - register_captcha_valid: '' + # TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha %captcha_code' + # TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' # Verification code verification: @@ -136,4 +136,4 @@ time: hour: '時' hours: '時' day: '天' - days: '天' + days: '天' \ No newline at end of file diff --git a/src/test/java/fr/xephi/authme/message/updater/MessageUpdaterTest.java b/src/test/java/fr/xephi/authme/message/updater/MessageUpdaterTest.java index 1d1abef5c..c75be723e 100644 --- a/src/test/java/fr/xephi/authme/message/updater/MessageUpdaterTest.java +++ b/src/test/java/fr/xephi/authme/message/updater/MessageUpdaterTest.java @@ -1,6 +1,9 @@ package fr.xephi.authme.message.updater; +import ch.jalu.configme.configurationdata.ConfigurationData; +import ch.jalu.configme.properties.Property; import com.google.common.io.Files; +import fr.xephi.authme.ReflectionTestUtils; import fr.xephi.authme.TestHelper; import fr.xephi.authme.message.MessageKey; import org.bukkit.configuration.file.FileConfiguration; @@ -12,6 +15,10 @@ import org.junit.rules.TemporaryFolder; import java.io.File; import java.io.IOException; +import java.util.Arrays; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; @@ -92,4 +99,35 @@ public class MessageUpdaterTest { assertThat(configuration.getString(MessageKey.SECONDS.getKey()), equalTo("seconds in plural")); } + + @Test + public void shouldHaveAllKeysInConfigurationData() { + // given + Set messageKeysFromEnum = Arrays.stream(MessageKey.values()) + .map(MessageKey::getKey) + .collect(Collectors.toSet()); + + // when + Set messageKeysFromConfigData = MessageUpdater.CONFIGURATION_DATA.getProperties().stream() + .map(Property::getPath) + .collect(Collectors.toSet()); + + // then + assertThat(messageKeysFromConfigData, equalTo(messageKeysFromEnum)); + } + + @Test + public void shouldHaveCommentForAllRootPathsInConfigurationData() { + // given + Set rootPaths = Arrays.stream(MessageKey.values()) + .map(key -> key.getKey().split("\\.")[0]) + .collect(Collectors.toSet()); + + // when + Map comments = ReflectionTestUtils.getFieldValue( + ConfigurationData.class, MessageUpdater.CONFIGURATION_DATA, "sectionComments"); + + // then + assertThat(comments.keySet(), equalTo(rootPaths)); + } } diff --git a/src/test/java/tools/messages/MessageFileComments.java b/src/test/java/tools/messages/MessageFileComments.java deleted file mode 100644 index eaa5d5eed..000000000 --- a/src/test/java/tools/messages/MessageFileComments.java +++ /dev/null @@ -1,13 +0,0 @@ -package tools.messages; - -import java.util.List; - -/** - * Represents a section of one or more consecutive comment lines in a file. - */ -public class MessageFileComments extends MessageFileElement { - - public MessageFileComments(List lines) { - super(lines); - } -} diff --git a/src/test/java/tools/messages/MessageFileElement.java b/src/test/java/tools/messages/MessageFileElement.java deleted file mode 100644 index 775d7f80e..000000000 --- a/src/test/java/tools/messages/MessageFileElement.java +++ /dev/null @@ -1,20 +0,0 @@ -package tools.messages; - -import java.util.Collections; -import java.util.List; - -/** - * An element (a logical unit) in a messages file. - */ -public abstract class MessageFileElement { - - private final List lines; - - protected MessageFileElement(List lines) { - this.lines = Collections.unmodifiableList(lines); - } - - public List getLines() { - return lines; - } -} diff --git a/src/test/java/tools/messages/MessageFileElementMerger.java b/src/test/java/tools/messages/MessageFileElementMerger.java deleted file mode 100644 index ca5720d3d..000000000 --- a/src/test/java/tools/messages/MessageFileElementMerger.java +++ /dev/null @@ -1,132 +0,0 @@ -package tools.messages; - -import fr.xephi.authme.message.MessageKey; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -/** - * Creates the same order of message file elements as the given default message elements, - * using the local file's own elements as much as possible and filling in elements from the - * default messages file where necessary. - *

- * The current implementation (of this merger and of the {@link MessageFileElementReader reader}) - * has the following limitations: - *

    - *
  • It assumes that new comments are only ever added to the bottom of the default file.
  • - *
  • If a file only has a partial number of the comments present in the default messages file, - * the file's comments will be moved to the top. This most likely adds the comment above the - * wrong group of messages.
  • - *
  • Assumes that the text for a message only takes one line.
  • - *
  • Ignores the last comment section of a file if it is not followed by any message entry.
  • - *
- */ -public class MessageFileElementMerger { - - /** Ordered list of comments in the messages file. */ - private final List comments; - /** List of message entries by corresponding MessageKey. */ - private final Map entries; - /** - * Ordered list of file elements of the default file. The entries of the (non-default) messages - * file are based on this. - */ - private final List defaultFileElements; - /** Missing tags in message entries. */ - private final Map> missingTags; - /** Counter for encountered comment elements. */ - private int commentsCounter = 0; - - private MessageFileElementMerger(List defaultFileElements, - List comments, - Map entries, - Map> missingTags) { - this.defaultFileElements = defaultFileElements; - this.comments = comments; - this.entries = entries; - this.missingTags = missingTags; - } - - /** - * Returns a list of file elements that follow the order and type of the provided default file elements. - * In other words, using the list of default file elements as template and fallback, it returns the provided - * file elements in the same order and fills in default file elements if an equivalent in {@code fileElements} - * is not present. - * - * @param fileElements file elements to sort and merge - * @param defaultFileElements file elements of the default file to base the operation on - * @param missingTags list of missing tags per message key - * @return ordered and complete list of file elements - */ - public static List mergeElements(List fileElements, - List defaultFileElements, - Map> missingTags) { - List comments = filteredStream(fileElements, MessageFileComments.class) - .collect(Collectors.toList()); - Map entries = filteredStream(fileElements, MessageFileEntry.class) - .collect(Collectors.toMap(MessageFileEntry::getMessageKey, Function.identity(), (e1, e2) -> e1)); - - MessageFileElementMerger merger = new MessageFileElementMerger( - defaultFileElements, comments, entries, missingTags); - return merger.mergeElements(); - } - - private List mergeElements() { - List mergedElements = new ArrayList<>(defaultFileElements.size()); - for (MessageFileElement element : defaultFileElements) { - if (element instanceof MessageFileComments) { - mergedElements.add(getCommentsEntry((MessageFileComments) element)); - } else if (element instanceof MessageFileEntry) { - mergedElements.add(getEntryForDefaultMessageEntry((MessageFileEntry) element)); - } else { - throw new IllegalStateException("Found element of unknown subtype '" + element.getClass() + "'"); - } - } - return mergedElements; - } - - private MessageFileComments getCommentsEntry(MessageFileComments defaultComments) { - if (comments.size() > commentsCounter) { - MessageFileComments localComments = comments.get(commentsCounter); - ++commentsCounter; - return localComments; - } - return defaultComments; - } - - private MessageFileElement getEntryForDefaultMessageEntry(MessageFileEntry entry) { - MessageKey messageKey = entry.getMessageKey(); - if (messageKey == null) { - throw new IllegalStateException("Default message file should not have unknown entries, but " - + " entry with lines '" + entry.getLines() + "' has message key = null"); - } - - MessageFileEntry localEntry = entries.get(messageKey); - if (localEntry == null) { - return entry.convertToMissingEntryComment(); - } - - Collection absentTags = missingTags.get(messageKey); - return absentTags == null - ? localEntry - : localEntry.convertToEntryWithMissingTagsComment(absentTags); - } - - /** - * Creates a stream of the entries in {@code collection} with only the elements which are of type {@code clazz}. - * - * @param collection the collection to stream over - * @param clazz the class to restrict the elements to - * @param

the collection type (parent) - * @param the type to restrict to (child) - * @return stream over all elements of the given type - */ - private static Stream filteredStream(Collection

collection, Class clazz) { - return collection.stream().filter(clazz::isInstance).map(clazz::cast); - } -} diff --git a/src/test/java/tools/messages/MessageFileElementReader.java b/src/test/java/tools/messages/MessageFileElementReader.java deleted file mode 100644 index 54d08b50e..000000000 --- a/src/test/java/tools/messages/MessageFileElementReader.java +++ /dev/null @@ -1,77 +0,0 @@ -package tools.messages; - -import tools.utils.FileIoUtils; - -import java.io.File; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.List; - -import static com.google.common.base.Preconditions.checkArgument; - -/** - * Reads a messages file and returns the lines as corresponding {@link MessageFileElement} objects. - * - * @see MessageFileElementMerger - */ -public class MessageFileElementReader { - - private final List elements = new ArrayList<>(); - - private MessageFileElementReader() { - } - - /** - * Returns the message files as separate {@link MessageFileElement elements}. - * - * @param file the file to read - * @return the file's elements - */ - public static List readFileIntoElements(File file) { - checkArgument(file.exists(), "Template file '" + file + "' must exist"); - - MessageFileElementReader reader = new MessageFileElementReader(); - reader.loadElements(file.toPath()); - return reader.elements; - } - - private void loadElements(Path path) { - List currentCommentSection = new ArrayList<>(10); - for (String line : FileIoUtils.readLinesFromFile(path)) { - if (isCommentLine(line)) { - currentCommentSection.add(line); - } else { - if (!currentCommentSection.isEmpty()) { - processTempCommentsList(currentCommentSection); - } - if (MessageFileEntry.isMessageEntry(line)) { - elements.add(new MessageFileEntry(line)); - } else if (!isTodoComment(line)) { - throw new IllegalStateException("Could not match line '" + line + "' to any type"); - } - } - } - } - - /** - * Creates a message file comments element for one or more read comment lines. Does not add - * a comments element if the read lines are only empty lines. - * - * @param comments the read comment lines - */ - private void processTempCommentsList(List comments) { - if (comments.stream().anyMatch(c -> !c.trim().isEmpty())) { - elements.add(new MessageFileComments(new ArrayList<>(comments))); - } - comments.clear(); - } - - private static boolean isCommentLine(String line) { - return !isTodoComment(line) - && (line.trim().isEmpty() || line.trim().startsWith("#")); - } - - private static boolean isTodoComment(String line) { - return line.startsWith("# TODO"); - } -} diff --git a/src/test/java/tools/messages/MessageFileEntry.java b/src/test/java/tools/messages/MessageFileEntry.java deleted file mode 100644 index 788e0b6d3..000000000 --- a/src/test/java/tools/messages/MessageFileEntry.java +++ /dev/null @@ -1,85 +0,0 @@ -package tools.messages; - -import fr.xephi.authme.message.MessageKey; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -import static java.util.Collections.singletonList; - -/** - * Entry in a message file for a message key. - */ -public class MessageFileEntry extends MessageFileElement { - - private static final Pattern MESSAGE_ENTRY_REGEX = Pattern.compile("([a-zA-Z_-]+): .*"); - private final MessageKey messageKey; - - public MessageFileEntry(String line) { - this(singletonList(line), extractMessageKey(line)); - } - - private MessageFileEntry(List lines, MessageKey messageKey) { - super(lines); - this.messageKey = messageKey; - } - - public static boolean isMessageEntry(String line) { - return MESSAGE_ENTRY_REGEX.matcher(line).matches(); - } - - public MessageKey getMessageKey() { - return messageKey; - } - - /** - * Based on this entry, creates a comments element indicating that this message is missing. - * - * @return comments element based on this message element - */ - public MessageFileComments convertToMissingEntryComment() { - List comments = getLines().stream().map(l -> "# TODO " + l).collect(Collectors.toList()); - return new MessageFileComments(comments); - } - - /** - * Creates an adapted message file entry object with a comment for missing tags. - * - * @param missingTags the tags missing in the message - * @return message file entry with verification comment - */ - public MessageFileEntry convertToEntryWithMissingTagsComment(Collection missingTags) { - List lines = new ArrayList<>(getLines().size() + 1); - lines.add("# TODO: Missing tags " + String.join(", ", missingTags)); - lines.addAll(getLines()); - return new MessageFileEntry(lines, messageKey); - } - - /** - * Returns the {@link MessageKey} this entry is for. Returns {@code null} if the message key could not be matched. - * - * @param line the line to process - * @return the associated message key, or {@code null} if no match was found - */ - private static MessageKey extractMessageKey(String line) { - Matcher matcher = MESSAGE_ENTRY_REGEX.matcher(line); - if (matcher.find()) { - String key = matcher.group(1); - return fromKey(key); - } - throw new IllegalStateException("Could not extract message key from line '" + line + "'"); - } - - private static MessageKey fromKey(String key) { - for (MessageKey messageKey : MessageKey.values()) { - if (messageKey.getKey().equals(key)) { - return messageKey; - } - } - return null; - } -} diff --git a/src/test/java/tools/messages/MessageFileVerifier.java b/src/test/java/tools/messages/MessageFileVerifier.java index 058799054..dd33e487a 100644 --- a/src/test/java/tools/messages/MessageFileVerifier.java +++ b/src/test/java/tools/messages/MessageFileVerifier.java @@ -4,6 +4,7 @@ import com.google.common.base.Preconditions; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import fr.xephi.authme.message.MessageKey; +import org.bukkit.configuration.MemorySection; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; @@ -62,6 +63,13 @@ public class MessageFileVerifier { return missingTags; } + /** + * @return true if the verifier has found an issue with the analyzed file, false otherwise + */ + public boolean hasErrors() { + return !missingKeys.isEmpty() || !missingTags.isEmpty() || !unknownKeys.isEmpty(); + } + private void verifyKeys() { FileConfiguration configuration = YamlConfiguration.loadConfiguration(messagesFile); @@ -77,12 +85,16 @@ public class MessageFileVerifier { // Check FileConfiguration for all of its keys to find unknown keys for (String key : configuration.getValues(true).keySet()) { - if (!messageKeyExists(key)) { + if (isNotInnerNode(key, configuration) && !messageKeyExists(key)) { unknownKeys.add(key); } } } + private static boolean isNotInnerNode(String key, FileConfiguration configuration) { + return !(configuration.get(key) instanceof MemorySection); + } + private void checkTagsInMessage(MessageKey messageKey, String message) { for (String tag : messageKey.getTags()) { if (!message.contains(tag)) { diff --git a/src/test/java/tools/messages/MessagesFileWriter.java b/src/test/java/tools/messages/MessagesFileWriter.java new file mode 100644 index 000000000..e47d10a05 --- /dev/null +++ b/src/test/java/tools/messages/MessagesFileWriter.java @@ -0,0 +1,148 @@ +package tools.messages; + +import ch.jalu.configme.SettingsManager; +import ch.jalu.configme.configurationdata.ConfigurationData; +import ch.jalu.configme.properties.Property; +import ch.jalu.configme.resource.PropertyResource; +import ch.jalu.configme.resource.YamlFileResource; +import fr.xephi.authme.message.updater.MessageUpdater; +import fr.xephi.authme.message.updater.MessageUpdater.MigraterYamlFileResource; +import org.bukkit.configuration.file.FileConfiguration; +import tools.utils.FileIoUtils; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Writes to a messages file, adding comments with the default file's message where + * entries are missing. + *

+ * This writer writes to the file twice: once with ConfigMe to ensure a proper order + * of the properties and comments, and a second time to add any custom comments that + * were at the top of the file and to separate comments by new lines (which ConfigMe + * currently doesn't support). + */ +public class MessagesFileWriter { + + /** Marker used inside a text to signal that it should be a comment later on. */ + private static final String COMMENT_MARKER = "::COMMENT::"; + + private static final Pattern SPACES_BEFORE_TEXT_PATTERN = Pattern.compile("(\\s+)\\w.*"); + + /** The messages file to update. */ + private final File file; + /** Messages from the default file. */ + private final FileConfiguration defaultFile; + + private MessagesFileWriter(File file, FileConfiguration defaultFile) { + this.file = file; + this.defaultFile = defaultFile; + } + + public static void writeToFileWithCommentsFromDefault(File file, FileConfiguration configuration) { + new MessagesFileWriter(file, configuration).performWrite(); + } + + private void performWrite() { + // Store initial comments so we can add them back later + List initialComments = getInitialUserComments(); + + // Create property resource with new defaults, save with ConfigMe for proper sections & comments + PropertyResource resource = createPropertyResourceWithCommentEntries(); + new SettingsManager(resource, null, MessageUpdater.CONFIGURATION_DATA).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 + rewriteToFileWithComments(initialComments); + } + + /** + * @return any custom comments at the top of the file, for later usage + */ + private List getInitialUserComments() { + final List initialComments = new ArrayList<>(); + final String firstCommentByConfigMe = getFirstCommentByConfigMe(); + + for (String line : FileIoUtils.readLinesFromFile(file.toPath())) { + if (line.isEmpty() || line.startsWith("#") && !line.equals(firstCommentByConfigMe)) { + initialComments.add(line); + } else { + break; + } + } + // Small fix: so we can keep running this writer and get the same result, we need to make sure that any ending + // empty lines are removed + for (int i = initialComments.size() - 1; i >= 0; --i) { + if (initialComments.get(i).isEmpty()) { + initialComments.remove(i); + } else { + break; + } + } + return initialComments; + } + + /** + * @return the first comment generated by ConfigMe (comment of the first root path) + */ + private static String getFirstCommentByConfigMe() { + ConfigurationData configurationData = MessageUpdater.CONFIGURATION_DATA; + String firstRootPath = configurationData.getProperties().get(0).getPath().split("\\.")[0]; + return "# " + configurationData.getCommentsForSection(firstRootPath)[0]; + } + + /** + * @return generated {@link PropertyResource} with missing entries taken from the default file and marked + * with the {@link #COMMENT_MARKER} + */ + private PropertyResource createPropertyResourceWithCommentEntries() { + YamlFileResource resource = new MigraterYamlFileResource(file); + for (Property property : MessageUpdater.CONFIGURATION_DATA.getProperties()) { + String text = resource.getString(property.getPath()); + if (text == null) { + resource.setValue(property.getPath(), COMMENT_MARKER + defaultFile.getString(property.getPath())); + } + } + return resource; + } + + /** + * Writes to the file again, adding the provided initial comments at the top of the file and converting + * any entries marked with {@link #COMMENT_MARKER} to YAML comments. + * + * @param initialComments the comments at the top of the file to add back + */ + private void rewriteToFileWithComments(List initialComments) { + List newLines = new ArrayList<>(initialComments); + + for (String line : FileIoUtils.readLinesFromFile(file.toPath())) { + if (line.contains(COMMENT_MARKER)) { + String lineAsYamlComment = convertLineWithCommentMarkerToYamlComment(line); + newLines.add(lineAsYamlComment); + } else if (line.startsWith("#") && !newLines.isEmpty()) { + // ConfigMe doesn't support empty line between comments, so here we check if we have a comment that + // isn't at the very top and sneak in an empty line if so. + newLines.add(""); + newLines.add(line); + } else if (!line.isEmpty()) { + // ConfigMe adds an empty line at the beginning, so check here that we don't include any empty lines... + newLines.add(line); + } + } + + FileIoUtils.writeToFile(file.toPath(), String.join("\n", newLines)); + } + + private static String convertLineWithCommentMarkerToYamlComment(String line) { + Matcher matcher = SPACES_BEFORE_TEXT_PATTERN.matcher(line); + if (matcher.matches()) { + String spacesBefore = matcher.group(1); + return spacesBefore + "# TODO " + line.replace(COMMENT_MARKER, "").trim(); + } else { + throw new IllegalStateException("Space-counting pattern unexpectedly did not match on line '" + line + "'"); + } + } +} diff --git a/src/test/java/tools/messages/VerifyMessagesTask.java b/src/test/java/tools/messages/VerifyMessagesTask.java index b7e1efe1b..d665ce89a 100644 --- a/src/test/java/tools/messages/VerifyMessagesTask.java +++ b/src/test/java/tools/messages/VerifyMessagesTask.java @@ -1,9 +1,10 @@ package tools.messages; import com.google.common.collect.Multimap; +import de.bananaco.bpermissions.imp.YamlConfiguration; import fr.xephi.authme.message.MessageKey; import fr.xephi.authme.util.StringUtils; -import tools.utils.FileIoUtils; +import org.bukkit.configuration.file.FileConfiguration; import tools.utils.ToolTask; import tools.utils.ToolsConstants; @@ -15,7 +16,6 @@ import java.util.Map; import java.util.Scanner; import java.util.Set; import java.util.regex.Pattern; -import java.util.stream.Collectors; import static tools.utils.FileIoUtils.listFilesOrThrow; @@ -54,9 +54,9 @@ public final class VerifyMessagesTask implements ToolTask { messageFiles = Collections.singletonList(customFile); } - List defaultFileElements = null; + FileConfiguration defaultFileConfiguration = null; if (addMissingKeys) { - defaultFileElements = MessageFileElementReader.readFileIntoElements(new File(DEFAULT_MESSAGES_FILE)); + defaultFileConfiguration = YamlConfiguration.loadConfiguration(new File(DEFAULT_MESSAGES_FILE)); } // Verify the given files @@ -65,7 +65,7 @@ public final class VerifyMessagesTask implements ToolTask { MessageFileVerifier verifier = new MessageFileVerifier(file); if (addMissingKeys) { outputVerificationResults(verifier); - updateMessagesFile(file, verifier, defaultFileElements); + updateMessagesFile(file, verifier, defaultFileConfiguration); } else { outputVerificationResults(verifier); } @@ -104,18 +104,13 @@ public final class VerifyMessagesTask implements ToolTask { * * @param file the file to update * @param verifier the verifier whose results should be used - * @param defaultFileElements default file elements to base the new file structure on + * @param defaultConfiguration default file configuration to retrieve missing texts from */ private static void updateMessagesFile(File file, MessageFileVerifier verifier, - List defaultFileElements) { - List messageFileElements = MessageFileElementReader.readFileIntoElements(file); - String newMessageFileContents = MessageFileElementMerger - .mergeElements(messageFileElements, defaultFileElements, verifier.getMissingTags().asMap()) - .stream() - .map(MessageFileElement::getLines) - .flatMap(List::stream) - .collect(Collectors.joining("\n")); - FileIoUtils.writeToFile(file.toPath(), newMessageFileContents + "\n"); + FileConfiguration defaultConfiguration) { + if (verifier.hasErrors()) { + MessagesFileWriter.writeToFileWithCommentsFromDefault(file, defaultConfiguration); + } }