Improved the I18N & the German translation (#552)
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-09-03 22:14:31 +02:00
1 parent 6a37ce6d25
commit d966929dca
7 files changed
+154 -42

No files matched your search

+1 -27
View File
@@ -1,5 +1,3 @@
using System.Text;
namespace AIStudio.Tools;
public sealed class Process<T> where T : struct, Enum
@@ -20,7 +18,7 @@ public sealed class Process<T> where T : struct, Enum
{
var value = values[i];
var stepValue = Convert.ToInt32(value);
var stepName = DeriveName(value);
var stepName = ProcessStepTextRouter.GetText(value);
this.labels[i] = stepName;
this.stepsData[value] = new ProcessStepValue(stepValue, stepName);
@@ -33,30 +31,6 @@ public sealed class Process<T> where T : struct, Enum
}
}
private static string DeriveName(T value)
{
var text = value.ToString();
if (!text.Contains('_'))
{
text = text.ToLowerInvariant();
text = char.ToUpperInvariant(text[0]) + text[1..];
}
else
{
var parts = text.Split('_');
var sb = new StringBuilder();
foreach (var part in parts)
{
sb.Append(char.ToUpperInvariant(part[0]));
sb.Append(part[1..].ToLowerInvariant());
}
text = sb.ToString();
}
return text;
}
public string[] Labels => this.labels;
public int Min => this.min;