Skip to content

Commit d277c4a

Browse files
committed
Adjust inspection settings view to use localized name instead of description
1 parent 281ea6f commit d277c4a

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

RetailCoder.VBE/Settings/CodeInspectionSettings.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ public class CodeInspectionSetting : IInspectionModel
3131
[XmlIgnore]
3232
public string Description { get; set; } // not serialized because culture-dependent
3333

34+
[XmlIgnore]
35+
public string LocalizedName
36+
{
37+
get
38+
{
39+
return InspectionsUI.ResourceManager.GetString(Name + "Name");
40+
}
41+
} // not serialized because culture-dependent
42+
3443
[XmlIgnore]
3544
public string AnnotationName { get; set; }
3645

@@ -41,7 +50,8 @@ public class CodeInspectionSetting : IInspectionModel
4150
public CodeInspectionSeverity Severity { get; set; }
4251

4352
[XmlIgnore]
44-
public string Meta {
53+
public string Meta
54+
{
4555
get
4656
{
4757
return InspectionsUI.ResourceManager.GetString(Name + "Meta");

RetailCoder.VBE/UI/Settings/InspectionSettings.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@
6767
<DataGridTemplateColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=NameLabelText}"
6868
Width="2.75*"
6969
IsReadOnly="True"
70-
SortMemberPath="{Binding Description}">
70+
SortMemberPath="{Binding LocalizedName}">
7171
<DataGridTemplateColumn.CellTemplate>
7272
<DataTemplate>
73-
<TextBlock Text="{Binding Description}">
73+
<TextBlock Text="{Binding LocalizedName}">
7474
<TextBlock.ToolTip>
7575
<StackPanel>
76-
<TextBlock Text="{Binding Description}"
76+
<TextBlock Text="{Binding LocalizedName}"
7777
FontWeight="SemiBold"
7878
MaxWidth="300"
7979
TextWrapping="WrapWithOverflow" />

0 commit comments

Comments
 (0)