Browse Source

make ComboBox items of TaskListPad translatable

pull/517/head
Siegfried Pammer 11 years ago
parent
commit
9c76659158
  1. 18
      data/resources/StringResources.resx
  2. 6
      src/Main/Base/Project/Src/Gui/Pads/TaskList/TaskListPadCommands.cs

18
data/resources/StringResources.resx

@ -8219,4 +8219,22 @@ a line break</value> @@ -8219,4 +8219,22 @@ a line break</value>
<data name="MainWindow.Windows.Debug.ExceptionForm.BreakOnHandled" xml:space="preserve">
<value>Break on handled ${ExceptionName}</value>
</data>
<data name="MainWindow.Windows.TaskList.Solution" xml:space="preserve">
<value>Solution</value>
</data>
<data name="MainWindow.Windows.TaskList.Project" xml:space="preserve">
<value>Project</value>
</data>
<data name="MainWindow.Windows.TaskList.AllOpenedFiles" xml:space="preserve">
<value>All opened files</value>
</data>
<data name="MainWindow.Windows.TaskList.CurrentFile" xml:space="preserve">
<value>File</value>
</data>
<data name="MainWindow.Windows.TaskList.Namespace" xml:space="preserve">
<value>Namespace</value>
</data>
<data name="MainWindow.Windows.TaskList.CurrentClass" xml:space="preserve">
<value>Class/Module</value>
</data>
</root>

6
src/Main/Base/Project/Src/Gui/Pads/TaskList/TaskListPadCommands.cs

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
// DEALINGS IN THE SOFTWARE.
using System;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using ICSharpCode.Core;
@ -25,12 +26,11 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -25,12 +26,11 @@ namespace ICSharpCode.SharpDevelop.Gui
{
public class SelectScopeComboBox : ComboBox
{
// TODO Translate!
static readonly string[] viewTypes = new string[] {"Solution", "Project", "All open files", "File", "Namespace", "Class/Module"};
static readonly string[] viewTypes = {"${res:MainWindow.Windows.TaskList.Solution}", "${res:MainWindow.Windows.TaskList.Project}", "${res:MainWindow.Windows.TaskList.AllOpenedFiles}", "${res:MainWindow.Windows.TaskList.CurrentFile}", "${res:MainWindow.Windows.TaskList.Namespace}", "${res:MainWindow.Windows.TaskList.CurrentClass}"};
public SelectScopeComboBox()
{
this.ItemsSource = viewTypes;
this.ItemsSource = viewTypes.Select(s => StringParser.Parse(s));
this.SelectedIndex = 0;
}

Loading…
Cancel
Save