mirror of
https://e.coding.net/circlecloud/AuthMe.git
synced 2024-11-14 00:28:57 +00:00
Translation some message...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
a1176afa15
commit
497b0154b2
@ -310,7 +310,7 @@ public class AuthMe extends JavaPlugin {
|
||||
if (Settings.isBackupActivated && Settings.isBackupOnStop) {
|
||||
final boolean Backup = new PerformBackup(this).doBackup();
|
||||
if (Backup) {
|
||||
ConsoleLogger.info("Backup performed correctly.");
|
||||
ConsoleLogger.info("数据文件备份完成.");
|
||||
} else {
|
||||
ConsoleLogger.showError("Error while performing the backup!");
|
||||
}
|
||||
@ -320,7 +320,7 @@ public class AuthMe extends JavaPlugin {
|
||||
moduleManager.unloadModules();
|
||||
|
||||
// Disabled correctly
|
||||
ConsoleLogger.info("AuthMe " + this.getDescription().getVersion() + " disabled!");
|
||||
ConsoleLogger.info("AuthMe " + this.getDescription().getVersion() + " 已卸载!");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@ -353,7 +353,7 @@ public class AuthMe extends JavaPlugin {
|
||||
Settings.reload();
|
||||
} catch (final Exception e) {
|
||||
ConsoleLogger.writeStackTrace(e);
|
||||
ConsoleLogger.showError("Can't load the configuration file... Something went wrong, to avoid security issues the server will shutdown!");
|
||||
ConsoleLogger.showError("无法载入配置文件... 某些配置是错误的, 为了安全考虑 服务器即将关闭!");
|
||||
server.shutdown();
|
||||
return;
|
||||
}
|
||||
@ -408,7 +408,7 @@ public class AuthMe extends JavaPlugin {
|
||||
if (Settings.isBackupActivated && Settings.isBackupOnStart) {
|
||||
// Do backup and check return value!
|
||||
if (new PerformBackup(this).doBackup()) {
|
||||
ConsoleLogger.info("Backup performed correctly");
|
||||
ConsoleLogger.info("数据备份完成");
|
||||
} else {
|
||||
ConsoleLogger.showError("Error while performing the backup!");
|
||||
}
|
||||
@ -420,7 +420,7 @@ public class AuthMe extends JavaPlugin {
|
||||
} catch (final Exception e) {
|
||||
ConsoleLogger.writeStackTrace(e);
|
||||
ConsoleLogger.showError(e.getMessage());
|
||||
ConsoleLogger.showError("Fatal error occurred during database connection! Authme initialization ABORTED!");
|
||||
ConsoleLogger.showError("连接数据库期间发生错误! Authme 初始化 中断 关闭服务器!");
|
||||
stopOrUnload();
|
||||
return;
|
||||
}
|
||||
@ -619,7 +619,7 @@ public class AuthMe extends JavaPlugin {
|
||||
// Stop/unload the server/plugin as defined in the configuration
|
||||
public void stopOrUnload() {
|
||||
if (Settings.isStopEnabled) {
|
||||
ConsoleLogger.showError("THE SERVER IS GOING TO SHUTDOWN AS DEFINED IN THE CONFIGURATION!");
|
||||
ConsoleLogger.showError("根据您的配置 服务器即将关闭...");
|
||||
server.shutdown();
|
||||
} else {
|
||||
server.getPluginManager().disablePlugin(AuthMe.getInstance());
|
||||
@ -713,7 +713,7 @@ public class AuthMe extends JavaPlugin {
|
||||
if (database.isAuthAvailable(name)) {
|
||||
if (PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
final String email = database.getAuth(name).getEmail();
|
||||
if (email == null || email.isEmpty() || email.equalsIgnoreCase("your@email.com")) {
|
||||
if (email == null || email.isEmpty() || email.equalsIgnoreCase("mc@mc.com")) {
|
||||
m.send(player, "add_email");
|
||||
}
|
||||
}
|
||||
|
@ -83,14 +83,14 @@ public final class Settings extends YamlConfiguration {
|
||||
|
||||
public static String checkLang(final String lang) {
|
||||
if (new File(APLUGIN_FOLDER, "messages" + File.separator + "messages_" + lang + ".yml").exists()) {
|
||||
ConsoleLogger.info("Set Language to: " + lang);
|
||||
ConsoleLogger.info("配置语言文件: " + lang);
|
||||
return lang;
|
||||
}
|
||||
if (AuthMe.class.getResourceAsStream("/messages/messages_" + lang + ".yml") != null) {
|
||||
ConsoleLogger.info("Set Language to: " + lang);
|
||||
ConsoleLogger.info("配置语言文件: " + lang);
|
||||
return lang;
|
||||
}
|
||||
ConsoleLogger.info("Language file not found for " + lang + ", set to default language: en !");
|
||||
ConsoleLogger.info("语言文件未找到 " + lang + ", 使用默认语言: en !");
|
||||
return "en";
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ public final class Settings extends YamlConfiguration {
|
||||
if (!email.contains("@")) {
|
||||
return false;
|
||||
}
|
||||
if (email.equalsIgnoreCase("your@email.com")) {
|
||||
if (email.equalsIgnoreCase("mc@mc.com")) {
|
||||
return false;
|
||||
}
|
||||
final String emailDomain = email.split("@")[1];
|
||||
@ -319,7 +319,7 @@ public final class Settings extends YamlConfiguration {
|
||||
}
|
||||
|
||||
public static void reload() throws Exception {
|
||||
plugin.getLogger().info("Loading Configuration File...");
|
||||
plugin.getLogger().info("载入配置文件...");
|
||||
final boolean exist = SETTINGS_FILE.exists();
|
||||
if (!exist) {
|
||||
plugin.saveDefaultConfig();
|
||||
@ -369,7 +369,7 @@ public final class Settings extends YamlConfiguration {
|
||||
try {
|
||||
return DataSource.DataSourceType.valueOf(configFile.getString(key, "sqlite").toUpperCase());
|
||||
} catch (final IllegalArgumentException ex) {
|
||||
ConsoleLogger.showError("Unknown database backend; defaulting to sqlite database");
|
||||
ConsoleLogger.showError("未知的数据库类型; 默认使用SQLite...");
|
||||
return DataSource.DataSourceType.SQLITE;
|
||||
}
|
||||
}
|
||||
@ -379,7 +379,7 @@ public final class Settings extends YamlConfiguration {
|
||||
try {
|
||||
return HashAlgorithm.valueOf(configFile.getString(key, "SHA256").toUpperCase());
|
||||
} catch (final IllegalArgumentException ex) {
|
||||
ConsoleLogger.showError("Unknown Hash Algorithm; defaulting to SHA256");
|
||||
ConsoleLogger.showError("未知的密码加密; 默认使用 SHA256 ...");
|
||||
return HashAlgorithm.SHA256;
|
||||
}
|
||||
}
|
||||
@ -394,9 +394,9 @@ public final class Settings extends YamlConfiguration {
|
||||
try {
|
||||
final FileWriter fw = new FileWriter(plugin.getDataFolder() + File.separator + "welcome.txt", true);
|
||||
final BufferedWriter w = new BufferedWriter(fw);
|
||||
w.write("Welcome {PLAYER} on {SERVER} server");
|
||||
w.write("§6欢迎 §a{PLAYER} §6来到 §b{SERVER} §6服务器");
|
||||
w.newLine();
|
||||
w.write("This server use AuthMe protection!");
|
||||
w.write("§a当前服务器使用 §dAuthMe §a登陆系统 §6- §c重制 By:喵♂呜!");
|
||||
w.close();
|
||||
} catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
@ -612,8 +612,8 @@ public final class Settings extends YamlConfiguration {
|
||||
}
|
||||
|
||||
if (changes) {
|
||||
plugin.getLogger().warning("Merged new Config Options - I'm not an error, please don't report me");
|
||||
plugin.getLogger().warning("Please check your config.yml file for new configs!");
|
||||
plugin.getLogger().warning("已合并新的配置选项 - 这不是一个错误, 请不要反馈给我");
|
||||
plugin.getLogger().warning("请检查新的 config.yml 文件 并修改相关配置!");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user