From 6a4aa4e1386cab8c1a100c1854071e698d5d6e48 Mon Sep 17 00:00:00 2001 From: Carsten Braun Date: Wed, 17 May 2023 10:47:41 +0200 Subject: [PATCH] Localize fan speed labels in the main window --- app/HardwareControl.cs | 4 ++-- app/Properties/Strings.Designer.cs | 9 +++++++++ app/Properties/Strings.de.resx | 5 ++++- app/Properties/Strings.resx | 3 +++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/HardwareControl.cs b/app/HardwareControl.cs index 99d2edd8..742f2f93 100644 --- a/app/HardwareControl.cs +++ b/app/HardwareControl.cs @@ -41,9 +41,9 @@ public static class HardwareControl if (fan > fanMax && fan < 110) SetFanMax(fan); if (Program.config.getConfig("fan_rpm") == 1) - return " Fan: " + (fan * 100).ToString() + "RPM"; + return GHelper.Properties.Strings.FanSpeed + (fan * 100).ToString() + GHelper.Properties.Strings.RPM; else - return " Fan: " + Math.Min(Math.Round((float)fan / fanMax * 100), 100).ToString() + "%"; // relatively to 6000 rpm + return GHelper.Properties.Strings.FanSpeed + Math.Min(Math.Round((float)fan / fanMax * 100), 100).ToString() + "%"; // relatively to 6000 rpm } private static int GetGpuUse() diff --git a/app/Properties/Strings.Designer.cs b/app/Properties/Strings.Designer.cs index 529f5f61..f407ae2a 100644 --- a/app/Properties/Strings.Designer.cs +++ b/app/Properties/Strings.Designer.cs @@ -483,6 +483,15 @@ namespace GHelper.Properties { } } + /// + /// Looks up a localized string similar to Fan: . + /// + internal static string FanSpeed { + get { + return ResourceManager.GetString("FanSpeed", resourceCulture); + } + } + /// /// Looks up a localized string similar to Fans + Power. /// diff --git a/app/Properties/Strings.de.resx b/app/Properties/Strings.de.resx index 48f6e59c..d2afa524 100644 --- a/app/Properties/Strings.de.resx +++ b/app/Properties/Strings.de.resx @@ -199,6 +199,9 @@ Lüfter und Leistung + + Lüfter: + Lüfter + Leistung @@ -263,7 +266,7 @@ Dunkel - Rog Logo + ROG Logo Mittel diff --git a/app/Properties/Strings.resx b/app/Properties/Strings.resx index 08508c58..6c735d5d 100644 --- a/app/Properties/Strings.resx +++ b/app/Properties/Strings.resx @@ -258,6 +258,9 @@ Fans and Power + + Fan: + Fans + Power