fixed translation bug with interpolated localized strings

This commit is contained in:
Nils Kruthoff 2026-07-07 15:47:23 +02:00
parent 6ed4b28ecd
commit 00d732678c
No known key found for this signature in database
GPG Key ID: A5C0151B4DDB172C
3 changed files with 5 additions and 5 deletions

View File

@ -118,7 +118,7 @@ else
else if (this.PluginCheckCompleted) else if (this.PluginCheckCompleted)
{ {
<MudAlert Severity="Severity.Info" Dense="@true" Icon="@Icons.Material.Filled.CheckCircle"> <MudAlert Severity="Severity.Info" Dense="@true" Icon="@Icons.Material.Filled.CheckCircle">
@string.Format(T("The generated assistant \"{0}\" is valid and runnable."), this.pluginCheckResult?.PluginName ?? T("Unknown assistant")) @string.Format(T("The generated assistant '{0}' is valid and runnable."), this.pluginCheckResult?.PluginName ?? T("Unknown assistant"))
</MudAlert> </MudAlert>
} }
else else
@ -151,8 +151,8 @@ else
{ {
<MudAlert Severity="Severity.Info" Dense="@true" Icon="@Icons.Material.Filled.Extension"> <MudAlert Severity="Severity.Info" Dense="@true" Icon="@Icons.Material.Filled.Extension">
@(this.pluginInstallResult?.ReplacedExisting is true @(this.pluginInstallResult?.ReplacedExisting is true
? string.Format(T("The assistant \"{0}\" was updated."), this.pluginInstallResult?.PluginName ?? T("Unknown assistant")) ? string.Format(T("The assistant '{0}' was updated."), this.pluginInstallResult?.PluginName ?? T("Unknown assistant"))
: string.Format(T("The assistant \"{0}\" was installed."), this.pluginInstallResult?.PluginName ?? T("Unknown assistant"))) : string.Format(T("The assistant '{0}' was installed."), this.pluginInstallResult?.PluginName ?? T("Unknown assistant")))
</MudAlert> </MudAlert>
} }
else else

View File

@ -824,7 +824,7 @@ public partial class AssistantBuilder : AssistantBaseCore<NoSettingsPanel>
{ {
x => x.Message, x => x.Message,
string.Format( string.Format(
T("The assistant \"{0}\" was checked with the level \"{1}\", which is below your required level \"{2}\". Your settings allow activation anyway, but this may be unsafe. Do you want to enable this assistant?"), T("The assistant '{0}' was checked with the level '{1}', which is below your required level '{2}'. Your settings allow activation anyway, but this may be unsafe. Do you want to enable this assistant?"),
this.pluginInstallResult?.PluginName ?? T("Unknown assistant"), this.pluginInstallResult?.PluginName ?? T("Unknown assistant"),
this.pluginAudit?.Level.GetName() ?? T("Unknown"), this.pluginAudit?.Level.GetName() ?? T("Unknown"),
this.SettingsManager.ConfigurationData.AssistantPluginAudit.MinimumLevel.GetName()) this.SettingsManager.ConfigurationData.AssistantPluginAudit.MinimumLevel.GetName())

View File

@ -140,7 +140,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase
{ {
x => x.Message, x => x.Message,
string.Format( string.Format(
T("The assistant plugin \"{0}\" was audited with the level \"{1}\", which is below the required safety level \"{2}\". Your current settings still allow activation, but this may be unsafe. Do you really want to enable this plugin?"), T("The assistant plugin '{0}' was audited with the level '{1}', which is below the required safety level '{2}'. Your current settings still allow activation, but this may be unsafe. Do you really want to enable this plugin?"),
this.plugin?.Name ?? T("Unknown plugin"), this.plugin?.Name ?? T("Unknown plugin"),
this.audit?.Level.GetName() ?? T("Unknown"), this.audit?.Level.GetName() ?? T("Unknown"),
this.MinimumLevelLabel) this.MinimumLevelLabel)