diff --git a/EduNetworkBuilder/NB.cs b/EduNetworkBuilder/NB.cs index 91b38dd..17cb7e6 100644 --- a/EduNetworkBuilder/NB.cs +++ b/EduNetworkBuilder/NB.cs @@ -233,7 +233,7 @@ namespace EduNetworkBuilder public static int PacketPixelSize = 8; //The size of the packet pixel public static int PacketVersionNum = 2; //2 uses the new stuff. Anything else uses the old stuff public const int GridSize = 10; - public static string[,] LanguageChoices = { { "English", "en" }, { "French", "fr" } }; + public static string[,] LanguageChoices = { { NB.Translate("NB_NBEn"), "en" }, { NB.Translate("NB_NBFr"), "fr" } }; public static int WirelessMaxUnsuccessfulLink = 120; //The link will connect, but the packet will drop public static int WirelessMaxSuccessfulLink = 100; //Packets will drop after this distance public static int WirelessReconnectDistance = 70; //Try to find a closer AP if we are this far out. @@ -373,11 +373,11 @@ namespace EduNetworkBuilder //we need to choose a language: Form LanguageForm = new Form(); - LanguageForm.Text = "Choose Language"; + LanguageForm.Text = NB.Translate("NB_ChangeLang1"); Label lblText = new Label(); lblText.Location = new Point(5, 5); lblText.AutoSize = true; - lblText.Text = "Choose a Language:"; + lblText.Text = NB.Translate("NB_ChangeLang2"); LanguageForm.Icon = Properties.Resources.NBIco; ComboBox cbQuestions = new ComboBox(); @@ -400,7 +400,7 @@ namespace EduNetworkBuilder Button btnAccept = new Button(); btnAccept.Location = new Point(cbQuestions.Location.X, cbQuestions.Location.Y + cbQuestions.Height + 10); - btnAccept.Text = "OK"; + btnAccept.Text = NB.Translate("NB_ChangeLangOK"); btnAccept.Click += (s, g) => { Button b = (Button)s; Form f = (Form)b.Parent; f.Close(); }; LanguageForm.Controls.Add(lblText); @@ -523,7 +523,7 @@ namespace EduNetworkBuilder //make a new window if needed foreach(Form myfrm in Application.OpenForms) { - if(myfrm.Name == "Context") + if(myfrm.Name == NB.Translate("NB_RdCtxtHelp")) { //We have a context window tForm = (RTFWindow)myfrm; @@ -534,7 +534,7 @@ namespace EduNetworkBuilder { //We do not have one yet. Make a new one tForm = new RTFWindow(RTFWindowContents.help); - tForm.Name = "Context"; + tForm.Name = NB.Translate("NB_RdCtxtHelp"); } //load help tForm.Show(); diff --git a/EduNetworkBuilder/NetTest.cs b/EduNetworkBuilder/NetTest.cs index 49e4e26..3cedc49 100644 --- a/EduNetworkBuilder/NetTest.cs +++ b/EduNetworkBuilder/NetTest.cs @@ -116,7 +116,7 @@ namespace EduNetworkBuilder { case NetTestVerbosity.basic: if(TheTest != NetTestType.ReadContextHelp) - toreturn = "Has a problem"; + toreturn = NB.Translate("NT_TstDscriptProblem"); else toreturn = NB.Translate("_ReadContext"); break; @@ -124,55 +124,55 @@ namespace EduNetworkBuilder switch (TheTest) { case NetTestType.NeedsDefaultGW: - toreturn = "Needs the gateway set"; + toreturn = NB.Translate("NT_TstDscriptGteway"); break; // case NetTestType.NeedsPingToHost: // toreturn = "Cannot ping"; // break; case NetTestType.NeedsRouteToNet: - toreturn = "Needs a route set"; + toreturn = NB.Translate("NT_TstDscriptRout"); break; case NetTestType.NeedsLocalIPTo: - toreturn = "Needs a local IP"; + toreturn = NB.Translate("NT_TstDscriptIP"); break; case NetTestType.NeedsLinkToDevice: - toreturn = "Needs to be connected to the network."; + toreturn = NB.Translate("NT_TstDiscriptConnect"); break; case NetTestType.SuccessfullyArps: - toreturn = "Needs to find ARP from some device"; + toreturn = NB.Translate("NT_TstDiscriptARP"); break; case NetTestType.SuccessfullyDHCPs: - toreturn = "Needs a DHCP IP address"; + toreturn = NB.Translate("NT_TstDiscriptDHCPIP"); break; case NetTestType.SuccessfullyPings: - toreturn = "Must ping a host."; + toreturn = NB.Translate("NT_TstDiscriptPing"); break; case NetTestType.HelpRequest: - toreturn = "Get mouse-over help"; + toreturn = NB.Translate("NT_TstDiscriptHelp"); break; case NetTestType.FailedPing: - toreturn = "Should fail to ping a specific host"; + toreturn = NB.Translate("NT_TstDiscriptPingHost"); break; case NetTestType.DHCPServerEnabled: - toreturn = "Needs change to DHCP server:"; + toreturn = NB.Translate("NT_TstDiscriptDHCP"); break; case NetTestType.LockAll: - toreturn = "Is Locked"; + toreturn = NB.Translate("NT_TstDiscriptLock"); break; case NetTestType.LockDHCP: - toreturn = "Has Locked DHCP"; + toreturn = NB.Translate("NT_TstDiscriptLockDHCP"); break; case NetTestType.LockIP: - toreturn = "Has Locked IP"; + toreturn = NB.Translate("NT_TstDiscriptLockIP"); break; case NetTestType.LockNic: - toreturn = "Has Locked NIC"; + toreturn = NB.Translate("NT_TstDiscriptLockNIC"); break; case NetTestType.LockRoute: - toreturn = "Has Locked Route"; + toreturn = NB.Translate("NT_TstDiscriptLockRout"); break; case NetTestType.LockGateway: - toreturn = "Has Locked Gateway"; + toreturn = NB.Translate("NT_TstDiscriptGteway"); break; case NetTestType.ReadContextHelp: toreturn = NB.Translate("_ReadContext"); @@ -184,56 +184,56 @@ namespace EduNetworkBuilder switch (TheTest) { case NetTestType.NeedsDefaultGW: - toreturn = "Needs the gateway set to:"; + toreturn = NB.Translate("NT_TstDiscriptGteway2"); break; // case NetTestType.NeedsPingToHost: // toreturn = "Cannot ping host:"; // break; case NetTestType.NeedsRouteToNet: - toreturn = "Needs a route to network:"; + toreturn = NB.Translate("NT_TstDiscriptRout2"); break; case NetTestType.NeedsLocalIPTo: - toreturn = "Needs an IP local to host:"; + toreturn = NB.Translate("NT_TstDiscriptIP2"); break; case NetTestType.NeedsLinkToDevice: - toreturn = "Needs a link to host:"; + toreturn = NB.Translate("NT_TstDiscriptLink"); break; case NetTestType.SuccessfullyArps: - toreturn = "Needs to find ARP from:"; + toreturn = NB.Translate("NT_TstDiscriptARP2"); break; case NetTestType.SuccessfullyDHCPs: - toreturn = "Needs a DHCP IP address from server:"; + toreturn = NB.Translate("NT_TstDiscriptDHCPIP2"); break; case NetTestType.SuccessfullyPings: - toreturn = "Must ping:"; + toreturn = NB.Translate("NT_TstDiscriptPing2"); break; case NetTestType.HelpRequest: - toreturn = "Get mouse-over help of level:"; + toreturn = NB.Translate("NT_TstDiscriptHelp2"); break; case NetTestType.FailedPing: - toreturn = "Needs to try to ping (and fail):"; + toreturn = NB.Translate("NT_TstDiscriptPingFail"); break; case NetTestType.DHCPServerEnabled: - toreturn = "DHCP Server enabled = "; + toreturn = NB.Translate("NT_TstDiscriptDHCP2"); break; case NetTestType.LockAll: - toreturn = "Is Locked:"; + toreturn = NB.Translate("NT_TstDiscriptLock") + ":"; break; case NetTestType.LockDHCP: - toreturn = "Has Locked DHCP:"; + toreturn = NB.Translate("NT_TstDiscriptLockDHCP") + ":"; break; case NetTestType.LockIP: - toreturn = "Has Locked IP:"; + toreturn = NB.Translate("NT_TstDiscriptLockIP") + ":"; break; case NetTestType.LockNic: - toreturn = "Has Locked NIC:"; + toreturn = NB.Translate("NT_TstDiscriptLockNIC") + ":"; break; case NetTestType.LockRoute: - toreturn = "Has Locked Route:"; + toreturn = NB.Translate("NT_TstDiscriptLockRout") + ":"; break; case NetTestType.LockGateway: - toreturn = "Has Locked Gateway:"; + toreturn = NB.Translate("NT_TstDiscriptGteway") + ":"; break; case NetTestType.ReadContextHelp: toreturn = NB.Translate("_ReadContext"); diff --git a/EduNetworkBuilder/Resources/languages/edustrings.resx b/EduNetworkBuilder/Resources/languages/edustrings.resx index 2cbb1ab..b5984c6 100644 --- a/EduNetworkBuilder/Resources/languages/edustrings.resx +++ b/EduNetworkBuilder/Resources/languages/edustrings.resx @@ -953,4 +953,136 @@ <value>--Static Routes (Read/Write)--</value> <comment>LBW_UpdateFormStatRout = --Static Routes (Read/Write)--</comment> </data> + <data name="NB_ChangeLang1" xml:space="preserve"> + <value>Choose Language</value> + <comment>NB_ChangeLang1 = Choose Language</comment> + </data> + <data name="NB_ChangeLang2" xml:space="preserve"> + <value>Choose a Language:</value> + <comment>NB_ChangeLang2 = Choose a Language:</comment> + </data> + <data name="NB_ChangeLangOK" xml:space="preserve"> + <value>OK</value> + <comment>NB_ChangeLangOK = OK</comment> + </data> + <data name="NB_NBEn" xml:space="preserve"> + <value>English</value> + <comment>NB_NBEn = English</comment> + </data> + <data name="NB_NBFr" xml:space="preserve"> + <value>French</value> + <comment>NB_NBFr = French</comment> + </data> + <data name="NB_RdCtxtHelp" xml:space="preserve"> + <value>Context</value> + <comment>NB_RdCtxtHelp = Context</comment> + </data> + <data name="NT_TstDiscriptARP" xml:space="preserve"> + <value>Needs to find ARP from some device</value> + <comment>NT_TstDiscriptARP = Needs to find ARP from some device</comment> + </data> + <data name="NT_TstDiscriptARP2" xml:space="preserve"> + <value>Needs to find ARP from:</value> + <comment>NT_TstDiscriptARP2 = Needs to find ARP from:</comment> + </data> + <data name="NT_TstDiscriptConnect" xml:space="preserve"> + <value>Needs to be connected to the network.</value> + <comment>NT_TstDiscriptConnect = Needs to be connected to the network.</comment> + </data> + <data name="NT_TstDiscriptDHCP" xml:space="preserve"> + <value>Needs change to DHCP server:</value> + <comment>NT_TstDiscriptDHCP = Needs change to DHCP server:</comment> + </data> + <data name="NT_TstDiscriptDHCP2" xml:space="preserve"> + <value>DHCP Server enabled =</value> + <comment>NT_TstDiscriptDHCP2 = DHCP Server enabled =</comment> + </data> + <data name="NT_TstDiscriptDHCPIP" xml:space="preserve"> + <value>Needs a DHCP IP address</value> + <comment>NT_TstDiscriptDHCPIP = Needs a DHCP IP address</comment> + </data> + <data name="NT_TstDiscriptDHCPIP2" xml:space="preserve"> + <value>Needs a DHCP IP address from server:</value> + <comment>NT_TstDiscriptDHCPIP2 = Needs a DHCP IP address from server:</comment> + </data> + <data name="NT_TstDiscriptGteway2" xml:space="preserve"> + <value>Needs the gateway set to:</value> + <comment>NT_TstDiscriptGteway2 = Needs the gateway set to:</comment> + </data> + <data name="NT_TstDiscriptHelp" xml:space="preserve"> + <value>Get mouse-over help</value> + <comment>NT_TstDiscriptHelp = Get mouse-over help</comment> + </data> + <data name="NT_TstDiscriptHelp2" xml:space="preserve"> + <value>Get mouse-over help of level:</value> + <comment>NT_TstDiscriptHelp2 = Get mouse-over help of level:</comment> + </data> + <data name="NT_TstDiscriptIP2" xml:space="preserve"> + <value>Needs an IP local to host:</value> + <comment>NT_TstDiscriptIP2 = Needs an IP local to host:</comment> + </data> + <data name="NT_TstDiscriptLink" xml:space="preserve"> + <value>Needs a link to host:</value> + <comment>NT_TstDiscriptLink = Needs a link to host:</comment> + </data> + <data name="NT_TstDiscriptLock" xml:space="preserve"> + <value>Is Locked</value> + <comment>NT_TstDiscriptLock = Is Locked</comment> + </data> + <data name="NT_TstDiscriptLockDHCP" xml:space="preserve"> + <value>Has Locked DHCP</value> + <comment>NT_TstDiscriptLockDHCP = Has Locked DHCP</comment> + </data> + <data name="NT_TstDiscriptLockGteway" xml:space="preserve"> + <value>Has Locked Gateway</value> + <comment>NT_TstDiscriptGteway = Has Locked Gateway</comment> + </data> + <data name="NT_TstDiscriptLockIP" xml:space="preserve"> + <value>Has Locked IP</value> + <comment>NT_TstDiscriptLockIP = Has Locked IP</comment> + </data> + <data name="NT_TstDiscriptLockNIC" xml:space="preserve"> + <value>Has Locked NIC</value> + <comment>NT_TstDiscriptLockNIC = Has Locked NIC</comment> + </data> + <data name="NT_TstDiscriptLockRout" xml:space="preserve"> + <value>Has Locked Route</value> + <comment>NT_TstDiscriptLockRout = Has Locked Route</comment> + </data> + <data name="NT_TstDiscriptPing" xml:space="preserve"> + <value>Must ping a host.</value> + <comment>NT_TstDiscriptPing = Must ping a host.</comment> + </data> + <data name="NT_TstDiscriptPing2" xml:space="preserve"> + <value>Must ping:</value> + <comment>NT_TstDiscriptPing2 = Must ping:</comment> + </data> + <data name="NT_TstDiscriptPingFail" xml:space="preserve"> + <value>Needs to try to ping (and fail):</value> + <comment>NT_TstDiscriptPingFail = Needs to try to ping (and fail):</comment> + </data> + <data name="NT_TstDiscriptPingHost" xml:space="preserve"> + <value>Should fail to ping a specific host</value> + <comment>NT_TstDiscriptPingHost = Should fail to ping a specific host</comment> + </data> + <data name="NT_TstDiscriptRout2" xml:space="preserve"> + <value>Needs a route to network:</value> + <comment>NT_TstDiscriptRout2 = Needs a route to network:</comment> + </data> + <data name="NT_TstDscriptGteway" xml:space="preserve"> + <value>Needs the gateway set</value> + <comment>NT_TstDscriptGteway = Needs the gateway set</comment> + </data> + <data name="NT_TstDscriptIP" xml:space="preserve"> + <value>Needs a local IP</value> + <comment>NT_TstDscriptIP = Need a local IP</comment> + </data> + <data name="NT_TstDscriptProblem" xml:space="preserve"> + <value>Has a problem</value> + <comment>NT_TestDiscriptProblem = Has a problem</comment> + </data> + <data name="NT_TstDscriptRout" xml:space="preserve"> + <value>Needs a route set</value> + <comment>NT_TstDscriptRout = Needs a route set</comment> + </data> </root> \ No newline at end of file