From 670db62534910ffdc116e54fb2231761e838f043 Mon Sep 17 00:00:00 2001 From: Marisa Goergen Date: Thu, 19 Oct 2023 13:18:28 +0200 Subject: [PATCH] Add Title translation to Command Center Currently only the Command Center has to translations. This looks really weird in the module, the moment you choose another language then english --- .../Moryx.CommandCenter.Web.csproj | 15 +++ .../Pages/CommandCenter.cshtml | 3 +- .../Properties/Strings.Designer.cs | 81 +++++++++++ .../Properties/Strings.de.resx | 126 ++++++++++++++++++ .../Properties/Strings.it.resx | 126 ++++++++++++++++++ .../Properties/Strings.resx | 126 ++++++++++++++++++ .../Properties/Strings.zh.resx | 126 ++++++++++++++++++ 7 files changed, 602 insertions(+), 1 deletion(-) create mode 100644 src/Moryx.CommandCenter.Web/Properties/Strings.Designer.cs create mode 100644 src/Moryx.CommandCenter.Web/Properties/Strings.de.resx create mode 100644 src/Moryx.CommandCenter.Web/Properties/Strings.it.resx create mode 100644 src/Moryx.CommandCenter.Web/Properties/Strings.resx create mode 100644 src/Moryx.CommandCenter.Web/Properties/Strings.zh.resx diff --git a/src/Moryx.CommandCenter.Web/Moryx.CommandCenter.Web.csproj b/src/Moryx.CommandCenter.Web/Moryx.CommandCenter.Web.csproj index 2ebb93bb3..14400baae 100644 --- a/src/Moryx.CommandCenter.Web/Moryx.CommandCenter.Web.csproj +++ b/src/Moryx.CommandCenter.Web/Moryx.CommandCenter.Web.csproj @@ -25,5 +25,20 @@ + + + True + True + Strings.resx + + + + + + PublicResXFileCodeGenerator + Strings.Designer.cs + + + diff --git a/src/Moryx.CommandCenter.Web/Pages/CommandCenter.cshtml b/src/Moryx.CommandCenter.Web/Pages/CommandCenter.cshtml index d403e28d6..0a792f220 100644 --- a/src/Moryx.CommandCenter.Web/Pages/CommandCenter.cshtml +++ b/src/Moryx.CommandCenter.Web/Pages/CommandCenter.cshtml @@ -3,6 +3,7 @@ @using Microsoft.AspNetCore.Authorization; @using Moryx.Asp.Integration @using System.ComponentModel.DataAnnotations +@using Moryx.CommandCenter.Web.Properties; @using Moryx.Runtime.Endpoints; @{ @@ -13,7 +14,7 @@ } @attribute [WebModule("CommandCenter", "settings", Category = ModuleCategory.Settings), - Display(Name = "Command Center", Description = "Command Center user interface"), + Display(ResourceType = typeof(Strings), Name = "Module_Title", Description = "Module_Description"), Authorize(Policy = RuntimePermissions.DatabaseCanView), AllowAnonymous] diff --git a/src/Moryx.CommandCenter.Web/Properties/Strings.Designer.cs b/src/Moryx.CommandCenter.Web/Properties/Strings.Designer.cs new file mode 100644 index 000000000..29395b3ff --- /dev/null +++ b/src/Moryx.CommandCenter.Web/Properties/Strings.Designer.cs @@ -0,0 +1,81 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace Moryx.CommandCenter.Web.Properties { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Moryx.CommandCenter.Web.Properties.Strings", typeof(Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Administrator view for configuring the application ähnelt. + /// + public static string Module_Description { + get { + return ResourceManager.GetString("Module_Description", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Command Center ähnelt. + /// + public static string Module_Title { + get { + return ResourceManager.GetString("Module_Title", resourceCulture); + } + } + } +} diff --git a/src/Moryx.CommandCenter.Web/Properties/Strings.de.resx b/src/Moryx.CommandCenter.Web/Properties/Strings.de.resx new file mode 100644 index 000000000..57dc627e1 --- /dev/null +++ b/src/Moryx.CommandCenter.Web/Properties/Strings.de.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Administrator Oberfläche zur Konfiguration der Anwendung + + + Kommandozentrale + + \ No newline at end of file diff --git a/src/Moryx.CommandCenter.Web/Properties/Strings.it.resx b/src/Moryx.CommandCenter.Web/Properties/Strings.it.resx new file mode 100644 index 000000000..18540c422 --- /dev/null +++ b/src/Moryx.CommandCenter.Web/Properties/Strings.it.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Interfaccia amministratore per la configurazione dell'applicazione + + + Centro di comando + + \ No newline at end of file diff --git a/src/Moryx.CommandCenter.Web/Properties/Strings.resx b/src/Moryx.CommandCenter.Web/Properties/Strings.resx new file mode 100644 index 000000000..faaa7710e --- /dev/null +++ b/src/Moryx.CommandCenter.Web/Properties/Strings.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Administrator view for configuring the application + + + Command Center + + \ No newline at end of file diff --git a/src/Moryx.CommandCenter.Web/Properties/Strings.zh.resx b/src/Moryx.CommandCenter.Web/Properties/Strings.zh.resx new file mode 100644 index 000000000..c081f4889 --- /dev/null +++ b/src/Moryx.CommandCenter.Web/Properties/Strings.zh.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 控制中心 + + + 控制中心 + + \ No newline at end of file