Skip to content

Commit b0cead9

Browse files
committed
Convert user-facing string pull from resource file.
1 parent a60d2b6 commit b0cead9

File tree

4 files changed

+44
-8
lines changed

4 files changed

+44
-8
lines changed

RetailCoder.VBE/UI/About/AboutControl.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
mc:Ignorable="d"
88
d:DesignWidth="499"
99
d:DataContext="{d:DesignInstance {x:Type about:AboutControlViewModel}, IsDesignTimeCreatable=False}"
10-
KeyDown="OnKeyDownHandler" >
10+
KeyDown="OnKeyDownHandler">
1111
<UserControl.Resources>
1212
<BitmapImage x:Key="Ducky" UriSource="../../Resources/AboutBanner.png" />
1313
<BitmapImage x:Key="RD" UriSource="../../Resources/Rubberduck.png" />
@@ -34,7 +34,7 @@
3434
Foreground="Gray"
3535
FontSize="8"
3636
HorizontalAlignment="Center"
37-
Content="Click here to copy version info to clipboard."/>
37+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=AboutWindow_CopyVersionLabel}"/>
3838
</StackPanel>
3939
</Border>
4040

RetailCoder.VBE/UI/About/AboutControl.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private void CopyVersionInfoToClipboard()
4040
sb.AppendFormat($"Host Executable: {Path.GetFileName(Application.ExecutablePath).ToUpper()}"); // .ToUpper() used to convert ExceL.EXE -> EXCEL.EXE
4141

4242
Clipboard.SetText(sb.ToString());
43-
System.Windows.MessageBox.Show("Version information copied to clipboard.", "Copy successfull");
43+
System.Windows.MessageBox.Show(RubberduckUI.AboutWindow_CopyVersionMessage, RubberduckUI.AboutWindow_CopyVersionCaption);
4444
}
4545
}
4646
}

RetailCoder.VBE/UI/RubberduckUI.Designer.cs

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

RetailCoder.VBE/UI/RubberduckUI.resx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema
@@ -59,7 +59,7 @@
5959
: using a System.ComponentModel.TypeConverter
6060
: and then encoded with base64 encoding.
6161
-->
62-
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
62+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
6363
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
6464
<xsd:element name="root" msdata:IsDataSet="true">
6565
<xsd:complexType>
@@ -2122,4 +2122,13 @@ Would you like to import them to Rubberduck?</value>
21222122
<data name="ToDoExplorer_CopyToolTip" xml:space="preserve">
21232123
<value>Copy to clipboard</value>
21242124
</data>
2125-
</root>
2125+
<data name="AboutWindow_CopyVersionCaption" xml:space="preserve">
2126+
<value>Copy successful</value>
2127+
</data>
2128+
<data name="AboutWindow_CopyVersionLabel" xml:space="preserve">
2129+
<value>Click here to copy version info to clipboard.</value>
2130+
</data>
2131+
<data name="AboutWindow_CopyVersionMessage" xml:space="preserve">
2132+
<value>Version information copied to clipboard.</value>
2133+
</data>
2134+
</root>

0 commit comments

Comments
 (0)