Skip to content

Commit bc345d6

Browse files
committed
Better fix for InputSettings
1 parent 77661c4 commit bc345d6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Source/ORTS.Settings/InputSettings.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public enum KeyModifiers
6363
/// </remarks>
6464
public class InputSettings : SettingsBase
6565
{
66-
static GettextResourceManager catalog = new GettextResourceManager("ORTS.Common");
66+
static GettextResourceManager commonCatalog = new GettextResourceManager("ORTS.Common");
67+
static GettextResourceManager settingsCatalog = new GettextResourceManager("ORTS.Settings");
6768

6869
public static readonly UserCommandInput[] DefaultCommands = new UserCommandInput[Enum.GetNames(typeof(UserCommand)).Length];
6970
public readonly UserCommandInput[] Commands = new UserCommandInput[Enum.GetNames(typeof(UserCommand)).Length];
@@ -501,11 +502,11 @@ public string CheckForErrors()
501502
if (modInput != null)
502503
{
503504
if (modInput.Shift && modInput.IgnoreShift)
504-
errors.Add(catalog.GetStringFmt("{0} requires and is modified by Shift", GetPrettyLocalizedName(command)));
505+
errors.Add(settingsCatalog.GetStringFmt("{0} requires and is modified by Shift", GetPrettyLocalizedName(command)));
505506
if (modInput.Control && modInput.IgnoreControl)
506-
errors.Add(catalog.GetStringFmt("{0} requires and is modified by Control", GetPrettyLocalizedName(command)));
507+
errors.Add(settingsCatalog.GetStringFmt("{0} requires and is modified by Control", GetPrettyLocalizedName(command)));
507508
if (modInput.Alt && modInput.IgnoreAlt)
508-
errors.Add(catalog.GetStringFmt("{0} requires and is modified by Alt", GetPrettyLocalizedName(command)));
509+
errors.Add(settingsCatalog.GetStringFmt("{0} requires and is modified by Alt", GetPrettyLocalizedName(command)));
509510
}
510511
}
511512

@@ -536,7 +537,7 @@ public string CheckForErrors()
536537
var unique2 = input2.GetUniqueInputs();
537538
var sharedUnique = unique1.Where(id => unique2.Contains(id));
538539
foreach (var uniqueInput in sharedUnique)
539-
errors.Add(catalog.GetStringFmt("{0} and {1} both match {2}", GetPrettyLocalizedName(command1), GetPrettyLocalizedName(command2), GetPrettyUniqueInput(uniqueInput)));
540+
errors.Add(settingsCatalog.GetStringFmt("{0} and {1} both match {2}", GetPrettyLocalizedName(command1), GetPrettyLocalizedName(command2), GetPrettyUniqueInput(uniqueInput)));
540541
}
541542
}
542543

@@ -545,7 +546,7 @@ public string CheckForErrors()
545546

546547
public static string GetPrettyLocalizedName(Enum value)
547548
{
548-
return catalog.GetString(GetStringAttribute.GetPrettyName(value));
549+
return commonCatalog.GetString(GetStringAttribute.GetPrettyName(value));
549550
}
550551

551552
public static string GetPrettyCommandName(UserCommand command)

0 commit comments

Comments
 (0)