feat(i18n): Updated the localization files (#tf2)
This commit is contained in:
parent
f14457fd8b
commit
ba753deafd
5 changed files with 19 additions and 19 deletions
|
@ -9,7 +9,7 @@ public class I18NDict {
|
|||
public static final String CACHE = ERROR_KEY + "cache";
|
||||
public static final String MOJANG_NAME = ERROR_KEY + "mojang_name";
|
||||
public static final String MOJANG_SKIN = ERROR_KEY + "mojang_skin";
|
||||
public static final String SQL = ERROR_KEY + "sql";
|
||||
public static final String DATABASE = ERROR_KEY + "database";
|
||||
public static final String JSON = ERROR_KEY + "json";
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public class PlayerDataStore {
|
|||
}
|
||||
|
||||
public ActionResult saveData(Player player) {
|
||||
if (storage.isError()) return ActionResult.error(I18NDict.Error.SQL);
|
||||
if (storage.isError()) return ActionResult.error(I18NDict.Error.DATABASE);
|
||||
if (cache.isError()) return ActionResult.error(I18NDict.Error.CACHE);
|
||||
if (!cache.isCached(player.getUniqueId())) return ActionResult.error(I18NDict.Error.CACHE);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class MariaDBStorage extends Storage {
|
|||
@Override
|
||||
public ActionResult store(UUID uuid, NickoProfile profile) {
|
||||
final Connection connection = getProvider().getConnection();
|
||||
if (connection == null) return ActionResult.error(I18NDict.Error.SQL);
|
||||
if (connection == null) return ActionResult.error(I18NDict.Error.DATABASE);
|
||||
|
||||
try {
|
||||
final PreparedStatement statement = isStored(uuid) ?
|
||||
|
@ -45,7 +45,7 @@ public class MariaDBStorage extends Storage {
|
|||
return ActionResult.ok();
|
||||
} catch (SQLException e) {
|
||||
logger.warning("Couldn't send SQL Request: " + e.getMessage());
|
||||
return ActionResult.error(I18NDict.Error.SQL);
|
||||
return ActionResult.error(I18NDict.Error.DATABASE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,17 +103,17 @@ public class MariaDBStorage extends Storage {
|
|||
@Override
|
||||
public ActionResult delete(UUID uuid) {
|
||||
final Connection connection = getProvider().getConnection();
|
||||
if (connection == null) return ActionResult.error(I18NDict.Error.SQL);
|
||||
if (connection == null) return ActionResult.error(I18NDict.Error.DATABASE);
|
||||
|
||||
try {
|
||||
final String sql = "DELETE FROM nicko.DATA WHERE uuid = ?";
|
||||
final PreparedStatement statement = connection.prepareStatement(sql);
|
||||
statement.setString(1, uuid.toString());
|
||||
int rows = statement.executeUpdate();
|
||||
return (rows == 1 ? ActionResult.ok() : ActionResult.error(I18NDict.Error.SQL));
|
||||
return (rows == 1 ? ActionResult.ok() : ActionResult.error(I18NDict.Error.DATABASE));
|
||||
} catch (SQLException e) {
|
||||
logger.warning("Couldn't delete profile: " + e.getMessage());
|
||||
return ActionResult.error(I18NDict.Error.SQL);
|
||||
return ActionResult.error(I18NDict.Error.DATABASE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class MySQLStorage extends Storage {
|
|||
@Override
|
||||
public ActionResult store(UUID uuid, NickoProfile profile) {
|
||||
final Connection connection = getProvider().getConnection();
|
||||
if (connection == null) return ActionResult.error(I18NDict.Error.SQL);
|
||||
if (connection == null) return ActionResult.error(I18NDict.Error.DATABASE);
|
||||
|
||||
try {
|
||||
final PreparedStatement statement = isStored(uuid) ?
|
||||
|
@ -45,7 +45,7 @@ public class MySQLStorage extends Storage {
|
|||
return ActionResult.ok();
|
||||
} catch (SQLException e) {
|
||||
logger.warning("Couldn't send SQL Request: " + e.getMessage());
|
||||
return ActionResult.error(I18NDict.Error.SQL);
|
||||
return ActionResult.error(I18NDict.Error.DATABASE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,17 +103,17 @@ public class MySQLStorage extends Storage {
|
|||
@Override
|
||||
public ActionResult delete(UUID uuid) {
|
||||
final Connection connection = getProvider().getConnection();
|
||||
if (connection == null) return ActionResult.error(I18NDict.Error.SQL);
|
||||
if (connection == null) return ActionResult.error(I18NDict.Error.DATABASE);
|
||||
|
||||
try {
|
||||
final String sql = "DELETE FROM nicko.DATA WHERE uuid = ?";
|
||||
final PreparedStatement statement = connection.prepareStatement(sql);
|
||||
statement.setString(1, uuid.toString());
|
||||
int rows = statement.executeUpdate();
|
||||
return (rows == 1 ? ActionResult.ok() : ActionResult.error(I18NDict.Error.SQL));
|
||||
return (rows == 1 ? ActionResult.ok() : ActionResult.error(I18NDict.Error.DATABASE));
|
||||
} catch (SQLException e) {
|
||||
logger.warning("Couldn't delete profile: " + e.getMessage());
|
||||
return ActionResult.error(I18NDict.Error.SQL);
|
||||
return ActionResult.error(I18NDict.Error.DATABASE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
# Nicko ${version} - Config:
|
||||
# Nicko ${version} - Fichier de langue:
|
||||
|
||||
# Specifies the configuration version, don't change.
|
||||
version: "1.1.0"
|
||||
# Précise la version de la configuration, ne pas changer.
|
||||
version: "1.1.2"
|
||||
|
||||
error:
|
||||
generic: "Une erreur inconnue c'est produite."
|
||||
permission: "§cVous ne possédez pas la permission."
|
||||
invalid_username: "§cLe pseudo n'est pas un pseudo Minecraft valide."
|
||||
mojang_name: "Un compte Minecraft avec ce nom n'existe pas."
|
||||
mojang_skin: "Ce compte Minecraft n'a pas de skin."
|
||||
cache: "Impossible de récupérer le skin depuis le cache."
|
||||
sql: "Erreur SQL"
|
||||
mojang_name: "Compte Minecraft inexistant"
|
||||
mojang_skin: "Skin Minecraft invalide"
|
||||
cache: "Erreur du cache"
|
||||
database: "Erreur SQL"
|
||||
json: "Erreur JSON"
|
||||
|
||||
event:
|
||||
|
|
Loading…
Reference in a new issue