PKHeX/PKHeX.Core/Legality/Enums/Severity.cs
Kurt 91c37ab573 Update legality check message string style
V### names weren't enjoyable to work with; use similar verbose style as
the program message strings.

updating the translation files with the remapped variable names shortly

remap list: https://pastebin.com/jybkVDAK
2018-09-01 14:11:12 -07:00

53 lines
1.6 KiB
C#

using static PKHeX.Core.LegalityCheckStrings;
namespace PKHeX.Core
{
/// <summary> Severity indication of the associated <see cref="CheckResult"/> </summary>
/// <remarks>
/// Severity &gt;= <see cref="Valid"/> is green
/// Severity == <see cref="Fishy"/> is yellow
/// Severity &lt;= <see cref="Invalid"/> is red
/// </remarks>
public enum Severity
{
/// <summary>
/// Cannot determine validity; not valid.
/// </summary>
Indeterminate = -2,
/// <summary>
/// Definitively not valid.
/// </summary>
Invalid = -1,
/// <summary>
/// Suspicious values, but still valid.
/// </summary>
Fishy = 0,
/// <summary>
/// Values are valid.
/// </summary>
Valid = 1,
}
public static partial class Extensions
{
/// <summary>
/// Converts a Check result Severity determination (Valid/Invalid/etc) to the localized string.
/// </summary>
/// <param name="s"><see cref="Severity"/> value to convert to string.</param>
/// <returns>Localized <see cref="string"/>.</returns>
public static string Description(this Severity s)
{
switch (s)
{
case Severity.Indeterminate: return L_SIndeterminate;
case Severity.Invalid: return L_SInvalid;
case Severity.Fishy: return L_SFishy;
case Severity.Valid: return L_SValid;
default: return L_SNotImplemented;
}
}
}
}