From 92f77bf6d63cbf4a618f423859b4fbb743467a3b Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Wed, 16 Nov 2016 22:13:48 +0100 Subject: [PATCH] Some localization to German --- Config/Entities/Enums.cs | 72 +++++++++++++++------- Config/Properties/AssemblyInfo.cs | 4 +- Results/Forms/ResultsConfigDlg.cs | 6 +- Results/Properties/AssemblyInfo.cs | 4 +- Results/WMeterRsltItemSpec.cs | 4 +- TestBenchFramework/ComponentsManagerDlg.cs | 12 ++-- TestBenchFramework/MainWnd.cs | 10 +-- 7 files changed, 71 insertions(+), 41 deletions(-) diff --git a/Config/Entities/Enums.cs b/Config/Entities/Enums.cs index 9f1554dd4..0368919d5 100644 --- a/Config/Entities/Enums.cs +++ b/Config/Entities/Enums.cs @@ -240,28 +240,51 @@ namespace Config.Entities /// Possible modes of operation of components and devices. public enum DebugMode { - DetectedOff = -2, - DetectedOn = -1, - Normal = 0, /// Normal operation - AutoDetect, /// The component (device) will be auto-detected - FailureDuringOperation, /// Failure during operation -> disabled - Off, /// The component is off - Record, - Reply, - Simulate, /// Test bench simulation, this mode does not require any hardware - Inherit, +#if MUNICH + [Description("Detected off")] DetectedOff = -2, + [Description("Detected on")] DetectedOn = -1, + [Description("Normal")] Normal = 0, /// Normal operation + [Description("Auto detect")] AutoDetect, /// The component (device) will be auto-detected + [Description("Fehler")] FailureDuringOperation, /// Failure during operation -> disabled + [Description("Aus")] Off, /// The component is off + [Description("Record")] Record, + [Description("Reply")] Reply, + [Description("Simulation")] Simulate, /// Test bench simulation, this mode does not require any hardware + [Description("Inherit")] Inherit, +#else + [Description("Detected off")] DetectedOff = -2, + [Description("Detected on")] DetectedOn = -1, + [Description("Normal")] Normal = 0, /// Normal operation + [Description("Auto detect")] AutoDetect, /// The component (device) will be auto-detected + [Description("Run-time error")] FailureDuringOperation, /// Failure during operation -> disabled + [Description("Off")] Off, /// The component is off + [Description("Record")] Record, + [Description("Reply")] Reply, + [Description("Simulate")] Simulate, /// Test bench simulation, this mode does not require any hardware + [Description("Inherit")] Inherit, +#endif Count, } public enum LogLevel { - Off, - Fatal, - Error, - Warn, - Info, - Debug, - All, +#if MUNICH + [Description("Aus")] Off, + [Description("Fatal")] Fatal, + [Description("Fehler")] Error, + [Description("Warn")] Warn, + [Description("Info")] Info, + [Description("Debug")] Debug, + [Description("Alles")] All, +#else + [Description("Off")] Off, + [Description("Fatal")] Fatal, + [Description("Error")] Error, + [Description("Warn")] Warn, + [Description("Info")] Info, + [Description("Debug")] Debug, + [Description("All")] All, +#endif Count, } @@ -282,10 +305,17 @@ namespace Config.Entities public enum Alignment { - Left, - Center, - Right, - Justified, +#if MUNICH + [Description("Links")] Left, + [Description("Center")] Center, + [Description("Rechts")] Right, + [Description("Justified")] Justified, +#else + [Description("Left")] Left, + [Description("Center")] Center, + [Description("Right")] Right, + [Description("Justified")] Justified, +#endif Count } } diff --git a/Config/Properties/AssemblyInfo.cs b/Config/Properties/AssemblyInfo.cs index 42466be07..682303bb7 100644 --- a/Config/Properties/AssemblyInfo.cs +++ b/Config/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.12.373.0")] -[assembly: AssemblyFileVersion("2.12.373.0")] +[assembly: AssemblyVersion("2.12.385.0")] +[assembly: AssemblyFileVersion("2.12.385.0")] diff --git a/Results/Forms/ResultsConfigDlg.cs b/Results/Forms/ResultsConfigDlg.cs index 769d2b22d..e75c2e829 100644 --- a/Results/Forms/ResultsConfigDlg.cs +++ b/Results/Forms/ResultsConfigDlg.cs @@ -81,7 +81,7 @@ namespace Results.Forms ComboBox alignmentCB = new ComboBox(); for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++) { - alignmentCB.Items.Add(a.ToString()); + alignmentCB.Items.Add(a.ToDescription()); } editors = new Control[] @@ -146,7 +146,7 @@ namespace Results.Forms case Column.Alignment: for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++) { - if (a.ToString().Equals(editors[e.SubItem].Text)) + if (a.ToDescription().Equals(editors[e.SubItem].Text)) { item.Alignment = a; return; @@ -203,7 +203,7 @@ namespace Results.Forms lvi.SubItems.Add(item.Format); /// Format lvi.SubItems.Add(item.Precision); /// Precision lvi.SubItems.Add(item.Width.ToString()); /// Width - lvi.SubItems.Add(item.Alignment.ToString()); /// Alignment + lvi.SubItems.Add(item.Alignment.ToDescription()); /// Alignment selectedResultsListViewEx.Items.Add(lvi); } diff --git a/Results/Properties/AssemblyInfo.cs b/Results/Properties/AssemblyInfo.cs index 428de9184..4613c9bce 100644 --- a/Results/Properties/AssemblyInfo.cs +++ b/Results/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.12.373.0")] -[assembly: AssemblyFileVersion("2.12.373.0")] +[assembly: AssemblyVersion("2.12.385.0")] +[assembly: AssemblyFileVersion("2.12.385.0")] diff --git a/Results/WMeterRsltItemSpec.cs b/Results/WMeterRsltItemSpec.cs index 6c19b7ce6..6935491ab 100644 --- a/Results/WMeterRsltItemSpec.cs +++ b/Results/WMeterRsltItemSpec.cs @@ -256,7 +256,7 @@ namespace Results items[i].Format, items[i].Precision, items[i].Width, - items[i].Alignment); + items[i].Alignment.ToDescription()); } return result; } @@ -286,7 +286,7 @@ namespace Results item.Precision = field[5]; item.Width = int.Parse(field[6]); item.Alignment = 0; - for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++) if (a.ToString().Equals(field[7])) { item.Alignment = a; break; } + for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++) if (a.ToDescription().Equals(field[7])) { item.Alignment = a; break; } result.Add(item); } diff --git a/TestBenchFramework/ComponentsManagerDlg.cs b/TestBenchFramework/ComponentsManagerDlg.cs index e9f89f10f..ecf05a390 100644 --- a/TestBenchFramework/ComponentsManagerDlg.cs +++ b/TestBenchFramework/ComponentsManagerDlg.cs @@ -95,11 +95,11 @@ namespace TBF listViewEx.Columns.Add(Strings.Parameters, (ls.ComponentsColumnCount > 5) ? ls.ComponentsColumnWidths[5] : 600); debugCB = new ComboBox(); - for (DebugMode level = 0; level < DebugMode.Count; level++) debugCB.Items.Add(level.ToString()); + for (DebugMode level = 0; level < DebugMode.Count; level++) debugCB.Items.Add(level.ToDescription()); splitContainer.Panel1.Controls.Add(debugCB); logCB = new ComboBox(); - for (LogLevel level = 0; level < LogLevel.Count; level++) logCB.Items.Add(level.ToString()); + for (LogLevel level = 0; level < LogLevel.Count; level++) logCB.Items.Add(level.ToDescription()); splitContainer.Panel1.Controls.Add(logCB); listViewEx.SubItemClicked += new Results.Forms.SubItemEventHandler(listViewEx_SubItemClicked); @@ -135,7 +135,7 @@ namespace TBF { for (DebugMode level = 0; level < DebugMode.Count; level++) { - if (debugCB.Text.Equals(level.ToString())) + if (debugCB.Text.Equals(level.ToDescription())) { cmpnt.Mode = level; flags |= CfgUpdateFlags.RestartRqrd; @@ -148,7 +148,7 @@ namespace TBF { for (LogLevel level = 0; level < LogLevel.Count; level++) { - if (logCB.Text.Equals(level.ToString())) + if (logCB.Text.Equals(level.ToDescription())) { cmpnt.Logging = level; flags |= CfgUpdateFlags.RestartRqrd; @@ -179,8 +179,8 @@ namespace TBF ListViewItem lvi = new ListViewItem(cmpCfg.Name); lvi.SubItems.Add(cmpCfg.Factory.ClassName); lvi.SubItems.Add(cmpCfg.ParentName); - lvi.SubItems.Add(cmpCfg.DebugLevel.ToString()); - lvi.SubItems.Add(cmpCfg.LogLevel.ToString()); + lvi.SubItems.Add(cmpCfg.DebugLevel.ToDescription()); + lvi.SubItems.Add(cmpCfg.LogLevel.ToDescription()); lvi.SubItems.Add(cmpCfg.ToString(1)); lvi.Tag = cmpnt; diff --git a/TestBenchFramework/MainWnd.cs b/TestBenchFramework/MainWnd.cs index 51287db69..f3a8c8fe2 100644 --- a/TestBenchFramework/MainWnd.cs +++ b/TestBenchFramework/MainWnd.cs @@ -358,11 +358,11 @@ namespace TBF //BenchControl.StateMachine.Stop(); } - private void benchComponentsTSMItem_Click(object s, EventArgs e) { new ComponentsManagerDlg().ShowDialog(); } - private void benchPathsTSMItem_Click(object s, EventArgs e) { new PathsDlg().ShowDialog(); } - private void benchTransitionsTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new TransitionsDlg().ShowDialog(); Cursor = Cursors.Default; } - private void benchMetrologyTSMItem_Click(object s, EventArgs e) { new MetrologyDlg().ShowDialog(); } - private void proceduresTSMItem_Click(object s, EventArgs e) { new ProceduresDlg().ShowDialog(); } + private void benchComponentsTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new ComponentsManagerDlg().ShowDialog(); Cursor = Cursors.Default; } + private void benchPathsTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new PathsDlg().ShowDialog(); Cursor = Cursors.Default; } + private void benchTransitionsTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new TransitionsDlg().ShowDialog(); Cursor = Cursors.Default; } + private void benchMetrologyTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new MetrologyDlg().ShowDialog(); Cursor = Cursors.Default; } + private void proceduresTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new ProceduresDlg().ShowDialog(); Cursor = Cursors.Default; } private void localSettingsTSMItem_Click(object s, EventArgs e) { new PreferencesDlg().ShowDialog(); } private void databaseSettingsTSMItem_Click(object s, EventArgs e) { new BenchesDlg().ShowDialog(); } private void usersTSMItem_Click(object s, EventArgs e) { new Forms.EditUsers().ShowDialog(); }