Skip to content

Commit

Permalink
Restore most of localisation except for mode names
Browse files Browse the repository at this point in the history
  • Loading branch information
KSP-TaxiService committed Jan 12, 2018
1 parent 733c5a0 commit 81b5ea4
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/CommNetConstellation/CommNetLayer/CNCCommNetUI.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CommNet;
using KSP.Localization;
using KSP.UI.Screens.Mapview;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -36,7 +37,6 @@ public enum CustomDisplayMode
public static CustomDisplayMode CustomModeTrackingStation = CustomDisplayMode.Network;
public static CustomDisplayMode CustomModeFlightMap = CustomDisplayMode.Path;
private static int CustomModeCount = Enum.GetValues(typeof(CustomDisplayMode)).Length;
private static readonly string displayModeMessagePrefix = "Link visualisation is ";

public static new CNCCommNetUI Instance
{
Expand Down Expand Up @@ -166,7 +166,10 @@ public override void ResetMode()
}

this.points.Clear();
ScreenMessages.PostScreenMessage(displayModeMessagePrefix + CNCCommNetUI.CustomMode.displayDescription(), CNCSettings.ScreenMessageDuration);
ScreenMessages.PostScreenMessage(Localizer.Format("#autoLOC_118264", new string[]
{
Localizer.Format(CNCCommNetUI.CustomMode.displayDescription())
}), CNCSettings.ScreenMessageDuration);
}

/// <summary>
Expand All @@ -187,7 +190,10 @@ public override void SwitchMode(int step)
}

this.points.Clear();
ScreenMessages.PostScreenMessage(displayModeMessagePrefix + CNCCommNetUI.CustomMode.displayDescription(), CNCSettings.ScreenMessageDuration);
ScreenMessages.PostScreenMessage(Localizer.Format("#autoLOC_118530", new string[]
{
Localizer.Format(CNCCommNetUI.CustomMode.displayDescription())
}), CNCSettings.ScreenMessageDuration);
}

/// <summary>
Expand Down Expand Up @@ -231,7 +237,10 @@ private void updateCustomisedView()
if (CustomModeTrackingStation != CustomDisplayMode.Network && CustomModeTrackingStation != CustomDisplayMode.MultiPaths)
{
CustomModeTrackingStation = CustomDisplayMode.Network;
ScreenMessages.PostScreenMessage(displayModeMessagePrefix + CustomModeTrackingStation.displayDescription(), CNCSettings.ScreenMessageDuration);
ScreenMessages.PostScreenMessage(Localizer.Format("#autoLOC_118264", new string[]
{
Localizer.Format(CustomModeTrackingStation.displayDescription())
}), CNCSettings.ScreenMessageDuration);
}
}
}
Expand Down

0 comments on commit 81b5ea4

Please sign in to comment.