mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-03-21 17:48:28 -05:00
parent
bf31d9119f
commit
533c870ca5
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"StatNames": {
|
||||
"Names": ["KP", "Ang", "Vert", "Init", "SpA", "SpV"],
|
||||
"Names": ["KP", "Ang", "Vert", "SpA", "SpV", "Init"],
|
||||
"ValueGap": " ",
|
||||
"Separator": " / "
|
||||
},
|
||||
"StatNamesFull": {
|
||||
"Names": ["KP", "Angriff", "Verteidigung", "Initiative", "Sp. Angriff", "Sp. Verteidigung"],
|
||||
"Names": ["KP", "Angriff", "Verteidigung", "Spez. Ang.", "Spez. Vert.", "Initiative"],
|
||||
"ValueGap": " ",
|
||||
"Separator": " / "
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"StatNames": {
|
||||
"Names": ["PS", "Atq", "Def", "AtS", "DeS", "Vel"],
|
||||
"Names": ["PS", "Atq", "Def", "Asp", "Dsp", "Vel"],
|
||||
"ValueGap": " ",
|
||||
"Separator": " / "
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"StatNames": {
|
||||
"Names": ["PV", "Atq", "Déf", "AttS", "DéfS", "Vit"],
|
||||
"Names": ["PV", "Atq", "Dfs", "Asp", "Dsp", "Vit"],
|
||||
"ValueGap": " ",
|
||||
"Separator": " / "
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"StatNames": {
|
||||
"Names": ["PS", "Att", "Dif", "AtS", "DiS", "Vel"],
|
||||
"Names": ["PS", "Att", "Dif", "Asp", "Dsp", "Vel"],
|
||||
"ValueGap": " ",
|
||||
"Separator": " / "
|
||||
},
|
||||
"StatNamesFull": {
|
||||
"Names": ["PS", "Attacco", "Difesa", "Attacco Sp.", "Difesa Sp.", "Velocità"],
|
||||
"Names": ["PS", "Attacco", "Difesa", "Att. Spec.", "Dif. Spec.", "Velocità"],
|
||||
"ValueGap": " ",
|
||||
"Separator": " / "
|
||||
},
|
||||
|
|
|
|||
|
|
@ -197,6 +197,37 @@ public void SimulatorTranslate(string message, string languageOriginal = "en")
|
|||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void StatNamesNoSubstring()
|
||||
{
|
||||
var all = BattleTemplateLocalization.GetAll();
|
||||
foreach (var l in all)
|
||||
{
|
||||
var languageTarget = l.Key;
|
||||
var x = l.Value.Config;
|
||||
|
||||
CheckSubstring(x.StatNames.Names, languageTarget);
|
||||
CheckSubstring(x.StatNamesFull.Names, languageTarget);
|
||||
}
|
||||
|
||||
void CheckSubstring(string[] statNames, string languageTarget)
|
||||
{
|
||||
// ensure no stat name is a substring of another
|
||||
for (int i = 0; i < statNames.Length; i++)
|
||||
{
|
||||
var name = statNames[i];
|
||||
for (int j = 0; j < statNames.Length; j++)
|
||||
{
|
||||
if (i == j)
|
||||
continue;
|
||||
var other = statNames[j];
|
||||
if (other.Contains(name) || name.Contains(other))
|
||||
throw new Exception($"Stat name {name} is a substring of {other} in {languageTarget}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(SetAllTokenExample)]
|
||||
public void SimulatorTranslateHABCDS(string message, string languageOriginal = "en")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user