From 5f0259647932bc5d4293d6ca42ffb251fc772c79 Mon Sep 17 00:00:00 2001
From: Serge <5920850+seerge@users.noreply.github.com>
Date: Wed, 13 Mar 2024 11:56:32 +0100
Subject: [PATCH] Localisations
---
app/Extra.cs | 1 +
app/Fans.cs | 1 +
app/GHelper.csproj | 2 +-
app/Input/InputDispatcher.cs | 10 +--
app/Properties/Strings.Designer.cs | 108 +++++++++++++++++++++++++++++
app/Properties/Strings.resx | 36 ++++++++++
6 files changed, 152 insertions(+), 6 deletions(-)
diff --git a/app/Extra.cs b/app/Extra.cs
index 9a5a422e..6fee7682 100644
--- a/app/Extra.cs
+++ b/app/Extra.cs
@@ -146,6 +146,7 @@ namespace GHelper
labelBacklightLogo.Text = Properties.Strings.Logo;
checkGpuApps.Text = Properties.Strings.KillGpuApps;
+ checkBWIcon.Text = Properties.Strings.BWTrayIcon;
labelHibernateAfter.Text = Properties.Strings.HibernateAfter;
labelAPUMem.Text = Properties.Strings.APUMemory;
diff --git a/app/Fans.cs b/app/Fans.cs
index f41fa155..85038f16 100644
--- a/app/Fans.cs
+++ b/app/Fans.cs
@@ -60,6 +60,7 @@ namespace GHelper
labelGPUMemoryTitle.Text = Properties.Strings.GPUMemoryClockOffset;
labelGPUBoostTitle.Text = Properties.Strings.GPUBoost;
labelGPUTempTitle.Text = Properties.Strings.GPUTempTarget;
+ labelGPUPowerTitle.Text = Properties.Strings.GPUPower;
labelRisky.Text = Properties.Strings.UndervoltingRisky;
buttonApplyAdvanced.Text = Properties.Strings.Apply;
diff --git a/app/GHelper.csproj b/app/GHelper.csproj
index be12ec6d..03f6d21c 100644
--- a/app/GHelper.csproj
+++ b/app/GHelper.csproj
@@ -15,7 +15,7 @@
AnyCPU
False
True
- 0.159
+ 0.160
diff --git a/app/Input/InputDispatcher.cs b/app/Input/InputDispatcher.cs
index 6bf0b55f..1426d72a 100644
--- a/app/Input/InputDispatcher.cs
+++ b/app/Input/InputDispatcher.cs
@@ -509,7 +509,7 @@ namespace GHelper.Input
break;
case "micmute":
bool muteStatus = Audio.ToggleMute();
- Program.toast.RunToast(muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
+ Program.toast.RunToast(muteStatus ? Properties.Strings.Muted : Properties.Strings.Unmuted, muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed");
break;
case "brightness_up":
@@ -551,7 +551,7 @@ namespace GHelper.Input
{
if (hotkey || !AppConfig.IsHardwareTouchpadToggle()) ToggleTouchpad();
Thread.Sleep(200);
- Program.toast.RunToast(GetTouchpadState() ? "On" : "Off", ToastIcon.Touchpad);
+ Program.toast.RunToast(GetTouchpadState() ? Properties.Strings.On : Properties.Strings.Off, ToastIcon.Touchpad);
}
static void ToggleTouchpad()
@@ -570,7 +570,7 @@ namespace GHelper.Input
AppConfig.Set("arrow_lock", arLock);
Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys);
- Program.toast.RunToast("Arrow-Lock " + (arLock == 1 ? "On" : "Off"), ToastIcon.FnLock);
+ Program.toast.RunToast("Arrow-Lock " + (arLock == 1 ? Properties.Strings.On : Properties.Strings.Off), ToastIcon.FnLock);
}
public static void ToggleFnLock()
@@ -585,7 +585,7 @@ namespace GHelper.Input
Program.settingsForm.BeginInvoke(Program.settingsForm.VisualiseFnLock);
- Program.toast.RunToast("Fn-Lock " + (fnLock == 1 ? "On" : "Off"), ToastIcon.FnLock);
+ Program.toast.RunToast(fnLock == 1 ? Properties.Strings.FnLockOn : Properties.Strings.FnLockOff, ToastIcon.FnLock);
}
public static void TabletMode()
@@ -801,7 +801,7 @@ namespace GHelper.Input
if (!OptimizationService.IsOSDRunning())
{
- string[] backlightNames = new string[] { "Off", "Low", "Mid", "Max" };
+ string[] backlightNames = new string[] { Properties.Strings.BacklightOff, Properties.Strings.BacklightLow, Properties.Strings.BacklightMid, Properties.Strings.BacklightMax };
Program.toast.RunToast(backlightNames[backlight], delta > 0 ? ToastIcon.BacklightUp : ToastIcon.BacklightDown);
}
diff --git a/app/Properties/Strings.Designer.cs b/app/Properties/Strings.Designer.cs
index bf341014..1bda9d4e 100644
--- a/app/Properties/Strings.Designer.cs
+++ b/app/Properties/Strings.Designer.cs
@@ -456,6 +456,42 @@ namespace GHelper.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Low.
+ ///
+ internal static string BacklightLow {
+ get {
+ return ResourceManager.GetString("BacklightLow", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Max.
+ ///
+ internal static string BacklightMax {
+ get {
+ return ResourceManager.GetString("BacklightMax", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Mid.
+ ///
+ internal static string BacklightMid {
+ get {
+ return ResourceManager.GetString("BacklightMid", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Off.
+ ///
+ internal static string BacklightOff {
+ get {
+ return ResourceManager.GetString("BacklightOff", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Timeout plugged / on battery (0 - ON).
///
@@ -609,6 +645,15 @@ namespace GHelper.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Black and white tray icon.
+ ///
+ internal static string BWTrayIcon {
+ get {
+ return ResourceManager.GetString("BWTrayIcon", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Calibrate.
///
@@ -935,6 +980,24 @@ namespace GHelper.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to FN-Lock Off.
+ ///
+ internal static string FnLockOff {
+ get {
+ return ResourceManager.GetString("FnLockOff", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to FN-Lock On.
+ ///
+ internal static string FnLockOn {
+ get {
+ return ResourceManager.GetString("FnLockOn", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Dynamic Boost.
///
@@ -1007,6 +1070,15 @@ namespace GHelper.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to GPU Power.
+ ///
+ internal static string GPUPower {
+ get {
+ return ResourceManager.GetString("GPUPower", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to GPU Settings.
///
@@ -1385,6 +1457,15 @@ namespace GHelper.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Muted.
+ ///
+ internal static string Muted {
+ get {
+ return ResourceManager.GetString("Muted", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Mute Mic.
///
@@ -1430,6 +1511,24 @@ namespace GHelper.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Off.
+ ///
+ internal static string Off {
+ get {
+ return ResourceManager.GetString("Off", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to On.
+ ///
+ internal static string On {
+ get {
+ return ResourceManager.GetString("On", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to One Zone.
///
@@ -1862,6 +1961,15 @@ namespace GHelper.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Unmuted.
+ ///
+ internal static string Unmuted {
+ get {
+ return ResourceManager.GetString("Unmuted", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Updates.
///
diff --git a/app/Properties/Strings.resx b/app/Properties/Strings.resx
index e4cf0a16..86c71148 100644
--- a/app/Properties/Strings.resx
+++ b/app/Properties/Strings.resx
@@ -249,6 +249,18 @@
Awake
+
+ Low
+
+
+ Max
+
+
+ Mid
+
+
+ Off
+
Timeout plugged / on battery (0 - ON)
@@ -300,6 +312,9 @@
Brightness Up
+
+ Black and white tray icon
+
Calibrate
@@ -410,6 +425,12 @@ Do you still want to continue?
Process Fn+F hotkeys without Fn
+
+ FN-Lock Off
+
+
+ FN-Lock On
+
Dynamic Boost
@@ -434,6 +455,9 @@ Do you still want to continue?
dGPU exclusive
+
+ GPU Power
+
GPU Settings
@@ -560,6 +584,9 @@ Do you still want to continue?
Multi Zone Strong
+
+ Muted
+
Mute Mic
@@ -575,6 +602,12 @@ Do you still want to continue?
Not Connected
+
+ Off
+
+
+ On
+
One Zone
@@ -719,6 +752,9 @@ Do you still want to continue?
Undervolting is an experimental and risky feature. If applied values are too low for your hardware, it can become unstable, shut down or cause data corruption. If you want to try - start from small values first, click Apply and test what works for you.
+
+ Unmuted
+
Updates