mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-12 04:53:48 +00:00
Fixed localization for profiles (#620)
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
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:
1 parent
324ea9eb73
commit
f9a62febcb
5 files changed
+30
-12
No files matched your search
@@ -22,7 +22,7 @@ public record Profile(
|
||||
|
||||
public static readonly Profile NO_PROFILE = new()
|
||||
{
|
||||
Name = TB("Use no profile"),
|
||||
Name = TB("Use no profile"), // Cannot be localized due to being a static readonly field
|
||||
NeedToKnow = string.Empty,
|
||||
Actions = string.Empty,
|
||||
Id = Guid.Empty.ToString(),
|
||||
@@ -39,6 +39,23 @@ public record Profile(
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of this profile. If it is the NO_PROFILE, it returns a localized string.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Why not using the Name property directly? Because the Name property of NO_PROFILE cannot be
|
||||
/// localized because it is a static readonly field. So we need this method to return a localized
|
||||
/// string instead.
|
||||
/// </remarks>
|
||||
/// <returns>The name of this profile.</returns>
|
||||
public string GetSafeName()
|
||||
{
|
||||
if(this == NO_PROFILE)
|
||||
return TB("Use no profile");
|
||||
|
||||
return this.Name;
|
||||
}
|
||||
|
||||
public string ToSystemPrompt()
|
||||
{
|
||||
if(this.Num == uint.MaxValue)
|
||||
|
||||
Reference in new issue
Block a user