Skip to content

Commit f2cb417

Browse files
committed
i18n check and todo cleanup
1 parent 35c803c commit f2cb417

File tree

7 files changed

+45
-14
lines changed

7 files changed

+45
-14
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System.Collections.Generic;
2+
3+
namespace Rubberduck.UI.Command.MenuItems.ParentMenus
4+
{
5+
public class ToolsParentMenu : ParentMenuItemBase
6+
{
7+
public ToolsParentMenu(IEnumerable<IMenuItem> items)
8+
: base("ToolsMenu", items)
9+
{
10+
}
11+
12+
public override int DisplayOrder
13+
{
14+
get
15+
{
16+
return (int)RubberduckMenuItemDisplayOrder.Tools;
17+
}
18+
}
19+
20+
21+
}
22+
23+
public enum ToolsMenuItemDisplayOrder
24+
{
25+
SourceControl,
26+
ToDoExplorer,
27+
RegexAssistant,
28+
}
29+
}

RetailCoder.VBE/UI/RegexAssistant/RegexAssistantViewModel.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Rubberduck.RegexAssistant;
2+
using System;
23
using System.Collections.Generic;
34
using System.Linq;
45
using System.Windows.Controls;
@@ -72,7 +73,7 @@ private void RecalculateDescription()
7273
{
7374
if (_pattern.Equals(string.Empty))
7475
{
75-
_description = "No Pattern given";
76+
_description = RubberduckUI.RegexAssistant_NoPatternError;
7677
var results = new List<TreeViewItem>();
7778
var rootTreeItem = new TreeViewItem();
7879
rootTreeItem.Header = _description;
@@ -119,13 +120,7 @@ public string DescriptionResults
119120

120121
private static TreeViewItem AsTreeViewItem(IRegularExpression expression)
121122
{
122-
var result = new TreeViewItem();
123-
result.Header = "Some unknown IRegularExpression subtype was in the view";
124-
foreach (var subtree in expression.Subexpressions.Select(exp => AsTreeViewItem((dynamic)exp)))
125-
{
126-
result.Items.Add(subtree);
127-
}
128-
return result;
123+
throw new InvalidOperationException("Some unknown IRegularExpression subtype was in RegexAssistantViewModel");
129124
}
130125

131126
private static TreeViewItem AsTreeViewItem(ErrorExpression expression)

RetailCoder.VBE/UI/RubberduckUI.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

RetailCoder.VBE/UI/RubberduckUI.de.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ Warnung: Alle eigenen Einstellungen gehen dabei verloren. Die Originaldatei wird
453453
<value>Test Explorer</value>
454454
</data>
455455
<data name="TodoExplorer_Caption" xml:space="preserve">
456-
<value>Todo Explorer</value>
456+
<value>ToDo Liste</value>
457457
</data>
458458
<data name="Warning" xml:space="preserve">
459459
<value>Warnung</value>

RetailCoder.VBE/UI/RubberduckUI.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,4 +1754,7 @@ All our stargazers, likers &amp; followers, for the warm fuzzies
17541754
<data name="ToolsMenu" xml:space="preserve">
17551755
<value>T&amp;ools</value>
17561756
</data>
1757+
<data name="RegexAssistant_NoPatternError" xml:space="preserve">
1758+
<value>No Pattern given</value>
1759+
</data>
17571760
</root>

Rubberduck.RegexAssistant/Atom.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public CharacterClass(string specifier)
2626
Match m = Matcher.Match(specifier);
2727
if (!m.Success)
2828
{
29-
// TODO: i18n
3029
throw new ArgumentException("The given specifier does not denote a character class");
3130
}
3231
this._specifier = specifier;
@@ -55,7 +54,6 @@ private IList<string> ExtractCharacterSpecifiers(string characterClass)
5554
{
5655
if (specifier.Value.EndsWith("-\\"))
5756
{
58-
// TODO: i18n
5957
throw new ArgumentException("Character Ranges that have incorrectly escaped characters as target are not allowed");
6058
}
6159
else if (specifier.Value.Length == 1)
@@ -112,7 +110,6 @@ public Group(string specifier) {
112110
Match m = Matcher.Match(specifier);
113111
if (!m.Success)
114112
{
115-
// TODO i18n
116113
throw new ArgumentException("The given specifier does not denote a Group");
117114
}
118115
_subexpression = RegularExpression.Parse(m.Groups["expression"].Value);
@@ -184,7 +181,6 @@ public Literal(string specifier)
184181
Match m = Matcher.Match(specifier);
185182
if (!m.Success)
186183
{
187-
// TODO: i18n
188184
throw new ArgumentException("The given specifier does not denote a Literal");
189185
}
190186
_specifier = specifier;

Rubberduck.RegexAssistant/Quantifier.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ public class Quantifier
1212
public readonly int MinimumMatches;
1313
public readonly int MaximumMatches;
1414

15-
// FIXME i18n ? Shouldn't ever show up actually...
1615
public Quantifier(string expression)
1716
{
1817
if (expression.Length == 0)

0 commit comments

Comments
 (0)