Skip to content

Commit eac25ec

Browse files
committed
Automatic merge of T1.5.1-1284-gca636331f4 and 13 pull requests
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #891 at 9a1d6b2: Auto save - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #952 at 8347095: Investigation - Pulsing graphics - Pull request #953 at a519452: Fix Lights Crash on Corrupt Shapes - Pull request #954 at 62061b8: Multiple Track Profiles & Superelevation Improvements - Pull request #972 at e90a2aa: On Map window color changed switch or signal is not changed - Pull request #980 at fe8369a: Downloading route content (Github, zip) second part - Pull request #981 at 10d297f: Multiple type trainset lightglows - Pull request #982 at efcf19c: WEB based Switch Panel enhancement: Alerter - Pull request #984 at 0f8122e: Player train switching for timetable mode - Pull request #900 at c27f32d: DMI updates - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
15 parents 70536a8 + ca63633 + d00beb9 + 9a1d6b2 + 1f5ba4c + 8347095 + a519452 + 62061b8 + e90a2aa + fe8369a + 10d297f + efcf19c + 0f8122e + c27f32d + f92de76 commit eac25ec

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

Source/Menu/ContentForm.cs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
using System.IO.Compression;
3232
using System.Drawing;
3333
using System.Threading.Tasks;
34+
using GNU.Gettext.WinForms;
3435

3536
namespace ORTS
3637
{
@@ -72,6 +73,8 @@ public ContentForm(UserSettings settings)
7273
this.MaximizeBox = false; // disable maximize button
7374

7475
Catalog = new GettextResourceManager("Menu");
76+
Localizer.Localize(this, Catalog);
77+
7578
Settings = settings;
7679

7780
//
@@ -281,7 +284,7 @@ private void writeAndStartInfoFile()
281284
if (route.getDownloadType() == ContentRouteSettings.DownloadType.github)
282285
{
283286
outputFile.WriteLine("<p>" + Catalog.GetString("Downloadable: GitHub format") + "<br>");
284-
outputFile.WriteLine(string.Format("- " + Catalog.GetString("From:") + "{0}<br>", route.Url));
287+
outputFile.WriteLine(Catalog.GetStringFmt("- " + Catalog.GetString("From:") + "{0}<br>", route.Url));
285288
if (route.InstallSize > 0)
286289
{
287290
outputFile.WriteLine("- " + Catalog.GetStringFmt("Install size: {0} GB",
@@ -290,8 +293,8 @@ private void writeAndStartInfoFile()
290293
}
291294
if (route.getDownloadType() == ContentRouteSettings.DownloadType.zip)
292295
{
293-
outputFile.WriteLine(string.Format("<p>Downloadable: zip format<br>"));
294-
outputFile.WriteLine(string.Format("- From: {0}<br>", route.Url));
296+
outputFile.WriteLine(Catalog.GetString("<p>Downloadable: zip format<br>")); // qqq
297+
outputFile.WriteLine(Catalog.GetStringFmt("- From: {0}<br>", route.Url));
295298
if (route.InstallSize > 0)
296299
{
297300
outputFile.WriteLine("- " + Catalog.GetStringFmt("Install size: {0} GB",
@@ -307,10 +310,10 @@ private void writeAndStartInfoFile()
307310
if (route.Installed)
308311
{
309312
outputFile.WriteLine("<p>" + Catalog.GetString("Installed") + ":<br>");
310-
outputFile.WriteLine(string.Format("- " + Catalog.GetString("At") + ": {0}<br>", route.DateInstalled.ToString(CultureInfo.CurrentCulture.DateTimeFormat)));
311-
outputFile.WriteLine(string.Format("- " + Catalog.GetString("In") + ": \"{0}\"<br>", route.DirectoryInstalledIn));
312-
outputFile.WriteLine(string.Format("- " + Catalog.GetString("Content name") + ": \"{0}\"<br>", route.ContentName));
313-
outputFile.WriteLine(string.Format("- " + Catalog.GetString("Content Directory") + ": \"{0}\"<br></p>", route.ContentDirectory));
313+
outputFile.WriteLine(Catalog.GetStringFmt("- " + Catalog.GetString("At") + ": {0}<br>", route.DateInstalled.ToString(CultureInfo.CurrentCulture.DateTimeFormat)));
314+
outputFile.WriteLine(Catalog.GetStringFmt("- " + Catalog.GetString("In") + ": \"{0}\"<br>", route.DirectoryInstalledIn));
315+
outputFile.WriteLine(Catalog.GetStringFmt("- " + Catalog.GetString("Content name") + ": \"{0}\"<br>", route.ContentName));
316+
outputFile.WriteLine(Catalog.GetStringFmt("- " + Catalog.GetString("Content Directory") + ": \"{0}\"<br></p>", route.ContentDirectory));
314317
}
315318

316319
outputFile.WriteLine("<p>" + Catalog.GetString("Start options") + ":<br>");
@@ -353,7 +356,10 @@ private void writeAndStartInfoFile()
353356
}
354357
else
355358
{
356-
outputFile.WriteLine("<p>" + Catalog.GetStringFmt("Directory {0} does not exist", route.DirectoryInstalledIn) + "</b><br></p>");
359+
if (!string.IsNullOrEmpty(route.DirectoryInstalledIn))
360+
{
361+
outputFile.WriteLine("<p>" + Catalog.GetStringFmt("Directory {0} does not exist", route.DirectoryInstalledIn) + "</b><br></p>");
362+
}
357363
}
358364
}
359365
try

0 commit comments

Comments
 (0)