Skip to content

Commit

Permalink
translate server side stats entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinary1 committed Aug 12, 2024
1 parent 31a7479 commit 2ad1d41
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Content.Server/Anomaly/AnomalySynchronizerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private void OnPowerChanged(Entity<AnomalySynchronizerComponent> ent, ref PowerC
if (!TryComp<AnomalyComponent>(ent.Comp.ConnectedAnomaly, out var anomaly))
return;

DisconneсtFromAnomaly(ent, anomaly);
DisconnectFromAnomaly(ent, anomaly);
}

private void OnExamined(Entity<AnomalySynchronizerComponent> ent, ref ExaminedEvent args)
Expand Down Expand Up @@ -124,7 +124,7 @@ private void ConnectToAnomaly(Entity<AnomalySynchronizerComponent> ent, Entity<A

//TODO: disconnection from the anomaly should also be triggered if the anomaly is far away from the synchronizer.
//Currently only bluespace anomaly can do this, but for some reason it is the only one that cannot be connected to the synchronizer.
private void DisconneсtFromAnomaly(Entity<AnomalySynchronizerComponent> ent, AnomalyComponent anomaly)
private void DisconnectFromAnomaly(Entity<AnomalySynchronizerComponent> ent, AnomalyComponent anomaly)
{
if (ent.Comp.ConnectedAnomaly == null)
return;
Expand Down
7 changes: 4 additions & 3 deletions Content.Server/StatsBoard/StatsBoardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Localization;

namespace Content.Server.StatsBoard;

Expand Down Expand Up @@ -504,7 +505,7 @@ public string GetRoundStats()
}
}

result += "На станции были представители таких рас:";
result += Loc.GetString("statsentry-species-entry");
foreach (var speciesEntry in roundSpecies)
{
var species = speciesEntry.Key;
Expand All @@ -516,12 +517,12 @@ public string GetRoundStats()
mostPopularSpecies = species;
}

result += $"\n[bold][color=white]{Loc.GetString(species)}[/color][/bold] в количестве [color=white]{count}[/color].";
result += $"\n[bold][color=white]{Loc.GetString(species)}[/color][/bold] {Loc.GetString('statsentry-in-count')} [color=white]{count}[/color].";

Check failure on line 520 in Content.Server/StatsBoard/StatsBoardSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Too many characters in character literal

Check failure on line 520 in Content.Server/StatsBoard/StatsBoardSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Too many characters in character literal

Check failure on line 520 in Content.Server/StatsBoard/StatsBoardSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Too many characters in character literal

Check failure on line 520 in Content.Server/StatsBoard/StatsBoardSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Too many characters in character literal

Check failure on line 520 in Content.Server/StatsBoard/StatsBoardSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Too many characters in character literal

Check failure on line 520 in Content.Server/StatsBoard/StatsBoardSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Too many characters in character literal

Check failure on line 520 in Content.Server/StatsBoard/StatsBoardSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Too many characters in character literal

Check failure on line 520 in Content.Server/StatsBoard/StatsBoardSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Too many characters in character literal
}

if (mostPopularSpecies != null)
{
result += $"\nСамой распространённой расой стал [color=white]{Loc.GetString(mostPopularSpecies)}[/color].";
result += Loc.GetString("statsentry-mst-pop-species", ("name", Loc.GetString(mostPopularSpecies)));
}

var station = _station.GetStations().FirstOrDefault();
Expand Down
6 changes: 5 additions & 1 deletion Resources/Locale/ru-RU/_sunrise/statsboard/statsentry.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ statsentry-mouse-kill-cnt = Убито мышей { $name }\n
statsentry-cuff-time = Был в наручниках [color=yellow]{ $name )}[/color]\n
statsentry-space-time = Был в космосе [color=yellow]{ $name }[/color]\n
statsentry-sleep-time = Проспал [color=yellow]{ $name }[/color]\n
statsentry-int-cc = Трогал карту капитана: { $name }
statsentry-int-cc = Трогал карту капитана: { $name }
statsentry-species-entry = На станции были представители таких рас:
statsentry-in-count = В количестве
statsentry-mst-pop-species = \nСамой распространённой расой стал [color=white]{ $name }[/color].

0 comments on commit 2ad1d41

Please sign in to comment.