From 0361a5b8adf2d7da30a0c9136a0325617a05744f Mon Sep 17 00:00:00 2001 From: Tim Young Date: Thu, 19 Nov 2015 07:50:28 -0500 Subject: [PATCH] Translation --- EduNetworkBuilder/NB.cs | 4 +- .../Resources/languages/edustrings.resx | 6 ++- EduNetworkBuilder/toedit.txt | 43 +------------------ 3 files changed, 9 insertions(+), 44 deletions(-) diff --git a/EduNetworkBuilder/NB.cs b/EduNetworkBuilder/NB.cs index 17cb7e6..818cc4a 100644 --- a/EduNetworkBuilder/NB.cs +++ b/EduNetworkBuilder/NB.cs @@ -592,7 +592,7 @@ namespace EduNetworkBuilder else { throw new InvalidOperationException( - "Invalid Bit " + BitNumber.ToString() + "! (Should be from 0 to 7)"); + string.Format(NB.Translate("NB_BitError"), BitNumber.ToString())); } } @@ -605,7 +605,7 @@ namespace EduNetworkBuilder else { throw new InvalidOperationException( - "Invalid Bit" + BitNumber.ToString() + "! (Should be from 0 to 7)"); + string.Format(NB.Translate("NB_BitError"), BitNumber.ToString())); } } diff --git a/EduNetworkBuilder/Resources/languages/edustrings.resx b/EduNetworkBuilder/Resources/languages/edustrings.resx index a5bf184..a0183ba 100644 --- a/EduNetworkBuilder/Resources/languages/edustrings.resx +++ b/EduNetworkBuilder/Resources/languages/edustrings.resx @@ -503,7 +503,7 @@ - RTFWindow rtbContent = + RTFWindow rtbContent = [intentionally blank. content is loaded from file] OK @@ -1393,4 +1393,8 @@ Total seconds = {0} Stopping. N_ProssShouldContinSec = Total seconds = {0} Stopping. + + Invalid Bit {0}! (Should be from 0 to 7) + NB_BitError = Invalid Bit {0}! (Should be from 0 to 7) + \ No newline at end of file diff --git a/EduNetworkBuilder/toedit.txt b/EduNetworkBuilder/toedit.txt index e08d325..49bef6d 100644 --- a/EduNetworkBuilder/toedit.txt +++ b/EduNetworkBuilder/toedit.txt @@ -1,15 +1,8 @@ -DeviceConfig.cs:31: lblHelp.Text = "Select the network card or interface for that network card that you wish to edit. Then press the [edit] button to make changes to that. Press the [-] to remove it, and press [+] to add another."; -DeviceConfig.cs:74: if (ClonedItem.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") -DeviceConfig.cs:105: btnGateway.Text = string.Format("Gateway: {0}", ndCLonedItem.GetGateway().GetIP.ToIpString()); DeviceConfig.cs:143: lbArpTable.Items.Add("Arp Table MAC\tIPAddress"); DeviceConfig.cs:146: lbArpTable.Items.Add(ae.MACAddress + "\t" + ae.IPAddr); DeviceConfig.cs:151: string selectedNicName = ""; DeviceConfig.cs:153: selectedNicName = Regex.Replace(selectedNicName, " .*", ""); DeviceConfig.cs:154: selectedNicName = Regex.Replace(selectedNicName, "\\*", ""); -DeviceConfig.cs:212: MessageBox.Show(string.Format("The name '{0}' is being used as part of this puzzle and this machine cannot be named that.", otext)); -DeviceConfig.cs:221: if (ClonedItem.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") -DeviceConfig.cs:293: if (ClonedItem.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") -DeviceConfig.cs:346: if (ClonedItem.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") DeviceConfig.cs:352: selectedNIC = Regex.Replace(selectedNIC, " .*", ""); DeviceConfig.cs:353: selectedNIC = Regex.Replace(selectedNIC, "\\*", ""); IPAddress.cs:99: public bool Edit(NetworkDevice FromWhat, string message="") @@ -21,7 +14,6 @@ IPAddress.cs:131: if (mySplitVal[0] == "172") IPAddress.cs:133: _mask = "255.255.0.0".ParseIp(); IPAddress.cs:135: if (mySplitVal[0] == "192") IPAddress.cs:137: _mask = "255.255.255.0".ParseIp(); -IPAddress.cs:226: string tstring = string.Format("IP:{0} Mask:{1} GW:{2}", IPAddress.cs:244: return String.Join(".", parts); IPAddressEntry.cs:32: string hostname = ""; IPAddressEntry.cs:48: if (!lNM.Contains("255")) @@ -60,15 +52,12 @@ NB.cs:229: public static string BroadcastIPString = "255.255.255.255"; // NB.cs:230: public static string ZeroIPString = "0.0.0.0"; NB.cs:231: public static string LoopbackIPString = "127.0.0.1"; NB.cs:232: public static int LinkStep = 8;//The percentage of the link we move at each "tick" -NB.cs:287: myresource = new ResourceManager("EduNetworkBuilder.Resources.languages.edustrings", MyAssembly); NB.cs:326: string answer=""; NB.cs:328: if (answer == null) return ""; NB.cs:336: return "H_" + What.ToString() + "_Key"; NB.cs:340: return "H_" + What.ToString() + "_Title"; NB.cs:362: if (lang == "") lang = "en"; NB.cs:364: string StartingItem = ""; -NB.cs:513: if(What.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") -NB.cs:515: if (What.GetType().ToString() == "EduNetworkBuilder.NetworkLink") NB.cs:563: sBuilder.Append(number.ToString("X2")); NB.cs:595: "Invalid Bit " + BitNumber.ToString() + "! (Should be from 0 to 7)"); NB.cs:608: "Invalid Bit" + BitNumber.ToString() + "! (Should be from 0 to 7)"); @@ -99,41 +88,26 @@ Network.cs:167: if(Regex.IsMatch(Individual.Name.ToLo Network.cs:172: if (Regex.IsMatch(Individual.Name.ToLower(), "title")) Network.cs:183: if (NetMessage.GetText() != "" && !AlreadyDisplayedMessage) Network.cs:207: Save(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Test.enbx")); -Network.cs:221: writer.WriteComment("This is a network file for EduNetworkBuilder."); -Network.cs:327: if (tItem.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") -Network.cs:342: if (tItem.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") -Network.cs:357: if(tItem.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") -Network.cs:396: if(NetComponents[looper].GetType().ToString() == "EduNetworkBuilder.NetworkLink") -Network.cs:421: if (NC.GetType().ToString() == "EduNetworkBuilder.NetworkLink") Network.cs:461: if(tString != "") Network.cs:503: if (nt.ColorItemsIfNeeded(HintsToDisplay != NetTestVerbosity.none)) //only change the color if we are not "none" -Network.cs:524: if (NC.GetType().ToString() == "EduNetworkBuilder.NetworkLink") -Network.cs:530: if (NC.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") Network.cs:667: if (PuzzleName != "" && PuzzleName != null) Network.cs:730: if (nt.TheTest == NetTestType.HelpRequest && sHost == "" && dHost == nt.dHost && dHost == "?Button") -Network.cs:748: if (nc.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") -Network.cs:927: if (nc.GetType().ToString() == "EduNetworkBuilder.NetworkLink") -Network.cs:935: if (nc.GetType().ToString() == "EduNetworkBuilder.NetworkDevice") Network.cs:1089: //Console.WriteLine("position=" + HowFar.ToString()); Network.cs:1099: //Console.WriteLine("position=" + HowFar.ToString()); NetworkBuilder.cs:24: public Network myNetwork = new Network(""); NetworkBuilder.cs:26: private string selectedButton = ""; NetworkBuilder.cs:37: public string ChosenLanguage = "en"; //The language to try to load NetworkBuilder.cs:64: lblStatus.Text = ""; -NetworkBuilder.cs:128: LanguageResources = new ResourceManager("EduNetworkBuilder.Resources.languages.edustrings", MyAssembly); NetworkBuilder.cs:155: if (answer == null) return ""; NetworkBuilder.cs:338: if (myNetwork.NetworkFilename != "") NetworkBuilder.cs:368: if (myNetwork.NetTitle.GetText() != "") NetworkBuilder.cs:369: Text += ": " + myNetwork.NetTitle.GetText(); NetworkBuilder.cs:370: if (myNetwork.NetMessage.GetText() != "") -NetworkBuilder.cs:432: System.Resources.ResourceManager("EduNetworkBuilder.Properties.Resources", -NetworkBuilder.cs:440: MessageBox.Show(String.Format("NB_LoadPuzInfo", str)); NetworkBuilder.cs:449: //Console.WriteLine("Puzzle: " + str + " " + newPuzzle.PuzzleTitle); NetworkBuilder.cs:519: lblStatus.Text = ""; NetworkBuilder.cs:520: selectedButton = ""; -NetworkBuilder.cs:547: pbNetworkView.ContextMenuStrip.Items.Add(string.Format("Ping {0}",tStr)); -NetworkBuilder.cs:552: pbNetworkView.ContextMenuStrip.Items.Add(string.Format("Arp {0}", tStr)); -NetworkBuilder.cs:589: pbNetworkView.ContextMenuStrip.Items.Add(string.Format("Remove Link To {0}", host)); +NetworkBuilder.cs:552: pbNetworkView.ContextMenuStrip.Items.Add(string.Format("NB_NetViewArpStr", tStr)); +NetworkBuilder.cs:589: pbNetworkView.ContextMenuStrip.Items.Add(string.Format("NB_NetViewRmLnkStr", host)); NetworkBuilder.cs:608: released = Regex.Replace(released, ".* ", ""); NetworkBuilder.cs:713: IPAddress destination = new IPAddress(NB.ZeroIPString, "255.255.255.255", IPAddressType.ip_only); NetworkBuilder.cs:731: lblStatus.Text = ""; @@ -146,7 +120,6 @@ NetworkBuilder.cs:902: if(!Regex.IsMatch(mydialog.FileName,@"^.*.enbx NetworkBuilder.cs:919: if (oldfile != null && oldfile != "" && File.Exists(oldfile)) NetworkBuilder.cs:940: mydialog.Filter = "EduNet File (*.enbx)|*.enbx"; NetworkBuilder.cs:943: if (myNetwork.NetworkFilename != "") -NetworkBuilder.cs:1068: System.Resources.ResourceManager("EduNetworkBuilder.Properties.Resources", NetworkBuilder.cs:1085: LoadNetworkFromResource("OneNet"); NetworkBuilder.cs:1091: LoadNetworkFromResource("TwoNets"); NetworkBuilder.cs:1097: LoadNetworkFromResource("DHCP"); @@ -198,25 +171,17 @@ NetworkCard.cs:581: if (nPacket.destMAC == null || nPacket.de NetworkCard.cs:649: tPacket.Tracking.AddMessage(DebugLevel.natting, nd.hostname, "MASQ: Changing source IP back to: " + oAddress.GetIPString); NetworkCard.cs:661: tPacket.Tracking.Status = hostname + " The packet was rejected by the firewall.. Dropped."; NetworkCardEditor.cs:42: string btnval = "0.0.0.0"; -NetworkCardEditor.cs:50: lblVPNEnd.Text = "VPN Endpoint:"; -NetworkCardEditor.cs:62: lblVPNEncrypt.Text = "Encryption Key:"; NetworkCardEditor.cs:81: lblVPNEnd.Text = "SSID:"; -NetworkCardEditor.cs:91: lblVPNEncrypt.Text = "Wireless Key:"; NetworkCardEditor.cs:145: string btnval = "0.0.0.0"; -NetworkCardEditor.cs:166: lblLinkStatus.Text = "Connected"; -NetworkCardEditor.cs:168: lblLinkStatus.Text = "Disconnected"; NetworkCardEditor.cs:192: MyNicToEdit.TunnelEndpoint = new IPAddress(NB.ZeroIPString, "255.255.255.0", IPAddressType.ip_only); NetworkCardEditor.cs:194: MyNicToEdit.TunnelEndpoint.Edit(nd,"Endpoint"); NetworkComponent.cs:18: public bool IsDirty = true; //If something has changed and it needs to be re-drawn. It starts as "true" NetworkComponent.cs:20: public string hostname = ""; -NetworkComponent.cs:88: throw new ArgumentException("The type must be serializable.", "source"); -NetworkDevice.cs:295: DefaultGW.Edit(this,"Default Gateway"); NetworkDevice.cs:390: DefaultGW.Save(writer, "gateway"); NetworkDevice.cs:397: ip.Save(writer, "route"); NetworkDevice.cs:401: dhcp.Save(writer, "dhcprange"); NetworkDevice.cs:439: answer += "\n" + addr; NetworkDevice.cs:449: answer += "\n" + tString; -NetworkDevice.cs:707: MessageBox.Show(string.Format("The network card, {0} is locked as part of the puzzle.", NICs[index].NicName()), "Locked NIC"); NetworkDevice.cs:720: if (nic.SSID == "") continue; NetworkDevice.cs:844: tstr = Regex.Replace(name, " .*", ""); NetworkDevice.cs:871: Font stringFont = new Font("Consolas", 17); @@ -225,12 +190,8 @@ NetworkDevice.cs:921: title += "if: "; NetworkDevice.cs:923: title += nic.NicName() + ": "; NetworkDevice.cs:961: return new HostNicID(-1, -1, hostname, ""); NetworkDevice.cs:995: if (dest.GetMask != 0 && dest.GetMask.ToIpString() != "255.255.255.0") -NetworkDevice.cs:1130: Packet DHCPPacket = new Packet(this, "", NB.BroadcastMACString, "DHCP Request", PacketType.dhcp_request); -NetworkDevice.cs:1140: Packet PingPacket = new Packet(this,Destination,"Ping",PacketType.ping_request); -NetworkDevice.cs:1148: Packet ArpPacket = new Packet(this, Destination, "Arp Request", PacketType.arp_request); NetworkDevice.cs:1155: public void TunnelPacketFromHere(IPAddress Destination, Packet Payload, string Encryption = "") NetworkDevice.cs:1164: if (Encryption != "") -NetworkDevice.cs:1166: Packet TunnelPacket = new Packet(this, Destination, "Tunnel", TunType); NetworkDevice.cs:1201: //Console.WriteLine(hostname + ": packet=" + tPacket.MyType.ToString()); NetworkDevice.cs:1202: //Console.WriteLine(" " + hostname + ": d:" + ipc.destIP.GetIPString + " s:" + tPacket.sourceIP.GetIPString); NetworkDevice.cs:1204: // Console.WriteLine(" Broadcast");