make localization 50 billion times faster

This commit is contained in:
Michael 2017-05-28 13:36:28 -04:00
parent 03ebdf42d9
commit 6123e06842
3 changed files with 8 additions and 7 deletions

View file

@ -343,10 +343,10 @@ namespace ShiftOS.WinForms.Applications
if (IsLeader)
{
//lblstats.Text = "Xspeed: " & Math.Abs(xVel) & " Yspeed: " & Math.Abs(yVel) & " Human Location: " & paddleHuman.Location.ToString & " Computer Location: " & paddleComputer.Location.ToString & Environment.NewLine & " Ball Location: " & ball.Location.ToString & " Xdec: " & xveldec & " Ydec: " & yveldec & " Xinc: " & incrementx & " Yinc: " & incrementy
lblstatsX.Text = Localization.Parse("{H_VEL}: ") + xveldec;
lblstatsY.Text = Localization.Parse("{V_VEL}: ") + yveldec;
lblstatscodepoints.Text = Localization.Parse("{CODEPOINTS}: ") + (levelrewards[level - 1] + beatairewardtotal).ToString();
lbllevelandtime.Text = Localization.Parse("{LEVEL}: " + level + " - " + secondsleft + " {SECONDS_LEFT}");
lblstatsX.Text = "X vel: " + xveldec;
lblstatsY.Text = "Y vel: " + yveldec;
lblstatscodepoints.Text = "Codepoints: " + (levelrewards[level - 1] + beatairewardtotal).ToString();
lbllevelandtime.Text = "Level: " + level + " - " + secondsleft + " seconds left";
if (xVel > 20 || xVel < -20)
{
@ -634,7 +634,7 @@ namespace ShiftOS.WinForms.Applications
CompleteLevel();
}
lblstatscodepoints.Text = Localization.Parse("{CODEPOINTS}: ") + (levelrewards[level - 1] + beatairewardtotal).ToString();
lblstatscodepoints.Text = "Codepoints: " + (levelrewards[level - 1] + beatairewardtotal).ToString();
}
}
SetupStats();

View file

@ -1,4 +1,3 @@
#define SLOW_LOCALIZATION
/*
* MIT License

View file

@ -160,7 +160,9 @@ namespace ShiftOS.Engine
{"%domain", domainReplace},
{"%ns", namespaceReplace},
{"%cmd", commandReplace},
{"%cp", SaveSystem.CurrentSave?.Codepoints.ToString() },
#if LOCALIZE_CODEPOINTS
{ "%cp", SaveSystem.CurrentSave?.Codepoints.ToString() },
#endif
};
// actually do the replacement