i18n: full pass + culture-aware dates/sizes + Software Update License wording
- Strings.cs : ~80 new keys covering status messages, progress detail (DL/extraction/verify), license summary, license details dialog, onboarding statuses, settings field labels, restart/cancel/quit confirmations, toasts, resume choice, copyright. Strings.FormatSize and Strings.FormatDate / FormatLongDate switch units (o/Ko vs B/KB) and pattern (dd/MM/yyyy vs M/d/yyyy vs 2026年) by active language. - License terminology renamed across UI: "License" → "License de mise à jour" / "Software Update License" to clarify it gates UPDATES, not Proserve itself. Expired/revoked dialogs now spell out "you can still download versions released before this date and launch any installed version". - "🔒 License insuffisante" → "🔒 License de mise à jour requise pour cette version" / "Valid update license needed for this version" so users understand it's a per-version eligibility check, not a global block. - All hardcoded FR strings in views (SettingsDialog labels, LicenseDetails fields, Onboarding statuses, dialog titles, copyright, window chrome tooltips, "Sortie le", etc.) replaced with x:Static loc bindings. - All FormatSize duplicates (5 places) and date format strings (8 places) delegate to Strings helpers — single source of truth for localization. - Settings dialog: License section moved to the top before Language. It's the most important info and conditions what the user can download. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,11 +29,11 @@ public partial class LicenseDetailsDialog : Window
|
||||
|
||||
OwnerText.Text = license.OwnerName ?? "—";
|
||||
UntilText.Text = license.DownloadEntitlementUntil is { } until
|
||||
? $"jusqu'au {until.ToLocalTime():dddd dd MMMM yyyy}"
|
||||
? Strings.FormatLongDate(until)
|
||||
: "—";
|
||||
IssuedText.Text = license.IssuedAt is { } issued
|
||||
? issued.ToLocalTime().ToString("dd/MM/yyyy")
|
||||
: (license.ServerTime?.ToLocalTime().ToString("dd/MM/yyyy") ?? "—");
|
||||
? Strings.FormatDate(issued)
|
||||
: Strings.FormatDate(license.ServerTime);
|
||||
MachineIdText.Text = licenseService.GetMachineId();
|
||||
}
|
||||
|
||||
@@ -43,19 +43,19 @@ public partial class LicenseDetailsDialog : Window
|
||||
if (l.Status == "valid")
|
||||
{
|
||||
if (until is { } u && (u - DateTime.UtcNow).TotalDays < 30)
|
||||
return ("⏰", "License valide", $"Expire bientôt — le {u.ToLocalTime():dd/MM/yyyy}",
|
||||
return ("⏰", Strings.LicenseDetailsValidTitle, Strings.LicenseDetailsExpiringSoon(Strings.FormatDate(u)),
|
||||
Color.FromRgb(0xF5, 0x9E, 0x0B), Color.FromRgb(0x3A, 0x2A, 0x0E));
|
||||
return ("✓", "License valide", "Téléchargements de nouvelles versions autorisés",
|
||||
return ("✓", Strings.LicenseDetailsValidTitle, Strings.LicenseDetailsValidSubtitle,
|
||||
Color.FromRgb(0x16, 0xA3, 0x4A), Color.FromRgb(0x0E, 0x2A, 0x1B));
|
||||
}
|
||||
if (l.Status == "expired")
|
||||
return ("⚠", "License expirée",
|
||||
until is { } u ? $"Expirée le {u.ToLocalTime():dd/MM/yyyy}" : "Plus de téléchargements possibles",
|
||||
return ("⚠", Strings.LicenseDetailsExpiredTitle,
|
||||
until is { } u ? Strings.LicenseDetailsExpiredSubtitle(Strings.FormatDate(u)) : Strings.LicenseDetailsExpiredFallback,
|
||||
Color.FromRgb(0xEF, 0x44, 0x44), Color.FromRgb(0x2A, 0x14, 0x14));
|
||||
if (l.Status == "revoked")
|
||||
return ("🚫", "License révoquée", "Contacte ASTERION pour plus d'informations",
|
||||
return ("🚫", Strings.LicenseDetailsRevokedTitle, Strings.LicenseDetailsRevokedSubtitle,
|
||||
Color.FromRgb(0xEF, 0x44, 0x44), Color.FromRgb(0x2A, 0x14, 0x14));
|
||||
return ("❓", "License inconnue", l.Message ?? l.Status,
|
||||
return ("❓", Strings.LicenseDetailsUnknownTitle, l.Message ?? l.Status,
|
||||
Color.FromRgb(0xEF, 0x44, 0x44), Color.FromRgb(0x2A, 0x14, 0x14));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user