From ccaaa798822cb1d1ed3adfd5bde26c5c77274076 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Thu, 19 Nov 2015 13:11:13 -0600 Subject: [PATCH] Through OW Trans Edits --- EduNetworkBuilder/NetworkBuilder.cs | 6 +- EduNetworkBuilder/NetworkCard.cs | 2 +- EduNetworkBuilder/NetworkCardEditor.cs | 2 +- EduNetworkBuilder/NetworkLink.cs | 14 ++-- EduNetworkBuilder/OptionsWindow.cs | 60 ++++++++-------- .../Resources/languages/edustrings.resx | 72 +++++++++++++++++++ 6 files changed, 114 insertions(+), 42 deletions(-) diff --git a/EduNetworkBuilder/NetworkBuilder.cs b/EduNetworkBuilder/NetworkBuilder.cs index bbeddfc..ea1bef7 100644 --- a/EduNetworkBuilder/NetworkBuilder.cs +++ b/EduNetworkBuilder/NetworkBuilder.cs @@ -549,7 +549,7 @@ namespace EduNetworkBuilder } foreach (string tStr in myNetwork.GetIncompleteTestDestinations(ReleasedOn.hostname, false)) { - pbNetworkView.ContextMenuStrip.Items.Add(string.Format("NB_NetViewArpStr", tStr)); + pbNetworkView.ContextMenuStrip.Items.Add(string.Format(NB.Translate("NB_NetViewArpStr"), tStr)); pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Arp_Name_Click; } } @@ -586,7 +586,7 @@ namespace EduNetworkBuilder } foreach (string host in ReleasedOn.ListOfConnectedHosts()) { - pbNetworkView.ContextMenuStrip.Items.Add(string.Format("NB_NetViewRmLnkStr", host)); + pbNetworkView.ContextMenuStrip.Items.Add(string.Format(NB.Translate("NB_NetViewRmLnkStr"), host)); pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_RemoveLink_Click; } } @@ -1201,7 +1201,7 @@ namespace EduNetworkBuilder RTFWindow rtwin = (RTFWindow)Application.OpenForms["RTFWindow"]; if (rtwin == null) { - rtwin = new RTFWindow("Help: " + myNetwork.NetTitle.GetText(), myNetwork.NetMessage.GetText(), myNetwork.NetTests); + rtwin = new RTFWindow(NB.Translate("H_Help_Key ") + myNetwork.NetTitle.GetText(), myNetwork.NetMessage.GetText(), myNetwork.NetTests); rtwin.Show(); Activate(); } diff --git a/EduNetworkBuilder/NetworkCard.cs b/EduNetworkBuilder/NetworkCard.cs index c9eee17..c2ef6a3 100644 --- a/EduNetworkBuilder/NetworkCard.cs +++ b/EduNetworkBuilder/NetworkCard.cs @@ -476,7 +476,7 @@ namespace EduNetworkBuilder //When we leave the WAN port, we are masqueraded. Track that. WhereFrom.StoreOutgoingPacketInfo(nPacket, ResponseToPacket.masq); //Now, we masquerade the packet so it looks like it comes fromhere - nPacket.Tracking.AddMessage(DebugLevel.natting, WhereFrom.hostname, string.Format("NC_ChangeIPStr", nf.myIP.GetIPString)); + nPacket.Tracking.AddMessage(DebugLevel.natting, WhereFrom.hostname, string.Format(NB.Translate("NC_ChangeIPStr"), nf.myIP.GetIPString)); nPacket.sourceIP = nf.myIP; } nPacket.TsourceIP = nf.myIP; diff --git a/EduNetworkBuilder/NetworkCardEditor.cs b/EduNetworkBuilder/NetworkCardEditor.cs index d04c14b..829061d 100644 --- a/EduNetworkBuilder/NetworkCardEditor.cs +++ b/EduNetworkBuilder/NetworkCardEditor.cs @@ -191,7 +191,7 @@ namespace EduNetworkBuilder { MyNicToEdit.TunnelEndpoint = new IPAddress(NB.ZeroIPString, "255.255.255.0", IPAddressType.ip_only); } - MyNicToEdit.TunnelEndpoint.Edit(nd, "NCE_VPNEnd"); + MyNicToEdit.TunnelEndpoint.Edit(nd, NB.Translate("NCE_VPNEnd")); UpdateForm(); } } diff --git a/EduNetworkBuilder/NetworkLink.cs b/EduNetworkBuilder/NetworkLink.cs index 015008c..ecbfde9 100644 --- a/EduNetworkBuilder/NetworkLink.cs +++ b/EduNetworkBuilder/NetworkLink.cs @@ -62,7 +62,7 @@ namespace EduNetworkBuilder } if(donesomething) { - MessageBox.Show("The SSID and Key have been updated on the client."); + MessageBox.Show(NB.Translate("NL_NetLinkSSID")); } } } @@ -303,16 +303,16 @@ namespace EduNetworkBuilder if(tPacket.health <= 0) { //The link is broken. Drop the packet - tPacket.Tracking.AddMessage(DebugLevel.info, this, "The packet was corrupted. The network wire may run too close to electricity or fluorescent lighting, or the wireless path is being interfered by a microwave, wireless phone, or other radio device."); - tPacket.Tracking.Status = "The packet got corrupted and was dropped."; + tPacket.Tracking.AddMessage(DebugLevel.info, this, NB.Translate("NL_DoMoveCorruptLight")); + tPacket.Tracking.Status = NB.Translate("NL_DoMoveDrop"); tPacket.Tracking.Finished = true; tPacket.MyStatus = PacketStatus.finished_failed; } if(theLinkType == LinkType.broken && tPacket.myLinkPercent > 50) { //The link is broken. Drop the packet - tPacket.Tracking.AddMessage(DebugLevel.info, this, "The packet tried to use a broken network wire and was corrupted."); - tPacket.Tracking.Status = "The packet got corrupted and was dropped."; + tPacket.Tracking.AddMessage(DebugLevel.info, this, NB.Translate("NL_DoMoveCorruptWire")); + tPacket.Tracking.Status = NB.Translate("NL_DoMoveDrop"); tPacket.MyStatus = PacketStatus.finished_failed; } if(tPacket.Arrived()) @@ -330,8 +330,8 @@ namespace EduNetworkBuilder } if(movingTo == null) { - tPacket.AddMessage(DebugLevel.info, "Oops! We do not have anything at the end of the network wire. This should not happen!"); - tPacket.Tracking.Status = hostname + string.Format(" Nothing at far end of the wire. This should never happen.."); + tPacket.AddMessage(DebugLevel.info, NB.Translate("NL_DoMoveNoEnd")); + tPacket.Tracking.Status = hostname + string.Format(NB.Translate("NL_DoMoveNoEnd2")); tPacket.MyStatus = PacketStatus.finished_failed; } else diff --git a/EduNetworkBuilder/OptionsWindow.cs b/EduNetworkBuilder/OptionsWindow.cs index ba3ac4c..bf8c5f9 100644 --- a/EduNetworkBuilder/OptionsWindow.cs +++ b/EduNetworkBuilder/OptionsWindow.cs @@ -28,23 +28,23 @@ namespace EduNetworkBuilder { myNet = theNet; InitializeComponent(); - myToolTip.SetToolTip(tbItemSize, "The size of an item (switch, PC, etc). Default is 100."); - myToolTip.SetToolTip(lblItemSize, "The size of an item (switch, PC, etc). Default is 100."); - myToolTip.SetToolTip(tbMessage, "The message given when the network is loaded. Instructions."); - myToolTip.SetToolTip(lblNetMessage, "The message given when the network is loaded. Instructions."); - myToolTip.SetToolTip(tbNetworkTitle, "The title of the network window."); - myToolTip.SetToolTip(lblNetTitle, "The title of the network window."); - myToolTip.SetToolTip(lblNetSize, "The height and width of the network graphics area."); - myToolTip.SetToolTip(tbNetworkX, "The width of the network window graphics area."); - myToolTip.SetToolTip(tbNetworkY, "The Height of the network window graphics area."); - myToolTip.SetToolTip(lbTags, "The Tags that this puzzle is saved as (only for puzzles)"); - myToolTip.SetToolTip(lblTags, "The Tags that this puzzle is saved as (only for puzzles)"); - myToolTip.SetToolTip(lbTests, "The things that need to be solved before the puzzle is completed."); - myToolTip.SetToolTip(lblTests, "The things that need to be solved before the puzzle is completed."); - myToolTip.SetToolTip(lblLevel, "The Level that this puzzle is stored in."); - myToolTip.SetToolTip(tbLevel, "The Level that this puzzle is stored in."); - myToolTip.SetToolTip(lblSortOrder, "How this is sorted within the list of puzzles."); - myToolTip.SetToolTip(tbSortOrder, "How this is sorted within the list of puzzles."); + myToolTip.SetToolTip(tbItemSize, NB.Translate("OW_OWSize")); + myToolTip.SetToolTip(lblItemSize, NB.Translate("OW_OWSize")); + myToolTip.SetToolTip(tbMessage, NB.Translate("OW_OWLoad")); + myToolTip.SetToolTip(lblNetMessage, NB.Translate("OW_OWLoad")); + myToolTip.SetToolTip(tbNetworkTitle, NB.Translate("OW_OWTitle")); + myToolTip.SetToolTip(lblNetTitle, NB.Translate("OW_OWTitle")); + myToolTip.SetToolTip(lblNetSize, NB.Translate("OW_OWGraphic")); + myToolTip.SetToolTip(tbNetworkX, NB.Translate("OW_OWWidth")); + myToolTip.SetToolTip(tbNetworkY, NB.Translate("OW_OWHight")); + myToolTip.SetToolTip(lbTags, NB.Translate("OW_OWTag")); + myToolTip.SetToolTip(lblTags, NB.Translate("OW_OWTag")); + myToolTip.SetToolTip(lbTests, NB.Translate("OW_OWThings")); + myToolTip.SetToolTip(lblTests, NB.Translate("OW_OWThings")); + myToolTip.SetToolTip(lblLevel, NB.Translate("OW_OWLevel")); + myToolTip.SetToolTip(tbLevel, NB.Translate("OW_OWLevel")); + myToolTip.SetToolTip(lblSortOrder, NB.Translate("OW_OWSort")); + myToolTip.SetToolTip(tbSortOrder, NB.Translate("OW_OWSort")); LoadValuesFromNetwork(); } @@ -180,11 +180,11 @@ namespace EduNetworkBuilder lbTests.ContextMenuStrip = new ContextMenuStrip(); } lbTests.ContextMenuStrip.Items.Clear(); - lbTests.ContextMenuStrip.Items.Add("Add"); + lbTests.ContextMenuStrip.Items.Add(NB.Translate("DC_UpdateForm+")); lbTests.ContextMenuStrip.Items[index++].Click += lbTests_Add_Click; - lbTests.ContextMenuStrip.Items.Add("Edit"); + lbTests.ContextMenuStrip.Items.Add(NB.Translate("LBW_LBWEdit")); lbTests.ContextMenuStrip.Items[index++].Click += lbTests_Edit_Click; - lbTests.ContextMenuStrip.Items.Add("Delete"); + lbTests.ContextMenuStrip.Items.Add(NB.Translate("LBW_LBWDelete")); lbTests.ContextMenuStrip.Items[index++].Click += lbTests_Delete_Click; } } @@ -201,11 +201,11 @@ namespace EduNetworkBuilder lbTests.ContextMenuStrip = new ContextMenuStrip(); } lbTests.ContextMenuStrip.Items.Clear(); - lbTests.ContextMenuStrip.Items.Add("Add"); + lbTests.ContextMenuStrip.Items.Add(NB.Translate("DC_UpdateForm+")); lbTests.ContextMenuStrip.Items[index++].Click += lbTests_Add_Click; - lbTests.ContextMenuStrip.Items.Add("Edit"); + lbTests.ContextMenuStrip.Items.Add(NB.Translate("LBW_LBWEdit")); lbTests.ContextMenuStrip.Items[index++].Click += lbTests_Edit_Click; - lbTests.ContextMenuStrip.Items.Add("Delete"); + lbTests.ContextMenuStrip.Items.Add(NB.Translate("LBW_LBWDelete")); lbTests.ContextMenuStrip.Items[index++].Click += lbTests_Delete_Click; } } @@ -253,15 +253,15 @@ namespace EduNetworkBuilder lbTags.ContextMenuStrip = new ContextMenuStrip(); } lbTags.ContextMenuStrip.Items.Clear(); - lbTags.ContextMenuStrip.Items.Add("Add"); + lbTags.ContextMenuStrip.Items.Add(NB.Translate("DC_UpdateForm+")); lbTags.ContextMenuStrip.Items[index++].Click += lbTags_Add_Click; if (lbTags.SelectedIndex != -1) { - lbTags.ContextMenuStrip.Items.Add("Edit"); + lbTags.ContextMenuStrip.Items.Add(NB.Translate("LBW_LBWEdit")); lbTags.ContextMenuStrip.Items[index++].Click += lbTags_Edit_Click; - lbTags.ContextMenuStrip.Items.Add("Read"); + lbTags.ContextMenuStrip.Items.Add(NB.Translate("NTE_Read")); lbTags.ContextMenuStrip.Items[index++].Click += lbTags_Read_Click; - lbTags.ContextMenuStrip.Items.Add("Delete"); + lbTags.ContextMenuStrip.Items.Add(NB.Translate("LBW_LBWDelete")); lbTags.ContextMenuStrip.Items[index++].Click += lbTags_Delete_Click; } } @@ -299,7 +299,7 @@ namespace EduNetworkBuilder Button Done = new Button(); Done.Click += btnClose_Click; Choice.DoubleClick += btnClose_Click; - Done.Text = "Done"; + Done.Text = NB.Translate("OW_btnDone"); Done.Location = new Point(1, Choice.Location.Y + Choice.Height + 5); QuestionForm.Controls.Clear(); QuestionForm.Controls.Add(Choice); @@ -331,7 +331,7 @@ namespace EduNetworkBuilder if (lbTags.SelectedIndex != -1) { //Something is selected. Edit it - newstring = QuickPrompt("Edit Tag", "Tag:", myNet.SuggestedReadings[lbTags.SelectedIndex].ToString()); + newstring = QuickPrompt(NB.Translate("OW_EdTag"), NB.Translate("OW_Tag") + ":", myNet.SuggestedReadings[lbTags.SelectedIndex].ToString()); if (newstring != "") { HelpTopics tHelpTopic = NB.TryParseEnum(newstring, HelpTopics.None); @@ -346,7 +346,7 @@ namespace EduNetworkBuilder else { //nothing is selected, create new one - newstring = QuickPrompt("Edit Tag", "Tag:", ""); + newstring = QuickPrompt(NB.Translate("OW_EdTag"), NB.Translate("OW_Tag") + ":", ""); if (newstring != "") { HelpTopics tHelpTopic = NB.TryParseEnum(newstring, HelpTopics.None); diff --git a/EduNetworkBuilder/Resources/languages/edustrings.resx b/EduNetworkBuilder/Resources/languages/edustrings.resx index 4ebb219..05b8f1d 100644 --- a/EduNetworkBuilder/Resources/languages/edustrings.resx +++ b/EduNetworkBuilder/Resources/languages/edustrings.resx @@ -1521,4 +1521,76 @@ Ping success: The ping returned from its destination {0} -> {1} ND_ProssArrSuccessStr = Ping success: The ping returned from its destination {0} -> {1} + + The packet was corrupted. The network wire may run too close to electricity or fluorescent lighting, or the wireless path is being interfered by a microwave, wireless phone, or other radio device. + NL_DoMoveCorruptLight = The packet was corrupted. The network wire may run too close to electricity or fluorescent lighting, or the wireless path is being interfered by a microwave, wireless phone, or other radio device. + + + The packet tried to use a broken network wire and was corrupted. + NL_DoMoveCorruptWire = The packet tried to use a broken network wire and was corrupted. + + + The packet got corrupted and was dropped. + NL_DoMoveDrop = The packet got corrupted and was dropped. + + + Oops! We do not have anything at the end of the network wire. This should not happen! + NL_DoMoveNoEnd = Oops! We do not have anything at the end of the network wire. This should not happen! + + + Nothing at far end of the wire. This should never happen.. + NL_DoMoveNoEnd2 = Nothing at far end of the wire. This should never happen.. + + + The SSID and Key have been updated on the client. + NL_NetLinkSSID = The SSID and Key have been updated on the client. + + + Edit Tag + OW_EdTag = Edit Tag + + + The height and width of the network graphics area. + OW_OWGraphic = The height and width of the network graphics area. + + + The Height of the network window graphics area. + OW_OWHight = The Height of the network window graphics area. + + + The Level that this puzzle is stored in. + OW_OWLevel = The Level that this puzzle is stored in. + + + The message given when the network is loaded. Instructions. + OW_OWLoad = The message given when the network is loaded. Instructions. + + + The size of an item (switch, PC, etc). Default is 100. + OW_OWSize = The size of an item (switch, PC, etc). Default is 100. + + + How this is sorted within the list of puzzles. + OW_OWSort = How this is sorted within the list of puzzles. + + + The Tags that this puzzle is saved as (only for puzzles) + OW_OWTag = The Tags that this puzzle is saved as (only for puzzles) + + + The things that need to be solved before the puzzle is completed. + OW_OWThings = The things that need to be solved before the puzzle is completed. + + + The title of the network window. + OW_OWTitle = The title of the network window. + + + The width of the network window graphics area. + OW_OWWidth = The width of the network window graphics area. + + + Tag + OW_Tag = Tag + \ No newline at end of file