i18n: localize all MessageBox dialogs
The previous batch only covered XAML strings. The runtime MessageBox dialogs (errors, confirmations, info popups) stayed hardcoded in French, breaking immersion for non-FR users. Added ~15 keys to Strings.cs for the MessageBox bodies and titles: - error / launch error / confirm / info / patience / language change / release notes (titles) - launch failed / self-update failed / install failed / uninstall failed / uninstall confirm with version+folder+size / no release notes / fetch failed / clear cache confirm / deactivate license (short and detailed) / language restart (bodies) Some are parametrized (MsgLaunchFailed(detail), MsgUninstallConfirm (version, folder, size)) so the localized strings interpolate the runtime values cleanly across all 5 languages. Replaced every MessageBox.Show in MainViewModel, SettingsViewModel and LicenseDetailsDialog.xaml.cs to use these keys. The "Échec : " prefix in the cache-clear error was dropped — the error message alone is sufficient with Strings.MsgBoxError as the dialog title. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using PSLauncher.Core.Licensing;
|
||||
using PSLauncher.Core.Localization;
|
||||
using PSLauncher.Models;
|
||||
|
||||
namespace PSLauncher.App.Views;
|
||||
@@ -66,10 +67,8 @@ public partial class LicenseDetailsDialog : Window
|
||||
private void OnDeactivate(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var confirm = MessageBox.Show(
|
||||
"Désactiver la license sur cette machine ?\n\n" +
|
||||
"Tu pourras la réactiver plus tard avec ta clé. " +
|
||||
"Les versions déjà installées restent utilisables.",
|
||||
"Confirmer la désactivation",
|
||||
Strings.MsgDeactivateLicenseDetailedConfirm,
|
||||
Strings.MsgBoxConfirm,
|
||||
MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No);
|
||||
if (confirm != MessageBoxResult.Yes) return;
|
||||
_licenseService.Clear();
|
||||
|
||||
Reference in New Issue
Block a user