Enhance Invalid Convert Error (#2305)

Makes it clearer for conversion failure with Pokemon files - prevent confusion with save files.
This commit is contained in:
ReignOfComputer 2019-05-14 06:38:33 +08:00 committed by Kurt
parent 2b39d75141
commit 6c42e3b1bb
10 changed files with 11 additions and 1 deletions

View file

@ -50,6 +50,7 @@ MsgFileWriteProtected = File's location is write protected:
MsgFileWriteProtectedAdvice = If the file is on a removable disk (SD card), please ensure the write protection switch is not set.
MsgFileInUse = Unable to load file. It could be in use by another program.
MsgFileUnsupported = Attempted to load an unsupported file type/size. This could mean PKHeX doesn't support your save file or your save file is corrupt.
MsgPKMUnsupported = Attempted to load an unsupported file type/size. This could be caused by loading a different generation Pokemon file on an unsupported generation or your file is corrupt.
MsgPKMConvertSuccess = Converted from {0} to {1}.
MsgPKMConvertFail = Conversion failed.
MsgPKMMysteryGiftFail = Mystery Gift is not a Pokémon.

View file

@ -50,6 +50,7 @@ MsgFileWriteProtected = File's location is write protected:
MsgFileWriteProtectedAdvice = If the file is on a removable disk (SD card), please ensure the write protection switch is not set.
MsgFileInUse = Unable to load file. It could be in use by another program.
MsgFileUnsupported = Attempted to load an unsupported file type/size. This could mean PKHeX doesn't support your save file or your save file is corrupt.
MsgPKMUnsupported = Attempted to load an unsupported file type/size. This could be caused by loading a different generation Pokemon file on an unsupported generation or your file is corrupt.
MsgPKMConvertSuccess = Converted from {0} to {1}.
MsgPKMConvertFail = Conversion failed.
MsgPKMMysteryGiftFail = Mystery Gift is not a Pokémon.

View file

@ -50,6 +50,7 @@ MsgFileWriteProtected = La localización del archivo está protegida contra escr
MsgFileWriteProtectedAdvice = Si el archivo está en un disco extraíble (tarjeta SD), por favor asegúrate de que el interroptur de protección contra escritura no esté activado.
MsgFileInUse = No se ha podido cargar el archivo. Puede que esté siendo usado por otro programa.
MsgFileUnsupported = Se ha intentado cargar un tipo/tamaño de archivo no soportado.
MsgPKMUnsupported = Attempted to load an unsupported file type/size. This could be caused by loading a different generation Pokemon file on an unsupported generation or your file is corrupt.
MsgPKMConvertSuccess = Convertido de {0} a {1}.
MsgPKMConvertFail = Conversión fallida.
MsgPKMMysteryGiftFail = El Regalo Misterioso no es un Pokémon.

View file

@ -50,6 +50,7 @@ MsgFileWriteProtected = L'emplacement du fichier est en lecture seulement:
MsgFileWriteProtectedAdvice = Si le fichier est dans un disque amovible (ex: Carte SD), s'assurer que l'écriture dans le disque est permise.
MsgFileInUse = Fichier non chargé. Il se peut qu'il soit utilisé par un autre programme.
MsgFileUnsupported = Chargement de fichier de type / taille incompatible. Soit PKHeX ne prend pas votre fichier en charge, soit ce dernier est corrompu.
MsgPKMUnsupported = Attempted to load an unsupported file type/size. This could be caused by loading a different generation Pokemon file on an unsupported generation or your file is corrupt.
MsgPKMConvertSuccess = Conversion réussie de {0} à {1}.
MsgPKMConvertFail = Conversion ratée.
MsgPKMMysteryGiftFail = Le Cadeau Mystère n'est pas un Pokémon.

View file

@ -50,6 +50,7 @@ MsgFileWriteProtected = File's location is write protected:
MsgFileWriteProtectedAdvice = If the file is on a removable disk (SD card), please ensure the write protection switch is not set.
MsgFileInUse = Unable to load file. It could be in use by another program.
MsgFileUnsupported = Attempted to load an unsupported file type/size. This could mean PKHeX doesn't support your save file or your save file is corrupt.
MsgPKMUnsupported = Attempted to load an unsupported file type/size. This could be caused by loading a different generation Pokemon file on an unsupported generation or your file is corrupt.
MsgPKMConvertSuccess = Converted from {0} to {1}.
MsgPKMConvertFail = Conversion failed.
MsgPKMMysteryGiftFail = Mystery Gift is not a Pokémon.

View file

@ -50,6 +50,7 @@ MsgFileWriteProtected = File's location is write protected:
MsgFileWriteProtectedAdvice = If the file is on a removable disk (SD card), please ensure the write protection switch is not set.
MsgFileInUse = Unable to load file. It could be in use by another program.
MsgFileUnsupported = Attempted to load an unsupported file type/size. This could mean PKHeX doesn't support your save file or your save file is corrupt.
MsgPKMUnsupported = Attempted to load an unsupported file type/size. This could be caused by loading a different generation Pokemon file on an unsupported generation or your file is corrupt.
MsgPKMConvertSuccess = Converted from {0} to {1}.
MsgPKMConvertFail = Conversion failed.
MsgPKMMysteryGiftFail = Mystery Gift is not a Pokémon.

View file

@ -50,6 +50,7 @@ MsgFileWriteProtected = File's location is write protected:
MsgFileWriteProtectedAdvice = If the file is on a removable disk (SD card), please ensure the write protection switch is not set.
MsgFileInUse = Unable to load file. It could be in use by another program.
MsgFileUnsupported = Attempted to load an unsupported file type/size. This could mean PKHeX doesn't support your save file or your save file is corrupt.
MsgPKMUnsupported = Attempted to load an unsupported file type/size. This could be caused by loading a different generation Pokemon file on an unsupported generation or your file is corrupt.
MsgPKMConvertSuccess = Converted from {0} to {1}.
MsgPKMConvertFail = Conversion failed.
MsgPKMMysteryGiftFail = Mystery Gift is not a Pokémon.

View file

@ -50,6 +50,7 @@ MsgFileWriteProtected = 文件路径有写入保护:
MsgFileWriteProtectedAdvice = 如果文件在移动硬盘(SD卡)上,请确认没有打开写入保护。
MsgFileInUse = 无法加载文件。可能被其他程序占用中。
MsgFileUnsupported = 无法加载一个不支持的类型或大小的文件。
MsgPKMUnsupported = Attempted to load an unsupported file type/size. This could be caused by loading a different generation Pokemon file on an unsupported generation or your file is corrupt.
MsgPKMConvertSuccess = Converted from {0} to {1}.
MsgPKMConvertFail = 格式转换失败。
MsgPKMMysteryGiftFail = 神秘礼物不是一个宝可梦。

View file

@ -73,6 +73,7 @@ namespace PKHeX.Core
public static string MsgFileWriteProtectedAdvice { get; set; } = "If the file is on a removable disk (SD card), please ensure the write protection switch is not set.";
public static string MsgFileInUse { get; set; } = "Unable to load file. It could be in use by another program.";
public static string MsgFileUnsupported { get; set; } = "Attempted to load an unsupported file type/size. This could mean PKHeX doesn't support your save file or your save file is corrupt.";
public static string MsgPKMUnsupported { get; set; } = "Attempted to load an unsupported file type/size. This could be caused by loading a different generation Pokemon file on an unsupported generation or your file is corrupt.";
public static string MsgPKMConvertSuccess { get; set; } = "Converted from {0} to {1}.";
public static string MsgPKMConvertFail { get; set; } = "Conversion failed.";

View file

@ -584,7 +584,8 @@ namespace PKHeX.WinForms
if (obj != null && LoadFile(obj, path))
return;
WinFormsUtil.Error(MsgFileUnsupported,
string[] savTypes = { "", ".sav", ".dsv", ".dat", ".gci", ".bin" };
WinFormsUtil.Error(savTypes.Contains(Path.GetExtension(path)) ? MsgFileUnsupported : MsgPKMUnsupported,
$"{MsgFileLoad}{Environment.NewLine}{path}",
$"{string.Format(MsgFileSize, input.Length)}{Environment.NewLine}{input.Length} bytes (0x{input.Length:X4})");
}