Skip to content

Commit

Permalink
Convert user-facing string pull from resource file.
Browse files Browse the repository at this point in the history
  • Loading branch information
IvenBach committed Nov 16, 2017
1 parent a60d2b6 commit b0cead9
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 8 deletions.
4 changes: 2 additions & 2 deletions RetailCoder.VBE/UI/About/AboutControl.xaml
Expand Up @@ -7,7 +7,7 @@
mc:Ignorable="d"
d:DesignWidth="499"
d:DataContext="{d:DesignInstance {x:Type about:AboutControlViewModel}, IsDesignTimeCreatable=False}"
KeyDown="OnKeyDownHandler" >
KeyDown="OnKeyDownHandler">
<UserControl.Resources>
<BitmapImage x:Key="Ducky" UriSource="../../Resources/AboutBanner.png" />
<BitmapImage x:Key="RD" UriSource="../../Resources/Rubberduck.png" />
Expand All @@ -34,7 +34,7 @@
Foreground="Gray"
FontSize="8"
HorizontalAlignment="Center"
Content="Click here to copy version info to clipboard."/>
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=AboutWindow_CopyVersionLabel}"/>
</StackPanel>
</Border>

Expand Down
2 changes: 1 addition & 1 deletion RetailCoder.VBE/UI/About/AboutControl.xaml.cs
Expand Up @@ -40,7 +40,7 @@ private void CopyVersionInfoToClipboard()
sb.AppendFormat($"Host Executable: {Path.GetFileName(Application.ExecutablePath).ToUpper()}"); // .ToUpper() used to convert ExceL.EXE -> EXCEL.EXE

Clipboard.SetText(sb.ToString());
System.Windows.MessageBox.Show("Version information copied to clipboard.", "Copy successfull");
System.Windows.MessageBox.Show(RubberduckUI.AboutWindow_CopyVersionMessage, RubberduckUI.AboutWindow_CopyVersionCaption);
}
}
}
31 changes: 29 additions & 2 deletions RetailCoder.VBE/UI/RubberduckUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions RetailCoder.VBE/UI/RubberduckUI.resx
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -59,7 +59,7 @@
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
Expand Down Expand Up @@ -2122,4 +2122,13 @@ Would you like to import them to Rubberduck?</value>
<data name="ToDoExplorer_CopyToolTip" xml:space="preserve">
<value>Copy to clipboard</value>
</data>
</root>
<data name="AboutWindow_CopyVersionCaption" xml:space="preserve">
<value>Copy successful</value>
</data>
<data name="AboutWindow_CopyVersionLabel" xml:space="preserve">
<value>Click here to copy version info to clipboard.</value>
</data>
<data name="AboutWindow_CopyVersionMessage" xml:space="preserve">
<value>Version information copied to clipboard.</value>
</data>
</root>

0 comments on commit b0cead9

Please sign in to comment.