Skip to content

Commit

Permalink
fix: cleanup translations
Browse files Browse the repository at this point in the history
  • Loading branch information
oscar-wos committed Jul 3, 2024
1 parent 5b87275 commit cc1e693
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"ct": "CT",
"both": "Both",
"missingPermission": "Missing permission: {red}{0}",
"invalidInput": "Invalid input: '{red}{0}{white}' ({orange}{1}{white})",
"invalidInput": "Invalid input: \"{red}{0}{white}\" ({orange}{1}{white})",
"saving": "Saving {0} \"{1}\"",
"rushDisabled": "Rush Zones {red}disabled{white}",
"campEnabled": "Camp Zones {olive}enabled{white}",
"delayRemaining": " in {green}{0}{white} second(s)",
"rushDelayRemaining": " {red}disabled{white} in {green}{0}{white} second(s)",
"hurtDamage": " for {green}{0}{white} damage",
"delayRemaining": "{0} in {green}{1}{white} second(s)",
"rushDelayRemaining": "{0} {red}disabled{white} in {green}{1}{white} second(s)",
"hurtDamage": "{0} for {green}{1}{white} damage",
"zone.Bounce": "Bounce",
"zone.Hurt": "Hurt",
"zone.Kill": "Kill",
Expand Down
4 changes: 2 additions & 2 deletions src/AntiRush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ private bool PrintAction(CCSPlayerController controller, Zone zone)
if (zone.Type is (ZoneType.Bounce or ZoneType.Teleport))
{
controller.PrintToChat(Config.NoRushTime != 0
? $"{Prefix}{zone.ToString(Localizer)}{Localizer["rushDelayRemaining", (_roundStart + Config.NoRushTime - Server.CurrentTime).ToString("0")]}"
? $"{Prefix}{Localizer["rushDelayRemaining", zone.ToString(Localizer), (_roundStart + Config.NoRushTime - Server.CurrentTime).ToString("0")]}"
: $"{Prefix}{zone.ToString(Localizer)}");

return true;
}

if (zone.Type == ZoneType.Hurt)
{
controller.PrintToChat($"{Prefix}{zone.ToString(Localizer)}{Localizer["hurtDamage", zone.Damage]}");
controller.PrintToChat($"{Prefix}{Localizer["hurtDamage", zone.ToString(Localizer), zone.Damage]}");
return true;
}

Expand Down
6 changes: 3 additions & 3 deletions src/Listeners.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ private void OnTick()
var diff = (Config.NoRushTime + _roundStart) - Server.CurrentTime;

if (diff > 0 && Print(diff))
Server.PrintToChatAll($"{Prefix}{Localizer["rushDisabled"]}{Localizer["delayRemaining", diff.ToString("0")]}");
Server.PrintToChatAll($"{Prefix}{Localizer["delayRemaining", Localizer["rushDisabled"], diff.ToString("0")]}");
else if (diff == 0)
Server.PrintToChatAll($"{Prefix}{Localizer["rushDisabled"]}");
}
Expand All @@ -25,7 +25,7 @@ private void OnTick()
var diff = (Config.NoCampTime + _roundStart) - Server.CurrentTime;

if (diff > 0 && Print(diff))
Server.PrintToChatAll($"{Prefix}{Localizer["campEnabled"]}{Localizer["delayRemaining", diff.ToString("0")]}");
Server.PrintToChatAll($"{Prefix}{Localizer["delayRemaining", Localizer["campEnabled"], diff.ToString("0")]}");
else if (diff == 0)
Server.PrintToChatAll($"{Prefix}{Localizer["campEnabled"]}");
}
Expand Down Expand Up @@ -74,7 +74,7 @@ private void OnTick()
var diffString = diff % 1;

if (diffString.ToString("0.00") is ("0.00" or "0.01") && diff >= 1)
controller.PrintToChat($"{Prefix}{zone.ToString(Localizer)}{Localizer["delayRemaining", diff.ToString("0")]}");
controller.PrintToChat($"{Prefix}{Localizer["delayRemaining", zone.ToString(Localizer), diff.ToString("0")]}");
}
else
DoAction(controller, zone);
Expand Down

0 comments on commit cc1e693

Please sign in to comment.