From eca1154d9cd1d0694f8f4a849dd9acec6e79400d Mon Sep 17 00:00:00 2001 From: Dennis Daume Date: Mon, 27 Oct 2014 15:25:15 +0100 Subject: [PATCH 1/3] Extract some of the resources into a .resx file --- Espera.View/Espera.View.csproj | 2 +- Espera.View/Properties/Resources.Designer.cs | 197 ++++++++++++++++++- Espera.View/Properties/Resources.resx | 76 ++++++- Espera.View/Views/ArtistsView.xaml | 3 +- Espera.View/Views/BugReportView.xaml | 21 +- Espera.View/Views/CrashView.xaml | 21 +- 6 files changed, 289 insertions(+), 31 deletions(-) diff --git a/Espera.View/Espera.View.csproj b/Espera.View/Espera.View.csproj index f141779b..d886a6cb 100644 --- a/Espera.View/Espera.View.csproj +++ b/Espera.View/Espera.View.csproj @@ -379,7 +379,7 @@ Resources.resx - ResXFileCodeGenerator + PublicResXFileCodeGenerator Resources.Designer.cs diff --git a/Espera.View/Properties/Resources.Designer.cs b/Espera.View/Properties/Resources.Designer.cs index a554d1e3..cf7d8cb4 100644 --- a/Espera.View/Properties/Resources.Designer.cs +++ b/Espera.View/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18010 +// Runtime Version:4.0.30319.35317 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -22,7 +22,7 @@ namespace Espera.View.Properties { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { + public class Resources { private static global::System.Resources.ResourceManager resourceMan; @@ -36,7 +36,7 @@ internal Resources() { /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { + public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Espera.View.Properties.Resources", typeof(Resources).Assembly); @@ -51,7 +51,7 @@ internal Resources() { /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { + public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } @@ -59,5 +59,194 @@ internal Resources() { resourceCulture = value; } } + + /// + /// Looks up a localized string similar to artists. + /// + public static string ArtistsViewHeader { + get { + return ResourceManager.GetString("ArtistsViewHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cancel. + /// + public static string BugReportViewCancel { + get { + return ResourceManager.GetString("BugReportViewCancel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close. + /// + public static string BugReportViewClose { + get { + return ResourceManager.GetString("BugReportViewClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please enter a detailed description of the bug you encountered.. + /// + public static string BugReportViewDescriptionWaterMark { + get { + return ResourceManager.GetString("BugReportViewDescriptionWaterMark", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Email (optional). + /// + public static string BugReportViewEmail { + get { + return ResourceManager.GetString("BugReportViewEmail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Report a bug. + /// + public static string BugReportViewHeader { + get { + return ResourceManager.GetString("BugReportViewHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You can send a bug report to help improving Espera. + /// + public static string BugReportViewHeader2 { + get { + return ResourceManager.GetString("BugReportViewHeader2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Send. + /// + public static string BugReportViewSend { + get { + return ResourceManager.GetString("BugReportViewSend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sending failed. + /// + public static string BugReportViewSendingFailed { + get { + return ResourceManager.GetString("BugReportViewSendingFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sending succeeded. + /// + public static string BugReportViewSendingSucceeded { + get { + return ResourceManager.GetString("BugReportViewSendingSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bug report. + /// + public static string BugReportViewTitle { + get { + return ResourceManager.GetString("BugReportViewTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cancel. + /// + public static string CrashViewCancel { + get { + return ResourceManager.GetString("CrashViewCancel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close. + /// + public static string CrashViewClose { + get { + return ResourceManager.GetString("CrashViewClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show details. + /// + public static string CrashViewDetailExpanderHeader { + get { + return ResourceManager.GetString("CrashViewDetailExpanderHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sorry, Espera has crashed :(. + /// + public static string CrashViewHeader { + get { + return ResourceManager.GetString("CrashViewHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A crash report has been sent!. + /// + public static string CrashViewHeader2AutomaticSent { + get { + return ResourceManager.GetString("CrashViewHeader2AutomaticSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You can send a crash report to help improving Espera. + /// + public static string CrashViewHeader2NotAutomaticSent { + get { + return ResourceManager.GetString("CrashViewHeader2NotAutomaticSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Send. + /// + public static string CrashViewSend { + get { + return ResourceManager.GetString("CrashViewSend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sending failed. + /// + public static string CrashViewSendingFailed { + get { + return ResourceManager.GetString("CrashViewSendingFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sending succeeded. + /// + public static string CrashViewSendingSucceeded { + get { + return ResourceManager.GetString("CrashViewSendingSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Espera crashed. + /// + public static string CrashViewTitle { + get { + return ResourceManager.GetString("CrashViewTitle", resourceCulture); + } + } } } diff --git a/Espera.View/Properties/Resources.resx b/Espera.View/Properties/Resources.resx index af7dbebb..985c19a8 100644 --- a/Espera.View/Properties/Resources.resx +++ b/Espera.View/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,72 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + artists + + + Cancel + + + Close + + + Please enter a detailed description of the bug you encountered. + + + Email (optional) + + + Report a bug + + + You can send a bug report to help improving Espera + + + Send + + + Sending failed + + + Sending succeeded + + + Bug report + + + Cancel + + + Close + + + Show details + + + Sorry, Espera has crashed :( + + + A crash report has been sent! + + + You can send a crash report to help improving Espera + + + Send + + + Sending failed + + + Sending succeeded + + + Espera crashed + \ No newline at end of file diff --git a/Espera.View/Views/ArtistsView.xaml b/Espera.View/Views/ArtistsView.xaml index 8f6f6bab..9b02cef0 100644 --- a/Espera.View/Views/ArtistsView.xaml +++ b/Espera.View/Views/ArtistsView.xaml @@ -5,6 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:designTime="clr-namespace:Espera.View.DesignTime" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:p="clr-namespace:Espera.View.Properties" d:DataContext="{d:DesignInstance designTime:DesignTimeLocalViewModel, IsDesignTimeCreatable=True}" d:DesignHeight="300" @@ -23,7 +24,7 @@ - + @@ -25,12 +26,12 @@ - - + + + Text="{x:Static p:Resources.BugReportViewEmail}" /> @@ -38,21 +39,21 @@ -