Skip to content

Commit a98cb6c

Browse files
Undo renaming catalog to Catalog, might be this is causing a merge conflict
1 parent 6bb75ad commit a98cb6c

File tree

2 files changed

+71
-71
lines changed

2 files changed

+71
-71
lines changed

Source/Menu/Options.cs

+65-65
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public partial class OptionsForm : Form
3939
readonly UpdateManager UpdateManager;
4040
readonly string BaseDocumentationUrl;
4141

42-
private GettextResourceManager Catalog = new GettextResourceManager("Menu");
42+
private GettextResourceManager catalog = new GettextResourceManager("Menu");
4343

4444
public class ComboBoxMember
4545
{
@@ -51,7 +51,7 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
5151
{
5252
InitializeComponent();
5353

54-
Localizer.Localize(this, Catalog);
54+
Localizer.Localize(this, catalog);
5555

5656
Settings = settings;
5757
UpdateManager = updateManager;
@@ -91,22 +91,22 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
9191
if (comboLanguage.SelectedValue == null) comboLanguage.SelectedIndex = 0;
9292

9393
comboOtherUnits.DataSource = new[] {
94-
new ComboBoxMember { Code = "Route", Name = Catalog.GetString("Route") },
95-
new ComboBoxMember { Code = "Automatic", Name = Catalog.GetString("Player's location") },
96-
new ComboBoxMember { Code = "Metric", Name = Catalog.GetString("Metric") },
97-
new ComboBoxMember { Code = "US", Name = Catalog.GetString("Imperial US") },
98-
new ComboBoxMember { Code = "UK", Name = Catalog.GetString("Imperial UK") },
94+
new ComboBoxMember { Code = "Route", Name = catalog.GetString("Route") },
95+
new ComboBoxMember { Code = "Automatic", Name = catalog.GetString("Player's location") },
96+
new ComboBoxMember { Code = "Metric", Name = catalog.GetString("Metric") },
97+
new ComboBoxMember { Code = "US", Name = catalog.GetString("Imperial US") },
98+
new ComboBoxMember { Code = "UK", Name = catalog.GetString("Imperial UK") },
9999
}.ToList();
100100
comboOtherUnits.DisplayMember = "Name";
101101
comboOtherUnits.ValueMember = "Code";
102102
comboOtherUnits.SelectedValue = Settings.Units;
103103

104104
comboPressureUnit.DataSource = new[] {
105-
new ComboBoxMember { Code = "Automatic", Name = Catalog.GetString("Automatic") },
106-
new ComboBoxMember { Code = "bar", Name = Catalog.GetString("bar") },
107-
new ComboBoxMember { Code = "PSI", Name = Catalog.GetString("psi") },
108-
new ComboBoxMember { Code = "inHg", Name = Catalog.GetString("inHg") },
109-
new ComboBoxMember { Code = "kgf/cm^2", Name = Catalog.GetString("kgf/cm²") },
105+
new ComboBoxMember { Code = "Automatic", Name = catalog.GetString("Automatic") },
106+
new ComboBoxMember { Code = "bar", Name = catalog.GetString("bar") },
107+
new ComboBoxMember { Code = "PSI", Name = catalog.GetString("psi") },
108+
new ComboBoxMember { Code = "inHg", Name = catalog.GetString("inHg") },
109+
new ComboBoxMember { Code = "kgf/cm^2", Name = catalog.GetString("kgf/cm²") },
110110
}.ToList();
111111
comboPressureUnit.DisplayMember = "Name";
112112
comboPressureUnit.ValueMember = "Code";
@@ -184,23 +184,23 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
184184

185185
// DataLogger tab
186186
var dictionaryDataLoggerSeparator = new Dictionary<string, string>();
187-
dictionaryDataLoggerSeparator.Add("comma", Catalog.GetString("comma"));
188-
dictionaryDataLoggerSeparator.Add("semicolon", Catalog.GetString("semicolon"));
189-
dictionaryDataLoggerSeparator.Add("tab", Catalog.GetString("tab"));
190-
dictionaryDataLoggerSeparator.Add("space", Catalog.GetString("space"));
187+
dictionaryDataLoggerSeparator.Add("comma", catalog.GetString("comma"));
188+
dictionaryDataLoggerSeparator.Add("semicolon", catalog.GetString("semicolon"));
189+
dictionaryDataLoggerSeparator.Add("tab", catalog.GetString("tab"));
190+
dictionaryDataLoggerSeparator.Add("space", catalog.GetString("space"));
191191
comboDataLoggerSeparator.DataSource = new BindingSource(dictionaryDataLoggerSeparator, null);
192192
comboDataLoggerSeparator.DisplayMember = "Value";
193193
comboDataLoggerSeparator.ValueMember = "Key";
194-
comboDataLoggerSeparator.Text = Catalog.GetString(Settings.DataLoggerSeparator);
194+
comboDataLoggerSeparator.Text = catalog.GetString(Settings.DataLoggerSeparator);
195195
var dictionaryDataLogSpeedUnits = new Dictionary<string, string>();
196-
dictionaryDataLogSpeedUnits.Add("route", Catalog.GetString("route"));
197-
dictionaryDataLogSpeedUnits.Add("mps", Catalog.GetString("m/s"));
198-
dictionaryDataLogSpeedUnits.Add("kmph", Catalog.GetString("km/h"));
199-
dictionaryDataLogSpeedUnits.Add("mph", Catalog.GetString("mph"));
196+
dictionaryDataLogSpeedUnits.Add("route", catalog.GetString("route"));
197+
dictionaryDataLogSpeedUnits.Add("mps", catalog.GetString("m/s"));
198+
dictionaryDataLogSpeedUnits.Add("kmph", catalog.GetString("km/h"));
199+
dictionaryDataLogSpeedUnits.Add("mph", catalog.GetString("mph"));
200200
comboDataLogSpeedUnits.DataSource = new BindingSource(dictionaryDataLogSpeedUnits, null);
201201
comboDataLogSpeedUnits.DisplayMember = "Value";
202202
comboDataLogSpeedUnits.ValueMember = "Key";
203-
comboDataLogSpeedUnits.Text = Catalog.GetString(Settings.DataLogSpeedUnits);
203+
comboDataLogSpeedUnits.Text = catalog.GetString(Settings.DataLogSpeedUnits);
204204
checkDataLogger.Checked = Settings.DataLogger;
205205
checkDataLogPerformance.Checked = Settings.DataLogPerformance;
206206
checkDataLogPhysics.Checked = Settings.DataLogPhysics;
@@ -215,18 +215,18 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
215215
checkListDataLogTSContents.Enabled = checkDataLogTrainSpeed.Checked;
216216
numericDataLogTSInterval.Value = Settings.DataLogTSInterval;
217217
checkListDataLogTSContents.Items.AddRange(new object[] {
218-
Catalog.GetString("Time"),
219-
Catalog.GetString("Train Speed"),
220-
Catalog.GetString("Max. Speed"),
221-
Catalog.GetString("Signal State"),
222-
Catalog.GetString("Track Elevation"),
223-
Catalog.GetString("Direction"),
224-
Catalog.GetString("Control Mode"),
225-
Catalog.GetString("Distance Travelled"),
226-
Catalog.GetString("Throttle %"),
227-
Catalog.GetString("Brake Cyl Press"),
228-
Catalog.GetString("Dyn Brake %"),
229-
Catalog.GetString("Gear Setting")
218+
catalog.GetString("Time"),
219+
catalog.GetString("Train Speed"),
220+
catalog.GetString("Max. Speed"),
221+
catalog.GetString("Signal State"),
222+
catalog.GetString("Track Elevation"),
223+
catalog.GetString("Direction"),
224+
catalog.GetString("Control Mode"),
225+
catalog.GetString("Distance Travelled"),
226+
catalog.GetString("Throttle %"),
227+
catalog.GetString("Brake Cyl Press"),
228+
catalog.GetString("Dyn Brake %"),
229+
catalog.GetString("Gear Setting")
230230
});
231231
for (var i = 0; i < checkListDataLogTSContents.Items.Count; i++)
232232
checkListDataLogTSContents.SetItemChecked(i, Settings.DataLogTSContents[i] == 1);
@@ -236,16 +236,16 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
236236
comboLanguage.Text = Settings.Language;
237237

238238
var updateChannelNames = new Dictionary<string, string> {
239-
{ "stable", Catalog.GetString("Stable (recommended)") },
240-
{ "testing", Catalog.GetString("Testing") },
241-
{ "unstable", Catalog.GetString("Unstable") },
242-
{ "", Catalog.GetString("None") },
239+
{ "stable", catalog.GetString("Stable (recommended)") },
240+
{ "testing", catalog.GetString("Testing") },
241+
{ "unstable", catalog.GetString("Unstable") },
242+
{ "", catalog.GetString("None") },
243243
};
244244
var updateChannelDescriptions = new Dictionary<string, string> {
245-
{ "stable", Catalog.GetString("Infrequent updates to official, hand-picked versions. Recommended for most users.") },
246-
{ "testing", Catalog.GetString("Weekly updates which may contain noticable defects. For project supporters.") },
247-
{ "unstable", Catalog.GetString("Daily updates which may contain serious defects. For developers only.") },
248-
{ "", Catalog.GetString("No updates.") },
245+
{ "stable", catalog.GetString("Infrequent updates to official, hand-picked versions. Recommended for most users.") },
246+
{ "testing", catalog.GetString("Weekly updates which may contain noticable defects. For project supporters.") },
247+
{ "unstable", catalog.GetString("Daily updates which may contain serious defects. For developers only.") },
248+
{ "", catalog.GetString("No updates.") },
249249
};
250250
var spacing = labelUpdateMode.Margin.Size;
251251
var indent = 180;
@@ -284,10 +284,10 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
284284
// see also function Message(CabControl control, ConfirmLevel level, string message)
285285
// in Source\Orts.Simulation\Simulation\Confirmer.cs
286286
comboControlConfirmations.DataSource = new[] {
287-
new ComboBoxMember { Code = "None", Name = Catalog.GetString("None") },
288-
new ComboBoxMember { Code = "Information", Name = Catalog.GetString("Information") },
289-
new ComboBoxMember { Code = "Warning", Name = Catalog.GetString("Warning") },
290-
new ComboBoxMember { Code = "Error", Name = Catalog.GetString("Error") },
287+
new ComboBoxMember { Code = "None", Name = catalog.GetString("None") },
288+
new ComboBoxMember { Code = "Information", Name = catalog.GetString("Information") },
289+
new ComboBoxMember { Code = "Warning", Name = catalog.GetString("Warning") },
290+
new ComboBoxMember { Code = "Error", Name = catalog.GetString("Error") },
291291
}.ToList();
292292
comboControlConfirmations.DisplayMember = "Name";
293293
comboControlConfirmations.ValueMember = "Code";
@@ -382,7 +382,7 @@ void InitializeKeyboardSettings()
382382
keyInputControl.ReadOnly = true;
383383
keyInputControl.Tag = command;
384384
panelKeys.Controls.Add(keyInputControl);
385-
toolTip1.SetToolTip(keyInputControl, Catalog.GetString("Click to change this key"));
385+
toolTip1.SetToolTip(keyInputControl, catalog.GetString("Click to change this key"));
386386

387387
++i;
388388
}
@@ -398,7 +398,7 @@ void SaveKeyboardSettings()
398398
void buttonOK_Click(object sender, EventArgs e)
399399
{
400400
var result = Settings.Input.CheckForErrors();
401-
if (result != "" && DialogResult.Yes != MessageBox.Show(Catalog.GetString("Continue with conflicting key assignments?\n\n") + result, Application.ProductName, MessageBoxButtons.YesNo))
401+
if (result != "" && DialogResult.Yes != MessageBox.Show(catalog.GetString("Continue with conflicting key assignments?\n\n") + result, Application.ProductName, MessageBoxButtons.YesNo))
402402
return;
403403

404404
DialogResult = DialogResult.OK;
@@ -518,7 +518,7 @@ private string GetValidWindowSize(string text)
518518

519519
void buttonDefaultKeys_Click(object sender, EventArgs e)
520520
{
521-
if (DialogResult.Yes == MessageBox.Show(Catalog.GetString("Remove all custom key assignments?"), Application.ProductName, MessageBoxButtons.YesNo))
521+
if (DialogResult.Yes == MessageBox.Show(catalog.GetString("Remove all custom key assignments?"), Application.ProductName, MessageBoxButtons.YesNo))
522522
{
523523
Settings.Input.Reset();
524524
InitializeKeyboardSettings();
@@ -529,7 +529,7 @@ void buttonExport_Click(object sender, EventArgs e)
529529
{
530530
var outputPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "Open Rails Keyboard.txt");
531531
Settings.Input.DumpToText(outputPath);
532-
MessageBox.Show(Catalog.GetString("A listing of all keyboard commands and keys has been placed here:\n\n") + outputPath, Application.ProductName);
532+
MessageBox.Show(catalog.GetString("A listing of all keyboard commands and keys has been placed here:\n\n") + outputPath, Application.ProductName);
533533
}
534534

535535
void buttonCheckKeys_Click(object sender, EventArgs e)
@@ -538,12 +538,12 @@ void buttonCheckKeys_Click(object sender, EventArgs e)
538538
if (errors != "")
539539
MessageBox.Show(errors, Application.ProductName);
540540
else
541-
MessageBox.Show(Catalog.GetString("No errors found."), Application.ProductName);
541+
MessageBox.Show(catalog.GetString("No errors found."), Application.ProductName);
542542
}
543543

544544
private void numericUpDownFOV_ValueChanged(object sender, EventArgs e)
545545
{
546-
labelFOVHelp.Text = Catalog.GetStringFmt("{0:F0}° vertical FOV is the same as:\n{1:F0}° horizontal FOV on 4:3\n{2:F0}° horizontal FOV on 16:9", numericViewingFOV.Value, numericViewingFOV.Value * 4 / 3, numericViewingFOV.Value * 16 / 9);
546+
labelFOVHelp.Text = catalog.GetStringFmt("{0:F0}° vertical FOV is the same as:\n{1:F0}° horizontal FOV on 4:3\n{2:F0}° horizontal FOV on 16:9", numericViewingFOV.Value, numericViewingFOV.Value * 4 / 3, numericViewingFOV.Value * 16 / 9);
547547
}
548548

549549
private void trackBarDayAmbientLight_Scroll(object sender, EventArgs e)
@@ -563,19 +563,19 @@ private void SetAdhesionLevelValue()
563563
int level = trackAdhesionFactor.Value - trackAdhesionFactorChange.Value;
564564

565565
if (level > 159)
566-
AdhesionLevelValue.Text = Catalog.GetString("Very easy");
566+
AdhesionLevelValue.Text = catalog.GetString("Very easy");
567567
else if (level > 139)
568-
AdhesionLevelValue.Text = Catalog.GetString("Easy");
568+
AdhesionLevelValue.Text = catalog.GetString("Easy");
569569
else if (level > 119)
570-
AdhesionLevelValue.Text = Catalog.GetString("MSTS Compatible");
570+
AdhesionLevelValue.Text = catalog.GetString("MSTS Compatible");
571571
else if (level > 89)
572-
AdhesionLevelValue.Text = Catalog.GetString("Normal");
572+
AdhesionLevelValue.Text = catalog.GetString("Normal");
573573
else if (level > 69)
574-
AdhesionLevelValue.Text = Catalog.GetString("Hard");
574+
AdhesionLevelValue.Text = catalog.GetString("Hard");
575575
else if (level > 59)
576-
AdhesionLevelValue.Text = Catalog.GetString("Very Hard");
576+
AdhesionLevelValue.Text = catalog.GetString("Very Hard");
577577
else
578-
AdhesionLevelValue.Text = Catalog.GetString("Good luck!");
578+
AdhesionLevelValue.Text = catalog.GetString("Good luck!");
579579
}
580580

581581
private void AdhesionPropToWeatherCheckBox_CheckedChanged(object sender, EventArgs e)
@@ -585,7 +585,7 @@ private void AdhesionPropToWeatherCheckBox_CheckedChanged(object sender, EventAr
585585

586586
private void trackDayAmbientLight_ValueChanged(object sender, EventArgs e)
587587
{
588-
labelDayAmbientLight.Text = Catalog.GetStringFmt("{0}%", trackDayAmbientLight.Value * 5);
588+
labelDayAmbientLight.Text = catalog.GetStringFmt("{0}%", trackDayAmbientLight.Value * 5);
589589
}
590590

591591
private void trackAntiAliasing_ValueChanged(object sender, EventArgs e)
@@ -621,15 +621,15 @@ private void trackAntiAliasing_ValueChanged(object sender, EventArgs e)
621621
private void trackLODBias_ValueChanged(object sender, EventArgs e)
622622
{
623623
if (trackLODBias.Value == -100)
624-
labelLODBias.Text = Catalog.GetStringFmt("No detail (-{0}%)", -trackLODBias.Value);
624+
labelLODBias.Text = catalog.GetStringFmt("No detail (-{0}%)", -trackLODBias.Value);
625625
else if (trackLODBias.Value < 0)
626-
labelLODBias.Text = Catalog.GetStringFmt("Less detail (-{0}%)", -trackLODBias.Value);
626+
labelLODBias.Text = catalog.GetStringFmt("Less detail (-{0}%)", -trackLODBias.Value);
627627
else if (trackLODBias.Value == 0)
628-
labelLODBias.Text = Catalog.GetStringFmt("Default detail (+{0}%)", trackLODBias.Value);
628+
labelLODBias.Text = catalog.GetStringFmt("Default detail (+{0}%)", trackLODBias.Value);
629629
else if (trackLODBias.Value < 100)
630-
labelLODBias.Text = Catalog.GetStringFmt("More detail (+{0}%)", trackLODBias.Value);
630+
labelLODBias.Text = catalog.GetStringFmt("More detail (+{0}%)", trackLODBias.Value);
631631
else
632-
labelLODBias.Text = Catalog.GetStringFmt("All detail (+{0}%)", trackLODBias.Value);
632+
labelLODBias.Text = catalog.GetStringFmt("All detail (+{0}%)", trackLODBias.Value);
633633
}
634634

635635

0 commit comments

Comments
 (0)