Tim Young 2015-11-19 14:15:00 -05:00
commit 4357450f17
6 changed files with 114 additions and 42 deletions

View File

@ -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();
}

View File

@ -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;

View File

@ -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();
}
}

View File

@ -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

View File

@ -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<HelpTopics>(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<HelpTopics>(newstring, HelpTopics.None);

View File

@ -1521,6 +1521,78 @@
<value>Ping success: The ping returned from its destination {0} -&gt; {1}</value>
<comment>ND_ProssArrSuccessStr = Ping success: The ping returned from its destination {0} -&gt; {1}</comment>
</data>
<data name="NL_DoMoveCorruptLight" xml:space="preserve">
<value>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.</value>
<comment>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.</comment>
</data>
<data name="NL_DoMoveCorruptWire" xml:space="preserve">
<value>The packet tried to use a broken network wire and was corrupted.</value>
<comment>NL_DoMoveCorruptWire = The packet tried to use a broken network wire and was corrupted.</comment>
</data>
<data name="NL_DoMoveDrop" xml:space="preserve">
<value>The packet got corrupted and was dropped.</value>
<comment>NL_DoMoveDrop = The packet got corrupted and was dropped.</comment>
</data>
<data name="NL_DoMoveNoEnd" xml:space="preserve">
<value>Oops! We do not have anything at the end of the network wire. This should not happen!</value>
<comment>NL_DoMoveNoEnd = Oops! We do not have anything at the end of the network wire. This should not happen!</comment>
</data>
<data name="NL_DoMoveNoEnd2" xml:space="preserve">
<value>Nothing at far end of the wire. This should never happen..</value>
<comment>NL_DoMoveNoEnd2 = Nothing at far end of the wire. This should never happen..</comment>
</data>
<data name="NL_NetLinkSSID" xml:space="preserve">
<value>The SSID and Key have been updated on the client.</value>
<comment>NL_NetLinkSSID = The SSID and Key have been updated on the client.</comment>
</data>
<data name="OW_EdTag" xml:space="preserve">
<value>Edit Tag</value>
<comment>OW_EdTag = Edit Tag</comment>
</data>
<data name="OW_OWGraphic" xml:space="preserve">
<value>The height and width of the network graphics area.</value>
<comment>OW_OWGraphic = The height and width of the network graphics area.</comment>
</data>
<data name="OW_OWHight" xml:space="preserve">
<value>The Height of the network window graphics area.</value>
<comment>OW_OWHight = The Height of the network window graphics area.</comment>
</data>
<data name="OW_OWLevel" xml:space="preserve">
<value>The Level that this puzzle is stored in.</value>
<comment>OW_OWLevel = The Level that this puzzle is stored in.</comment>
</data>
<data name="OW_OWLoad" xml:space="preserve">
<value>The message given when the network is loaded. Instructions.</value>
<comment>OW_OWLoad = The message given when the network is loaded. Instructions.</comment>
</data>
<data name="OW_OWSize" xml:space="preserve">
<value>The size of an item (switch, PC, etc). Default is 100.</value>
<comment>OW_OWSize = The size of an item (switch, PC, etc). Default is 100.</comment>
</data>
<data name="OW_OWSort" xml:space="preserve">
<value>How this is sorted within the list of puzzles.</value>
<comment>OW_OWSort = How this is sorted within the list of puzzles.</comment>
</data>
<data name="OW_OWTag" xml:space="preserve">
<value>The Tags that this puzzle is saved as (only for puzzles)</value>
<comment>OW_OWTag = The Tags that this puzzle is saved as (only for puzzles)</comment>
</data>
<data name="OW_OWThings" xml:space="preserve">
<value>The things that need to be solved before the puzzle is completed.</value>
<comment>OW_OWThings = The things that need to be solved before the puzzle is completed.</comment>
</data>
<data name="OW_OWTitle" xml:space="preserve">
<value>The title of the network window.</value>
<comment>OW_OWTitle = The title of the network window.</comment>
</data>
<data name="OW_OWWidth" xml:space="preserve">
<value>The width of the network window graphics area.</value>
<comment>OW_OWWidth = The width of the network window graphics area.</comment>
</data>
<data name="OW_Tag" xml:space="preserve">
<value>Tag</value>
<comment>OW_Tag = Tag</comment>
</data>
<data name="PM_UnknownHost" xml:space="preserve">
<value>unknown</value>
<comment>PacketMessage PM_UnknownHost = unknown</comment>