Make any new translation files that need to be made.
This commit is contained in:
parent
cdda440daf
commit
6f68fdf9c4
@ -21,7 +21,7 @@ namespace EduNetworkBuilder
|
|||||||
public partial class TranslationWindow : Form
|
public partial class TranslationWindow : Form
|
||||||
{
|
{
|
||||||
Network myNet = null;
|
Network myNet = null;
|
||||||
string[,] LanguageChoices = { { NB.Translate("NB_NBEn"), "en" }, { NB.Translate("NB_NBFr"), "fr" } };
|
string[,] LanguageChoices = NB.LanguageChoices;
|
||||||
string FormChosenDir = "";
|
string FormChosenDir = "";
|
||||||
List<TranslationResxFile> TranslationResxFiles = new List<TranslationResxFile>();
|
List<TranslationResxFile> TranslationResxFiles = new List<TranslationResxFile>();
|
||||||
List<TranslationFormData> FormData = new List<TranslationFormData>();
|
List<TranslationFormData> FormData = new List<TranslationFormData>();
|
||||||
@ -356,6 +356,21 @@ namespace EduNetworkBuilder
|
|||||||
TranslationResxFile TRF = new TranslationResxFile(currentFile);
|
TranslationResxFile TRF = new TranslationResxFile(currentFile);
|
||||||
TranslationResxFiles.Add(TRF);
|
TranslationResxFiles.Add(TRF);
|
||||||
}
|
}
|
||||||
|
//Add any resx files that do not exist, but should
|
||||||
|
for( int i=0; i< LanguageChoices.Length; i++)
|
||||||
|
{
|
||||||
|
TranslationResxFile one = FileFromLangCode(LanguageChoices[i, 1]);
|
||||||
|
if(one == null)
|
||||||
|
{
|
||||||
|
//We need to make an empty resx file
|
||||||
|
one = new TranslationResxFile();
|
||||||
|
one.language = LanguageChoices[i, 1];
|
||||||
|
string filename = "edustrings."+ LanguageChoices[i, 1] + ".resx";
|
||||||
|
one.filename = filename;
|
||||||
|
TranslationResxFiles.Add(one);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Populate any missing entries.
|
||||||
PopulateFormTranslationItems();
|
PopulateFormTranslationItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -525,6 +540,14 @@ namespace EduNetworkBuilder
|
|||||||
public string Value = "";
|
public string Value = "";
|
||||||
public string Comment = "";
|
public string Comment = "";
|
||||||
public bool translated = false;
|
public bool translated = false;
|
||||||
|
public TranslationItem() { }
|
||||||
|
public TranslationItem(TranslationItem Source)
|
||||||
|
{
|
||||||
|
Key = Source.Key;
|
||||||
|
Value = Source.Value;
|
||||||
|
Comment = Source.Comment;
|
||||||
|
translated = Source.translated;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TranslationResxFile
|
public class TranslationResxFile
|
||||||
@ -534,6 +557,8 @@ namespace EduNetworkBuilder
|
|||||||
public string language = "";
|
public string language = "";
|
||||||
string beginning = "translated: ";
|
string beginning = "translated: ";
|
||||||
|
|
||||||
|
public TranslationResxFile() { }
|
||||||
|
|
||||||
public TranslationResxFile(string File)
|
public TranslationResxFile(string File)
|
||||||
{
|
{
|
||||||
filename = File;
|
filename = File;
|
||||||
|
Loading…
Reference in New Issue
Block a user