# HG changeset patch # User IBBoard # Date 1267995138 0 # Node ID d052bc59cb220a40ee947b68f0ad01ace344fb37 # Parent fa95b81901f5a460e293e996a88b6566c64ecfe2 Fixes #27: Create translatable menu items for new menus * Create translatable menu items for warfoundry:#258 * Add sub-item translation handling to ControlTranslator diff -r fa95b81901f5 -r d052bc59cb22 IBBoard.Windows.Forms.csproj --- a/IBBoard.Windows.Forms.csproj Thu Dec 24 20:28:07 2009 +0000 +++ b/IBBoard.Windows.Forms.csproj Sun Mar 07 20:52:18 2010 +0000 @@ -98,6 +98,9 @@ Component + + Component + Code diff -r fa95b81901f5 -r d052bc59cb22 Windows/Forms/I18N/ControlTranslator.cs --- a/Windows/Forms/I18N/ControlTranslator.cs Thu Dec 24 20:28:07 2009 +0000 +++ b/Windows/Forms/I18N/ControlTranslator.cs Sun Mar 07 20:52:18 2010 +0000 @@ -69,6 +69,13 @@ TranslateComponent(bttn, true, replacements); } } + else if (ctrl is ToolStrip) + { + foreach (ToolStripItem item in ((ToolStrip)ctrl).Items) + { + TranslateComponent(item, true, replacements); + } + } else { foreach (Control subctr in ctrl.Controls) @@ -116,6 +123,13 @@ TranslateComponent(mi, true, replacements); } } + else if (comp is ToolStripDropDownItem) + { + foreach (ToolStripItem item in ((ToolStripDropDownItem)comp).DropDownItems) + { + TranslateComponent(item, true, replacements); + } + } } } } \ No newline at end of file diff -r fa95b81901f5 -r d052bc59cb22 Windows/Forms/IBBToolStripMenuItem.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Windows/Forms/IBBToolStripMenuItem.cs Sun Mar 07 20:52:18 2010 +0000 @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using IBBoard.Lang; + +namespace IBBoard.Windows.Forms +{ + public partial class IBBToolStripMenuItem : ToolStripMenuItem, ITranslatable + { + //Marker interface for translation + } +}