Final touches on translation window.
This commit is contained in:
parent
240671304c
commit
22996529f5
@ -862,7 +862,7 @@
|
||||
<comment>NB_NBEn = English</comment>
|
||||
</data>
|
||||
<data name="NB_NBFr" xml:space="preserve">
|
||||
<value>français</value>
|
||||
<value>Français</value>
|
||||
<comment>NB_NBFr = French</comment>
|
||||
</data>
|
||||
<data name="NB_RdCtxtHelp" xml:space="preserve">
|
||||
@ -1866,7 +1866,7 @@
|
||||
<comment>PPF_UserDirectory</comment>
|
||||
</data>
|
||||
<data name="_Save" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
<value>Enregistrer</value>
|
||||
<comment>_Save = Save</comment>
|
||||
</data>
|
||||
<data name="PC_HWFileImportStats" xml:space="preserve">
|
||||
@ -1961,4 +1961,8 @@
|
||||
<value>Network</value>
|
||||
<comment>RPC_Network = Network</comment>
|
||||
</data>
|
||||
<data name="TW_Translate" xml:space="preserve">
|
||||
<value>Translate</value>
|
||||
<comment>TW_Translate = Translate</comment>
|
||||
</data>
|
||||
</root>
|
@ -1961,4 +1961,8 @@
|
||||
<value>Network</value>
|
||||
<comment>RPC_Network = Network</comment>
|
||||
</data>
|
||||
<data name="TW_Translate" xml:space="preserve">
|
||||
<value>Translate</value>
|
||||
<comment>TW_Translate = Translate</comment>
|
||||
</data>
|
||||
</root>
|
@ -14,6 +14,8 @@ namespace EduNetworkBuilder
|
||||
public partial class TranslationWindow : Form
|
||||
{
|
||||
Network myNet = null;
|
||||
string[,] LanguageChoices = { { NB.Translate("NB_NBEn"), "en" }, { NB.Translate("NB_NBFr"), "fr" } };
|
||||
|
||||
public TranslationWindow(Network ToEdit)
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -25,7 +27,6 @@ namespace EduNetworkBuilder
|
||||
|
||||
void LocalSetup()
|
||||
{
|
||||
string[,] LanguageChoices = NB.LanguageChoices;
|
||||
cb1Language.Items.Clear();
|
||||
cb2Language.Items.Clear();
|
||||
NBSettings mySettings = NB.GetSettings();
|
||||
@ -46,11 +47,18 @@ namespace EduNetworkBuilder
|
||||
if (cb2Language.SelectedIndex == -1) cb2Language.SelectedIndex = 0;
|
||||
Icon = Properties.Resources.NBIco;
|
||||
lblStatus.Text = "";
|
||||
LanguagifyComponents();
|
||||
}
|
||||
|
||||
private void LanguagifyComponents()
|
||||
{
|
||||
Text = NB.Translate("Translate");
|
||||
btnSave.Text = NB.Translate("_Save");
|
||||
btnClose.Text = NB.Translate("_Done");
|
||||
}
|
||||
|
||||
private void ClosingStuff()
|
||||
{
|
||||
string[,] LanguageChoices = NB.LanguageChoices;
|
||||
NBSettings mySettings = NB.GetSettings();
|
||||
for (int i = 0; i < LanguageChoices.GetLength(0); i++)
|
||||
{
|
||||
@ -68,7 +76,6 @@ namespace EduNetworkBuilder
|
||||
|
||||
string CodeFromLang(string language)
|
||||
{
|
||||
string[,] LanguageChoices = NB.LanguageChoices;
|
||||
for (int i = 0; i < LanguageChoices.GetLength(0); i++)
|
||||
{
|
||||
if (language == LanguageChoices[i, 0]) return LanguageChoices[i, 1];
|
||||
@ -78,13 +85,13 @@ namespace EduNetworkBuilder
|
||||
|
||||
string LangFromCode(string Code)
|
||||
{
|
||||
string[,] LanguageChoices = NB.LanguageChoices;
|
||||
for (int i = 0; i < LanguageChoices.GetLength(0); i++)
|
||||
{
|
||||
if (Code == LanguageChoices[i, 1]) return LanguageChoices[i, 0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
|
Loading…
Reference in New Issue
Block a user