diff --git a/EduNetworkBuilder/NetTestEditor.cs b/EduNetworkBuilder/NetTestEditor.cs index 4245f7b..b966881 100644 --- a/EduNetworkBuilder/NetTestEditor.cs +++ b/EduNetworkBuilder/NetTestEditor.cs @@ -118,11 +118,11 @@ namespace EduNetworkBuilder { cbSource.Items.Add(ContextHelp); } - cbDest.Items.Add("Read"); + cbDest.Items.Add(NB.Translate("NTE_Read")); } else if (ToEdit.TheTest == NetTestType.LockAll || ToEdit.TheTest == NetTestType.LockGateway) { - cbDest.Items.Add("All"); + cbDest.Items.Add(NB.Translate("NTE_All")); } else if (ToEdit.TheTest == NetTestType.LockDHCP) { diff --git a/EduNetworkBuilder/Network.cs b/EduNetworkBuilder/Network.cs index 9c190e3..23ed6dc 100644 --- a/EduNetworkBuilder/Network.cs +++ b/EduNetworkBuilder/Network.cs @@ -674,7 +674,7 @@ namespace EduNetworkBuilder Properties.Settings.Default.Save(); } } - DialogResult answer = MessageBox.Show("Solved! Would you like to open the puzzle box to go to the next puzzle? 'No' will let you continue to play with this one.","Solved",MessageBoxButtons.YesNo); + DialogResult answer = MessageBox.Show(NB.Translate("N_MarkAsSolvedDone"),NB.Translate("N_MarkAsSolvedSolved"),MessageBoxButtons.YesNo); if(answer == DialogResult.Yes) { ListBoxWindow LBW = new ListBoxWindow(); @@ -800,16 +800,16 @@ namespace EduNetworkBuilder if(tpackets != null) tpackets.ProcessTick(); if (tpackets.DebugOn) - Console.WriteLine("Debugging"); + Console.WriteLine(NB.Translate("N_ProssPackOnceDbug")); } for(int loop=myPackets.Count -1; loop >=0; loop--) { //we delete if it has finished. if (myPackets[loop].DebugOn) - Console.WriteLine("Debugging"); + Console.WriteLine(NB.Translate("N_ProssPackOnceDbug")); if (myPackets[loop].TickTTL < 1) //If the packet has been around too long, get rid of it { - myPackets[loop].AddMessage(DebugLevel.info, "Packet Tick Counter reached. Did the packet go into an infinite loop?"); + myPackets[loop].AddMessage(DebugLevel.info, NB.Translate("N_ProssPackOnceTickCounter")); myPackets[loop].PrepareToDelete(); myPackets.RemoveAt(loop); } @@ -836,8 +836,8 @@ namespace EduNetworkBuilder Console.WriteLine("Total seconds = " + Duration.TotalSeconds.ToString() + " Stopping."); foreach (Packet pkt in myPackets) { - pkt.Tracking.AddMessage(DebugLevel.packet, "Network", "The packet timed out."); - pkt.Tracking.Status = "The packet timed out and was dropped."; + pkt.Tracking.AddMessage(DebugLevel.packet, NB.Translate("N_ProssShouldContinNet"), NB.Translate("N_ProssShouldContinTime")); + pkt.Tracking.Status = NB.Translate("N_ProssShouldContinTimeout"); pkt.MyStatus = PacketStatus.finished_failed; pkt.PrepareToDelete(); } @@ -892,7 +892,7 @@ namespace EduNetworkBuilder DebugPausePoint WhatIsSet = NB.GetDebugPauseSetting(); if(WhatIsSet != 0) { - Console.WriteLine("----All Done----"); + Console.WriteLine(NB.Translate("N_ProssPackDone")); } TestForCompletion(true); //Now, report on the progress if we solved something in the middle of the packets going out AlreadyChosenTimeout = false; diff --git a/EduNetworkBuilder/NetworkBuilder.cs b/EduNetworkBuilder/NetworkBuilder.cs index 35a3d0e..5e1904a 100644 --- a/EduNetworkBuilder/NetworkBuilder.cs +++ b/EduNetworkBuilder/NetworkBuilder.cs @@ -55,11 +55,11 @@ namespace EduNetworkBuilder // Force the ToolTip text to be displayed whether or not the form is active. myTooltip.ShowAlways = true; - myTooltip.SetToolTip(rbHelp1, "Show no help for the puzzle"); - myTooltip.SetToolTip(rbHelp2, "Show the color of the items making the puzzle."); - myTooltip.SetToolTip(rbHelp3, "Color-code & give minor mouse-over help for the puzzle."); - myTooltip.SetToolTip(rbHelp4, "Color-code & give decent mouse-over help for the puzzle."); - myTooltip.SetToolTip(btnHelp, "Show the message describing the puzzle."); + myTooltip.SetToolTip(rbHelp1, NB.Translate("NB_BuildWindNone")); + myTooltip.SetToolTip(rbHelp2, NB.Translate("NB_BuildWindColor")); + myTooltip.SetToolTip(rbHelp3, NB.Translate("NB_BuildWindMinor")); + myTooltip.SetToolTip(rbHelp4, NB.Translate("NB_BuildWindDecent")); + myTooltip.SetToolTip(btnHelp, NB.Translate("NB_BuildWindMsg")); myTooltip.Popup += myTooltip_Popup; lblStatus.Text = ""; @@ -233,7 +233,7 @@ namespace EduNetworkBuilder HelpTopics HT = NB.TryParseEnum(me.Name, HelpTopics.None); if(HT != HelpTopics.None) { - myNetwork.NoteActionDone(NetTestType.ReadContextHelp, me.Name, "Read"); + myNetwork.NoteActionDone(NetTestType.ReadContextHelp, me.Name, NB.Translate("NTE_Read")); NB.ReadContextHelp(HT); } UpdateHelpTopicButtons(); @@ -272,26 +272,26 @@ namespace EduNetworkBuilder private void BuildButtons() { - BuildButton("btnSwitch", Properties.Resources.Switch, "Add a switch to the network."); - BuildButton("btnHub", Properties.Resources.Hub, "Add a hub to the network."); - BuildButton("btnServer", Properties.Resources.Server, "Add a server to the network."); - BuildButton("btnLaptop", Properties.Resources.Laptop, "Add a laptop to the network."); - BuildButton("btnPC", Properties.Resources.PC, "Add a PC to the network."); - BuildButton("btnRouter", Properties.Resources.Router, "Add a Router to the network."); - BuildButton("btnIPPhone", Properties.Resources.ip_phone, "Add an IP-Phone to the network."); - BuildButton("btnFirewall", Properties.Resources.firewall, "Add a firewall to the network."); - BuildButton("btnPrinter", Properties.Resources.Printer, "Add a printer to the network."); - BuildButton("btnCopier", Properties.Resources.Copier, "Add a copier to the network."); - BuildButton("btnMicrowave", Properties.Resources.microwave, "Add a microwave to the network."); - BuildButton("btnFluorescent", Properties.Resources.fluorescent, "Add a light to the network."); - BuildButton("btnWAP", Properties.Resources.wap, "Add a Wireless Access Point to the network."); - BuildButton("btnWRouter", Properties.Resources.WRouter, "Add a Wireless Router to the network."); - BuildButton("btnWBridge", Properties.Resources.WBridge, "Add a Wireless Bridge to the network."); - BuildButton("btnWRepeater", Properties.Resources.WRepeater, "Add a Wireless Repeater to the network."); - BuildButton("btnCellphone", Properties.Resources.cellphone, "Add a Cellhone to the network."); - BuildButton("btnTablet", Properties.Resources.tablet, "Add a Tablet to the network."); - BuildButton("btnLink", Properties.Resources.link, "Use a network cable to connect network components."); - BuildButton("btnSelect", Properties.Resources.select, "Select items from the network."); + BuildButton("btnSwitch", Properties.Resources.Switch, NB.Translate("NB_BuildBtnSwitch")); + BuildButton("btnHub", Properties.Resources.Hub, NB.Translate("NB_BuildBtnHub")); + BuildButton("btnServer", Properties.Resources.Server, NB.Translate("NB_BuildBtnServer")); + BuildButton("btnLaptop", Properties.Resources.Laptop, NB.Translate("NB_BuildBtnLaptop")); + BuildButton("btnPC", Properties.Resources.PC, NB.Translate("NB_BuildBtnPC")); + BuildButton("btnRouter", Properties.Resources.Router, NB.Translate("NB_BuildBtnRouter")); + BuildButton("btnIPPhone", Properties.Resources.ip_phone, NB.Translate("NB_BuildBtnPhone")); + BuildButton("btnFirewall", Properties.Resources.firewall, NB.Translate("NB_BuildBtnFirewall")); + BuildButton("btnPrinter", Properties.Resources.Printer, NB.Translate("NB_BuildBtnPrinter")); + BuildButton("btnCopier", Properties.Resources.Copier, NB.Translate("NB_BuildBtnCopier")); + BuildButton("btnMicrowave", Properties.Resources.microwave, NB.Translate("NB_BuildBtnMicrowave")); + BuildButton("btnFluorescent", Properties.Resources.fluorescent, NB.Translate("NB_BuildBtnLight")); + BuildButton("btnWAP", Properties.Resources.wap, NB.Translate("NB_BuildBtnWAP")); + BuildButton("btnWRouter", Properties.Resources.WRouter, NB.Translate("NB_BuildBtnWRouter")); + BuildButton("btnWBridge", Properties.Resources.WBridge, NB.Translate("NB_BuildBtnBridge")); + BuildButton("btnWRepeater", Properties.Resources.WRepeater, NB.Translate("NB_BuildBtnRepeat")); + BuildButton("btnCellphone", Properties.Resources.cellphone, NB.Translate("NB_BuildBtnCell")); + BuildButton("btnTablet", Properties.Resources.tablet, NB.Translate("NB_BuildBtnTablet")); + BuildButton("btnLink", Properties.Resources.link, NB.Translate("NB_BuildBtnCable")); + BuildButton("btnSelect", Properties.Resources.select, NB.Translate("NB_BuildBtnSelect")); } private void LayoutButtons(List what) @@ -364,7 +364,7 @@ namespace EduNetworkBuilder UpdateMenu(); UpdateMessages(); processing = true; - Text = "EduNetworkBuilder"; + Text = NB.Translate("NB_UpdteFrmName"); if (myNetwork.NetTitle.GetText() != "") Text += ": " + myNetwork.NetTitle.GetText(); if (myNetwork.NetMessage.GetText() != "") @@ -469,7 +469,7 @@ namespace EduNetworkBuilder { foreach(string str in pi.PuzzleTags) { - if(Regex.IsMatch(str,"^Level")) + if(Regex.IsMatch(str,NB.Translate("NB_Level"))) { if (!LevelTags.Contains(str, StringComparer.OrdinalIgnoreCase)) LevelTags.Add(str); @@ -555,24 +555,24 @@ namespace EduNetworkBuilder } if (ReleasedOn != null && ReleasedOn.IsNotNetDevice()) { - pbNetworkView.ContextMenuStrip.Items.Add("Ping [host]"); + pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("NB_NetViewPing1")); pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Ping_Click; - pbNetworkView.ContextMenuStrip.Items.Add("Arp Request [host]"); + pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("NB_NetViewArp")); pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Arp_Click; - pbNetworkView.ContextMenuStrip.Items.Add("Clear Arp Table"); + pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("NB_NetViewClr")); pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_ArpClear_Click; } if (ReleasedOn != null) { if (!myNetwork.ItemIsCritical(ReleasedOn.hostname)) { - pbNetworkView.ContextMenuStrip.Items.Add("Delete"); + pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("LBW_LBWDelete")); pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Delete_Click; } } if (ReleasedOn != null && ReleasedOn.IsNotNetDevice()) { - pbNetworkView.ContextMenuStrip.Items.Add("Edit"); + pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("LBW_LBWEdit")); pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Edit_Click; } @@ -581,7 +581,7 @@ namespace EduNetworkBuilder ItemClickedOn = ReleasedOn; if(ReleasedOn.HasDHCPNic()) { - pbNetworkView.ContextMenuStrip.Items.Add("DHCP Request"); + pbNetworkView.ContextMenuStrip.Items.Add("NB_NetViewDHCP"); pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_DHCPRequest_Click; } foreach (string host in ReleasedOn.ListOfConnectedHosts()) @@ -669,7 +669,7 @@ namespace EduNetworkBuilder bool todo = true; if (ItemClickedOn == null) return; //we do not have something chosen to ping from IPAddress destination = new IPAddress(NB.ZeroIPString, NB.ZeroIPString, IPAddressType.ip_only); - todo = destination.Edit(ItemClickedOn, "Ping IP"); + todo = destination.Edit(ItemClickedOn, NB.Translate("NB_NetViewPng")); if(todo) { ItemClickedOn.PingFromHere(destination); @@ -682,7 +682,7 @@ namespace EduNetworkBuilder if (ItemClickedOn == null) return; //we do not have something chosen to ping from ToolStripMenuItem Pressed = (ToolStripMenuItem)sender; string itemname = Pressed.Text; - string dest = Regex.Replace(itemname, "Ping ", ""); + string dest = Regex.Replace(itemname, NB.Translate("NB_NetViewPing "), ""); IPAddress destination; destination = myNetwork.DNSLookup(ItemClickedOn, dest); if(destination == null || destination.GetIPString == NB.ZeroIPString) @@ -696,7 +696,7 @@ namespace EduNetworkBuilder if (ItemClickedOn == null) return; //we do not have something chosen to ping from ToolStripMenuItem Pressed = (ToolStripMenuItem)sender; string itemname = Pressed.Text; - string dest = Regex.Replace(itemname, "Arp ", ""); + string dest = Regex.Replace(itemname, NB.Translate("NB_NetViewArp "), ""); IPAddress destination; destination = myNetwork.DNSLookup(ItemClickedOn, dest); if (destination == null || destination.GetIPString == NB.ZeroIPString) @@ -711,7 +711,7 @@ namespace EduNetworkBuilder bool todo = true; if (ItemClickedOn == null) return; //we do not have something chosen to arp request from IPAddress destination = new IPAddress(NB.ZeroIPString, "255.255.255.255", IPAddressType.ip_only); - todo = destination.Edit(ItemClickedOn, "Arp Request"); + todo = destination.Edit(ItemClickedOn, NB.Translate("NB_NetViewArp2")); if (todo) { ItemClickedOn.AskArpFromHere(destination); @@ -901,7 +901,7 @@ namespace EduNetworkBuilder if (result == System.Windows.Forms.DialogResult.Cancel) return; if(!Regex.IsMatch(mydialog.FileName,@"^.*.enbx$")) { - MessageBox.Show("EduNetworkBuilder can only open .enbx files. If this is a valid edunetwork file, please rename it."); + MessageBox.Show("NB_LoadToolStripMenuItemErr"); return; } LastPath = mydialog.FileName; @@ -1047,7 +1047,7 @@ namespace EduNetworkBuilder { bool todo = true; IPAddress destination = new IPAddress(NB.ZeroIPString, NB.ZeroIPString, IPAddressType.ip_only); - todo = destination.Edit(null, "Ping IP"); + todo = destination.Edit(null, NB.Translate("NB_NetViewPng")); if (todo) { myNetwork.DoAllPing(destination); @@ -1266,7 +1266,7 @@ namespace EduNetworkBuilder private void changeLanguageToolStripMenuItem_Click(object sender, EventArgs e) { - DialogResult answer = MessageBox.Show("Changing the language can only be done when the program starts: Close the program and prompt for a new language when you start it again?","Are you Sure?",MessageBoxButtons.YesNoCancel); + DialogResult answer = MessageBox.Show(NB.Translate("NB_ChngLngClose"),NB.Translate("NB_ChngLngSure"),MessageBoxButtons.YesNoCancel); if (answer == System.Windows.Forms.DialogResult.Yes) { Properties.Settings.Default.LanguageHasBeenChosen = false; //So we choose the language on restart diff --git a/EduNetworkBuilder/Resources/languages/edustrings.resx b/EduNetworkBuilder/Resources/languages/edustrings.resx index 3d7b063..fdfb3b0 100644 --- a/EduNetworkBuilder/Resources/languages/edustrings.resx +++ b/EduNetworkBuilder/Resources/languages/edustrings.resx @@ -1109,4 +1109,196 @@ Packet destined for another machine. Dropped. NC_ProcessInboundPacket_DifferentMachine3 = Packet destined for another machine. Dropped. + + Add a Wireless Bridge to the network. + NB_BuildBtnBridge = Add a Wireless Bridge to the network. + + + Use a network cable to connect network components. + NB_BuildBtnCable = Use a network cable to connect network components. + + + Add a Cellhone to the network. + NB_BuildBtnCell = Add a Cellhone to the network. + + + Add a copier to the network. + NB_BuildBtnCopier = Add a copier to the network. + + + Add a firewall to the network. + NB_BuildBtnFirewall = Add a firewall to the network. + + + Add a hub to the network. + NB_BuildBtnHub = Add a hub to the network. + + + Add a laptop to the network. + NB_BuildBtnLaptop = Add a laptop to the network. + + + Add a light to the network. + NB_BuildBtnLight = Add a light to the network. + + + Add a microwave to the network. + NB_BuildBtnMicrowave = Add a microwave to the network. + + + Add a PC to the network. + NB_BuildBtnPC = Add a PC to the network. + + + Add an IP-Phone to the network. + NB_BuildBtnPhone = Add an IP-Phone to the network. + + + Add a printer to the network. + NB_BuildBtnPrinter = Add a printer to the network. + + + Add a Wireless Repeater to the network. + NB_BuildBtnRepeat = Add a Wireless Repeater to the network. + + + Add a Router to the network. + NB_BuildBtnRouter = Add a Router to the network. + + + Select items from the network. + NB_BuildBtnSelect = Select items from the network. + + + Add a server to the network. + NB_BuildBtnServer = Add a server to the network. + + + Add a switch to the network. + NB_BuildBtnSwitch = Add a switch to the network. + + + Add a Tablet to the network. + NB_BuildBtnTablet = Add a Tablet to the network. + + + Add a Wireless Access Point to the network. + NB_BuildBtnWAP = Add a Wireless Access Point to the network. + + + Add a Wireless Router to the network. + NB_BuildBtnWRouter = Add a Wireless Router to the network. + + + Show the color of the items making the puzzle. + NB_BuildWindColor = Show the color of the items making the puzzle. + + + Color-code & give decent mouse-over help for the puzzle. + NB_BuildWindDecent = Color-code & give decent mouse-over help for the puzzle. + + + Color-code & give minor mouse-over help for the puzzle. + NB_BuildWindMinor = Color-code & give minor mouse-over help for the puzzle. + + + Show the message describing the puzzle. + NB_BuildWindMsg = Show the message describing the puzzle. + + + Show no help for the puzzle + NB_BuildWindNone = Show no help for the puzzle + + + Changing the language can only be done when the program starts: Close the program and prompt for a new language when you start it again? + NB_ChngLngClose = Changing the language can only be done when the program starts: Close the program and prompt for a new language when you start it again?" = + + + Are you Sure? + NB_ChngLngSure = Are you Sure? + + + ^Level + NB_Level = ^Level + + + EduNetworkBuilder can only open .enbx files. If this is a valid edunetwork file, please rename it. + NB_LoadToolStripMenuItemErr = EduNetworkBuilder can only open .enbx files. If this is a valid edunetwork file, please rename it. + + + Arp + NB_NetViewArp = Arp + + + Arp request [host] + NB_NetViewArp = NB_NetViewPing + + + Arp request + NB_NetViewArp2 = Arp request + + + Clear Arp Table + NB_NetViewClr = Clear Arp Table + + + DHCP request + NB_NetViewDHCP = DHCP request + + + Ping + NB_NetViewPing = Ping + + + Ping [host] + NB_NetViewPing = Ping [host] + + + Ping IP + NB_NetViewPng = Ping IP + + + EduNetworkBuilder + NB_UpdteFrmName = EduNetworkBuilder + + + All + NTE_All = All + + + Read + NTE_Read = Read + + + Solved! Would you like to open the puzzle box to go to the next puzzle? 'No' will let you continue to play with this one. + N_MarkAsSolvedDone = Solved! Would you like to open the puzzle box to go to the next puzzle? 'No' will let you continue to play with this one. + + + Solved + N_MarkAsSolvedSolved = Solved + + + ----All Done---- + N_ProssPackDone = ----All Done---- + + + Debugging + N_ProcPackOnceDbug = Debugging + + + Packet Tick Counter reached. Did the packet go into an infinite loop? + N_ProcPackOnceTickCounter = Packet Tick Counter reached. Did the packet go into an infinite loop? + + + Network + N_ProssShouldContinNet = Network + + + The packet timed out. + N_ProssShouldContinTime = The packet timed out. + + + The packet timed out and was dropped. + N_ProssShouldContinTimeout = The packet timed out and was dropped. + \ No newline at end of file