From 9a75cc07216d178ed6d4c60a1644744d0ff6ba1a Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 7 Feb 2026 18:10:38 +0100 Subject: [PATCH] Switched to use TB for I18N to fix the namespace --- .../Components/Settings/SettingsPanelProviderBase.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelProviderBase.cs b/app/MindWork AI Studio/Components/Settings/SettingsPanelProviderBase.cs index 3c2f46bb..9503365c 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelProviderBase.cs +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelProviderBase.cs @@ -7,6 +7,8 @@ namespace AIStudio.Components.Settings; public abstract class SettingsPanelProviderBase : SettingsPanelBase { + private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(SettingsPanelProviderBase).Namespace, nameof(SettingsPanelProviderBase)); + /// /// Exports the provider configuration as Lua code, optionally including the encrypted API key if the provider has one /// configured and the user agrees to include it. The exportFunc should generate the Lua code based on the provided @@ -27,10 +29,10 @@ public abstract class SettingsPanelProviderBase : SettingsPanelBase // Ask the user if they want to export the API key: var dialogParameters = new DialogParameters { - { x => x.Message, T("This provider has an API key configured. Do you want to include the encrypted API key in the export? Note: The recipient will need the same encryption secret to use the API key.") }, + { x => x.Message, TB("This provider has an API key configured. Do you want to include the encrypted API key in the export? Note: The recipient will need the same encryption secret to use the API key.") }, }; - var dialogReference = await this.DialogService.ShowAsync(T("Export API Key?"), dialogParameters, DialogOptions.FULLSCREEN); + var dialogReference = await this.DialogService.ShowAsync(TB("Export API Key?"), dialogParameters, DialogOptions.FULLSCREEN); var dialogResult = await dialogReference.Result; if (dialogResult is { Canceled: false }) { @@ -45,7 +47,7 @@ public abstract class SettingsPanelProviderBase : SettingsPanelBase else { // No encryption secret available - inform the user: - this.Snackbar.Add(T("Cannot export the encrypted API key: No enterprise encryption secret is configured."), Severity.Warning); + this.Snackbar.Add(TB("Cannot export the encrypted API key: No enterprise encryption secret is configured."), Severity.Warning); } } }