add a list of form prefixes and descriptions to help the translation system.

This commit is contained in:
Tim Young 2017-11-01 10:52:17 -05:00
parent 93b44141ea
commit 45e95666c5

View File

@ -24,6 +24,7 @@ namespace EduNetworkBuilder
string[,] LanguageChoices = { { NB.Translate("NB_NBEn"), "en" }, { NB.Translate("NB_NBFr"), "fr" } }; string[,] LanguageChoices = { { NB.Translate("NB_NBEn"), "en" }, { NB.Translate("NB_NBFr"), "fr" } };
string FormChosenDir = ""; string FormChosenDir = "";
List<TranslationResxFile> TranslationResxFiles = new List<TranslationResxFile>(); List<TranslationResxFile> TranslationResxFiles = new List<TranslationResxFile>();
List<TranslationFormData> FormData = new List<TranslationFormData>();
string EnglishTargetFile = "edustrings.resx"; string EnglishTargetFile = "edustrings.resx";
bool ChangedFormData = false; bool ChangedFormData = false;
@ -39,6 +40,8 @@ namespace EduNetworkBuilder
void LocalSetup() void LocalSetup()
{ {
FillTranslationFormData();
cb1Language.Items.Clear(); cb1Language.Items.Clear();
cb2Language.Items.Clear(); cb2Language.Items.Clear();
@ -91,6 +94,41 @@ namespace EduNetworkBuilder
tpFormStuff.Text = NB.Translate("TW_Form"); tpFormStuff.Text = NB.Translate("TW_Form");
} }
private void FillTranslationFormData()
{
FormData.Clear();
FormData.Add(new TranslationFormData("TW_", "Translation Window. The Window where translation into another language is done.", 1));
FormData.Add(new TranslationFormData("_", "Phrases which are used on multiple windows", 10));
FormData.Add(new TranslationFormData("Any", "Not Filtered by form", 0));
FormData.Add(new TranslationFormData("DC_", "Device Config Window. This is where you configure the switch, firewall, PC, etc.", 10));
FormData.Add(new TranslationFormData("H_", "The Help system.", 1));
FormData.Add(new TranslationFormData("IPAE_", "IP Address Editor. This is the IP Address Edit Window where you set the IP, subnet, gateway, etc", 9));
FormData.Add(new TranslationFormData("LBW_", "ListBox Window. This is mainly the list of puzzles.", 8));
FormData.Add(new TranslationFormData("LE_", "LinkEditor. This is where you define a network link between two devices", 6));
FormData.Add(new TranslationFormData("N_", "Network. The Network is basically the collection of devices, links, tests and the like. Most of the things translated are status or error messages.", 4));
FormData.Add(new TranslationFormData("NB_", "NetworkBuilder Window. This is the main window and the menus on that window.", 10));
FormData.Add(new TranslationFormData("NC_", "NetworkCard. The card itself mainly just generates error messages.", 4));
FormData.Add(new TranslationFormData("NCE_", "Network Card Editor. The window where you define the network card (VPN, Wireless card, etc)", 7));
FormData.Add(new TranslationFormData("ND_", "Network Device. The device is what generates most of the main error messages.", 8));
FormData.Add(new TranslationFormData("NI_", "Network Interface. This generates some error messages (VLAN, etc)", 3));
FormData.Add(new TranslationFormData("NL_", "Network Link. Generates some error messages when packets are corrupt.", 7));
FormData.Add(new TranslationFormData("NT_", "Network Test. These are the things that make the puzzles puzzling.", 10));
FormData.Add(new TranslationFormData("NTE_", "Network Test Editor. This is the window where you edit the network tests.", 2));
FormData.Add(new TranslationFormData("OW_", "Options Window. Where the puzzle options are configured. Teachers use this, but most students would not", 3));
FormData.Add(new TranslationFormData("Options_", "A few options which are used both on the options window, but also on the main window", 9));
FormData.Add(new TranslationFormData("P_", "Packet. The error messages that the packet itself generates.", 7));
FormData.Add(new TranslationFormData("PC_", "Person Class. When working with students and faculty.", 2));
FormData.Add(new TranslationFormData("PM_", "Packet Messages. The system for dealing with packet messages", 4));
FormData.Add(new TranslationFormData("PPF_", "Person Profile Form. When dealing with faculty / students.", 1));
FormData.Add(new TranslationFormData("RPC_", "Random Puzzle Chooser. The form for generating a random puzzle", 5));
FormData.Add(new TranslationFormData("RTFW_", "RichText Window. A multipurpose window. Used for displaying help or the puzzle description.", 7));
FormData.Sort((a, b) =>
{
if (a.Importance != b.Importance) return a.Importance.CompareTo(b.Importance);
return a.Prefix.CompareTo(b.Prefix);
});
}
private void ClosingStuff() private void ClosingStuff()
{ {
NBSettings mySettings = NB.GetSettings(); NBSettings mySettings = NB.GetSettings();
@ -524,5 +562,19 @@ namespace EduNetworkBuilder
File.Move(tmpfile, filename); File.Move(tmpfile, filename);
} }
} }
public class TranslationFormData
{
public string Prefix;
public string Description;
public int Importance; //10 is most important, 0 is least important
public TranslationFormData(string prefix, string description, int importance)
{
Prefix = prefix;
Description = description;
Importance = importance;
}
}
#endregion #endregion
} }