Skip to content

Commit

Permalink
Don't do invariant when its related to translations
Browse files Browse the repository at this point in the history
  • Loading branch information
xen-42 committed Apr 28, 2024
1 parent 9d1b188 commit a188d53
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion NewHorizons/Components/ShipLog/ShipLogStarChartMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private void SetWarpTarget(ShipLogEntryCard shipLogEntryCard)

var name = UniqueIDToName(shipLogEntryCard.name);

var warpNotificationDataText = TranslationHandler.GetTranslation("WARP_LOCKED", TranslationHandler.TextType.UI).Replace("{0}", name.ToUpperInvariant());
var warpNotificationDataText = TranslationHandler.GetTranslation("WARP_LOCKED", TranslationHandler.TextType.UI).Replace("{0}", name.ToUpper());
_warpNotificationData = new NotificationData(warpNotificationDataText);
NotificationManager.SharedInstance.PostNotification(_warpNotificationData, true);

Expand Down
2 changes: 1 addition & 1 deletion NewHorizons/Handlers/TranslationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public static int AddUI(string rawText)
{
var uiTable = TextTranslation.Get().m_table.theUITable;

var text = GetTranslation(rawText, TextType.UI).ToUpperInvariant();
var text = GetTranslation(rawText, TextType.UI).ToUpper();

var key = uiTable.Keys.Max() + 1;
try
Expand Down
4 changes: 2 additions & 2 deletions NewHorizons/Patches/SignalPatches/AudioSignalPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static bool AudioSignal_SignalNameToString(SignalName name, ref string __
var customSignalName = SignalBuilder.GetCustomSignalName(name);
if (!string.IsNullOrEmpty(customSignalName))
{
__result = TranslationHandler.GetTranslation(customSignalName, TranslationHandler.TextType.UI, false).ToUpperInvariant();
__result = TranslationHandler.GetTranslation(customSignalName, TranslationHandler.TextType.UI, false).ToUpper();
return false;
}
return true;
Expand Down Expand Up @@ -68,7 +68,7 @@ public static bool AudioSignal_FrequencyToString(SignalFrequency frequency, ref
var customName = SignalBuilder.GetCustomFrequencyName(frequency);
if (!string.IsNullOrEmpty(customName))
{
if (NewHorizonsData.KnowsFrequency(customName)) __result = TranslationHandler.GetTranslation(customName, TranslationHandler.TextType.UI, false).ToUpperInvariant();
if (NewHorizonsData.KnowsFrequency(customName)) __result = TranslationHandler.GetTranslation(customName, TranslationHandler.TextType.UI, false).ToUpper();
else __result = UITextLibrary.GetString(UITextType.SignalFreqUnidentified);
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion NewHorizons/Utility/DebugTools/DebugReload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static class DebugReload

public static void InitializePauseMenu(IPauseMenuManager pauseMenu)
{
_reloadButton = pauseMenu.MakeSimpleButton(TranslationHandler.GetTranslation("Reload Configs", TranslationHandler.TextType.UI).ToUpperInvariant(), 3, true);
_reloadButton = pauseMenu.MakeSimpleButton(TranslationHandler.GetTranslation("Reload Configs", TranslationHandler.TextType.UI).ToUpper(), 3, true);
_reloadButton.OnSubmitAction += ReloadConfigs;
UpdateReloadButton();
}
Expand Down
2 changes: 1 addition & 1 deletion NewHorizons/Utility/DebugTools/Menu/DebugMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private void OnChangeStarSystem(string _)

public static void InitializePauseMenu(IPauseMenuManager pauseMenu)
{
pauseMenuButton = pauseMenu.MakeSimpleButton(TranslationHandler.GetTranslation("Toggle Dev Tools Menu", TranslationHandler.TextType.UI).ToUpperInvariant(), 3, true);
pauseMenuButton = pauseMenu.MakeSimpleButton(TranslationHandler.GetTranslation("Toggle Dev Tools Menu", TranslationHandler.TextType.UI).ToUpper(), 3, true);
_instance?.InitMenu();
}

Expand Down

0 comments on commit a188d53

Please sign in to comment.