Packet translations

This commit is contained in:
Tim Young 2015-11-19 14:25:15 -05:00
parent 5823e4095d
commit ed0ccf16ce
2 changed files with 22 additions and 6 deletions

View File

@ -340,8 +340,8 @@ namespace EduNetworkBuilder
myDirection = nb_direction.to_dst;
else
myDirection = nb_direction.to_src;
Console.WriteLine(NB.Translate("Starting on link.") + string.Format(" SMAC: {0} DMAC: {1}",sourceMAC,destMAC));
AddMessage(DebugLevel.debug, " " + "Starting on link");
Console.WriteLine(NB.Translate("P_StartingOnLink") + string.Format(" SMAC: {0} DMAC: {1}",sourceMAC,destMAC));
AddMessage(DebugLevel.debug, " " + NB.Translate("P_StartingOnLink"));
}
public void StartOnDevice(NetworkDevice theDevice)
@ -366,9 +366,9 @@ namespace EduNetworkBuilder
}
if(MyType == PacketType.arp_request && MyStatus == PacketStatus.finished_failed)
{
Tracking.AddMessage(DebugLevel.info, "Packet",
string.Format("Packet failed to reach any IP. No such IP on network: {0}", destIP.GetIPString));
Tracking.Status = string.Format("Packet failed to reach IP: {0}",destIP.GetIPString);
Tracking.AddMessage(DebugLevel.info, NB.Translate("P_Packet"),
NB.Translate("P_PacketFailedToReach") + ": " + destIP.GetIPString);
Tracking.Status = NB.Translate("P_PacketFailedToReach2") + ": "+ destIP.GetIPString;
MyStatus = PacketStatus.finished_failed;
}
if (MyStatus != PacketStatus.finished)
@ -448,7 +448,7 @@ namespace EduNetworkBuilder
{
if (!typeof(T).IsSerializable)
{
throw new ArgumentException("The type must be serializable.", "source");
throw new ArgumentException(NB.Translate("NC_CloneSerialzable"), NB.Translate("NC_source"));
}
// Don't serialize a null object, simply return the default for that object

View File

@ -1625,4 +1625,20 @@
<value>Not found.</value>
<comment>RTFW_NotFound = Not found.</comment>
</data>
<data name="P_Packet" xml:space="preserve">
<value>Packet</value>
<comment>P_Packet = Packet</comment>
</data>
<data name="P_PacketFailedToReach" xml:space="preserve">
<value>Packet failed to reach any IP. No such IP on network</value>
<comment>P_PacketFailedToReach = Packet failed to reach any IP. No such IP on network</comment>
</data>
<data name="P_PacketFailedToReach2" xml:space="preserve">
<value>Packet failed to reach IP</value>
<comment>P_PacketFailedToReach2 = Packet failed to reach IP</comment>
</data>
<data name="P_StartingOnLink" xml:space="preserve">
<value>Starting on link.</value>
<comment>P_StartingOnLink = Starting on link.</comment>
</data>
</root>