Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.WinForms
diff FrmMain.cs @ 80:c243b043aa62
Re #179: Make sure that translations are used throughout UI
* Put names back on menu items
* Add some more translation calls
* Make some extra items translatable
* Update English translation file
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 21 Oct 2009 20:11:18 +0000 |
parents | f1b7a08a8f6f |
children | 0bb9f40d44eb |
line wrap: on
line diff
--- a/FrmMain.cs Sun Oct 11 19:57:13 2009 +0000 +++ b/FrmMain.cs Wed Oct 21 20:11:18 2009 +0000 @@ -87,8 +87,8 @@ private System.Windows.Forms.ContextMenu redoMenu; private IBBoard.Windows.Forms.ColorableStatusBar statusBar; private System.Windows.Forms.Timer statusBarTimer; - private MenuItem miExportArmyAs; - private MenuItem miExportArmyAsBasicHTML; + private IBBoard.Windows.Forms.IBBMenuItem miExportArmyAs; + private IBBoard.Windows.Forms.IBBMenuItem miExportArmyAsBasicHTML; private System.Windows.Forms.Panel pnlRight; /// <summary> @@ -133,21 +133,8 @@ //pnlRight.Top = toolBar.Height + 5; //pnlRight.Height = ClientRectangle.Bottom - statusBar.Height - pnlRight.Top - 3; - foreach (Control ctrl in Controls) - { - ControlTranslator.TranslateControl(ctrl); - } - - foreach(Component comp in components.Components) - { - ControlTranslator.TranslateComponent(comp); - } - - foreach (IBBMenuItem mi in Menu.MenuItems) - { - ControlTranslator.TranslateComponent(mi); - } - + ControlTranslator.TranslateControls(Controls); + ControlTranslator.TranslateComponents(components.Components); ControlTranslator.TranslateComponent(openArmyDialog); ControlTranslator.TranslateComponent(saveArmyDialog); unitWindows = new Dictionary<string, FrmUnit>(); @@ -247,8 +234,8 @@ this.miOpenArmy = new IBBoard.Windows.Forms.IBBMenuItem(); this.miSaveArmy = new IBBoard.Windows.Forms.IBBMenuItem(); this.miSaveArmyAs = new IBBoard.Windows.Forms.IBBMenuItem(); - this.miExportArmyAs = new System.Windows.Forms.MenuItem(); - this.miExportArmyAsBasicHTML = new System.Windows.Forms.MenuItem(); + this.miExportArmyAs = new IBBoard.Windows.Forms.IBBMenuItem(); + this.miExportArmyAsBasicHTML = new IBBoard.Windows.Forms.IBBMenuItem(); this.miCloseArmy = new IBBoard.Windows.Forms.IBBMenuItem(); this.miSep2 = new System.Windows.Forms.MenuItem(); this.miReloadFiles = new IBBoard.Windows.Forms.IBBMenuItem(); @@ -396,18 +383,21 @@ this.miSep3, this.miExit}); this.menuFile.Text = "&file"; + this.menuFile.Name = "menuFile"; // // miNewArmy // this.miNewArmy.Index = 0; this.miNewArmy.Text = "&new army"; this.miNewArmy.Click += new System.EventHandler(this.miNewArmy_Click); + this.miNewArmy.Name = "miNewArmy"; // // miOpenArmy // this.miOpenArmy.Index = 1; this.miOpenArmy.Text = "&open army"; this.miOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click); + this.miOpenArmy.Name = "miOpenArmy"; // // miSaveArmy // @@ -415,6 +405,7 @@ this.miSaveArmy.Index = 2; this.miSaveArmy.Text = "&save army"; this.miSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click); + this.miSaveArmy.Name = "miSaveArmy"; // // miSaveArmyAs // @@ -422,6 +413,7 @@ this.miSaveArmyAs.Index = 3; this.miSaveArmyAs.Text = "save army &as..."; this.miSaveArmyAs.Click += new System.EventHandler(this.miSaveArmyAs_Click); + this.miSaveArmyAs.Name = "miSaveArmyAs"; // // miExportArmyAs // @@ -430,12 +422,14 @@ this.miExportArmyAs.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.miExportArmyAsBasicHTML}); this.miExportArmyAs.Text = "export army as..."; + this.miExportArmyAs.Name = "miExportArmyAs"; // // miExportArmyAsBasicHTML // this.miExportArmyAsBasicHTML.Index = 0; - this.miExportArmyAsBasicHTML.Text = "Basic HTML"; + this.miExportArmyAsBasicHTML.Text = "basic html"; this.miExportArmyAsBasicHTML.Click += new System.EventHandler(this.miExportArmyAsBasicHTML_Click); + this.miExportArmyAsBasicHTML.Name = "miExportArmyAsBasicHTML"; // // miCloseArmy // @@ -443,6 +437,7 @@ this.miCloseArmy.Index = 5; this.miCloseArmy.Text = "&close army"; this.miCloseArmy.Click += new System.EventHandler(this.miCloseArmy_Click); + this.miCloseArmy.Name = "miCloseArmy"; // // miSep2 // @@ -454,6 +449,7 @@ this.miReloadFiles.Index = 7; this.miReloadFiles.Text = "&reload files"; this.miReloadFiles.Click += new System.EventHandler(this.miReloadFiles_Click); + this.miReloadFiles.Name = "miReloadFiles"; // // miSep3 // @@ -465,6 +461,7 @@ this.miExit.Index = 9; this.miExit.Text = "e&xit"; this.miExit.Click += new System.EventHandler(this.miExit_Click); + this.miExit.Name = "miExit"; // // menuEdit // @@ -473,6 +470,7 @@ this.miUndo, this.miRedo}); this.menuEdit.Text = "&edit"; + this.menuEdit.Name = "menuEdit"; // // miUndo // @@ -480,6 +478,7 @@ this.miUndo.Index = 0; this.miUndo.Text = "&undo"; this.miUndo.Click += new System.EventHandler(this.miUndo_Click); + this.miUndo.Name = "miUndo"; // // miRedo // @@ -487,6 +486,7 @@ this.miRedo.Index = 1; this.miRedo.Text = "&redo"; this.miRedo.Click += new System.EventHandler(this.miRedo_Click); + this.miRedo.Name = "miRedo"; // // menuHelp // @@ -494,12 +494,14 @@ this.menuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.miAbout}); this.menuHelp.Text = "&help"; + this.menuHelp.Name = "menuHelp"; // // miAbout // this.miAbout.Enabled = false; this.miAbout.Index = 0; this.miAbout.Text = "&about"; + this.miAbout.Name = "miAbout"; // // saveArmyDialog //