Manual messages fixes; refine messages verifier

- Add messages with new line to same line with &n
- Add German translation for missing key
- Adjust messages filename pattern to include Chinese files (with 4-letter codes)
- Change verifier to only output errors (more "to-the-point" output)
This commit is contained in:
ljacqu 2015-12-10 19:42:19 +01:00
parent c50c9efe83
commit f5583f4435
4 changed files with 7 additions and 13 deletions

View File

@ -1,8 +1,7 @@
unknown_user: '&fПотребителя не е в БД'
unsafe_spawn: '&fТвоята локация когато излезе не беше безопасна, телепортиран си на Spawn!'
not_logged_in: '&cНе си влязъл!'
reg_voluntarily: '&fМоже да се регистрираш с тази команда:
"/register парола парола"'
reg_voluntarily: '&fМоже да се регистрираш с тази команда:&n "/register парола парола"'
usage_log: '&cКоманда: /login парола'
wrong_pwd: '&cГрешна парола!'
unregistered: '&cУспешно от-регистриран!'
@ -24,7 +23,7 @@ user_unknown: '&cПотребителя не е регистриран'
password_error: '&fПаролата не съвпада'
password_error_nick: '&fYou can''t use your name as password'
password_error_unsafe: '&fYou can''t use unsafe passwords'
invalid_session: '&fSession Dataes doesnt corrispond Plaese wait the end of session'
invalid_session: '&cYour IP has been changed and your session data has expired!'
reg_only: '&fСамо за регистрирани! Моля посети http://example.com за регистрация'
logged_in: '&cВече сте влязъл!'
logout: '&cУспешен изход от регистрацията!'

View File

@ -56,3 +56,4 @@ email_exists: '&cEine Wiederherstellungs-Email wurde bereits versandt! Nutze fol
country_banned: '&4Dein Land ist gesperrt'
antibot_auto_enabled: '&4[AntiBotService] AntiBotMod wurde aufgrund hoher Netzauslastung automatisch aktiviert!'
antibot_auto_disabled: '&2[AntiBotService] AntiBotMod wurde nach %m Minuten deaktiviert, hoffentlich ist die Invasion vorbei'
kick_antibot: 'AntiBotMod ist aktiviert! Bitte warte einige Minuten, bevor du dich mit dem Server verbindest'

View File

@ -1,8 +1,7 @@
unknown_user: '&fO usuario non está na base de datos'
unsafe_spawn: '&fA localización dende a que saíches era insegura, teletransportándote ao spawn do mundo'
not_logged_in: '&cNon te identificaches!'
reg_voluntarily: '&fPodes rexistrar o teu nome no servidor co comando
"/register <contrasinal> <confirmarContrasinal>"'
reg_voluntarily: '&fPodes rexistrar o teu nome no servidor co comando "/register <contrasinal> <confirmarContrasinal>"'
usage_log: '&cUso: /login <contrasinal>'
wrong_pwd: '&cContrasinal equivocado'
unregistered: '&cFeito! Xa non estás rexistrado!'
@ -55,5 +54,4 @@ email_changed: '[AuthMe] Cambiouse o correo!'
email_send: '[AuthMe] Enviouse o correo de confirmación!'
country_banned: 'O teu país está bloqueado neste servidor'
antibot_auto_enabled: '[AuthMe] AntiBotMod conectouse automáticamente debido a conexións masivas!'
antibot_auto_disabled: '[AuthMe] AntiBotMod desactivouse automáticamente despois de %m minutos,
esperemos que a invasión se detivera'
antibot_auto_disabled: '[AuthMe] AntiBotMod desactivouse automáticamente despois de %m minutos,&n esperemos que a invasión se detivera'

View File

@ -68,8 +68,6 @@ public final class MessagesVerifierRunner {
private static void verifyFile(MessageFileVerifier verifier) {
Map<String, Boolean> missingKeys = verifier.getMissingKeys();
if (missingKeys.isEmpty()) {
System.out.println(" No missing keys");
} else {
System.out.println(" Missing keys: " + missingKeys.keySet());
}
@ -81,9 +79,7 @@ public final class MessagesVerifierRunner {
private static void verifyFileAndAddKeys(MessageFileVerifier verifier, Map<String, String> defaultMessages) {
Map<String, Boolean> missingKeys = verifier.getMissingKeys();
if (missingKeys.isEmpty()) {
System.out.println(" No missing keys");
} else {
if (!missingKeys.isEmpty()) {
verifier.addMissingKeys(defaultMessages);
missingKeys = verifier.getMissingKeys();
List<String> addedKeys = getKeysWithValue(Boolean.TRUE, missingKeys);
@ -132,7 +128,7 @@ public final class MessagesVerifierRunner {
}
private static List<File> getMessagesFiles() {
final Pattern messageFilePattern = Pattern.compile("messages_[a-z]{2,3}\\.yml");
final Pattern messageFilePattern = Pattern.compile("messages_[a-z]{2,7}\\.yml");
File folder = new File(MESSAGES_FOLDER);
File[] files = folder.listFiles();
if (files == null) {