From 182e5d8d8d83fdf7562221712e7445ea07e501f2 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Fri, 4 Jul 2025 06:37:27 +0200 Subject: [PATCH] Localize security settings, footer, email (#820) --- .../Settings/PasswordSettingsPopup.razor | 30 +++-- .../Main/Layout/Footer.razor | 18 ++- .../Main/Pages/Emails/Home.razor | 32 ++--- .../Settings/ImportExport/ImportExport.razor | 36 +++--- .../Components/ActiveSessionsSection.razor | 27 +++-- .../Components/DeleteAccountSection.razor | 11 +- .../Components/PasswordChangeSection.razor | 11 +- .../Components/QuickVaultUnlockSection.razor | 28 +++-- .../Components/RecentAuthLogsSection.razor | 24 ++-- .../Components/ShowRecoveryCodes.razor | 18 +-- .../TwoFactorAuthenticationSection.razor | 15 ++- .../Pages/Settings/Security/Security.razor | 6 +- .../Settings/PasswordSettingsPopup.en.resx | 109 ++++++++++++++++++ .../Settings/PasswordSettingsPopup.nl.resx | 109 ++++++++++++++++++ .../Security/ActiveSessionsSection.en.resx | 105 +++++++++++++++++ .../Security/ActiveSessionsSection.nl.resx | 105 +++++++++++++++++ .../Security/DeleteAccountSection.en.resx | 73 ++++++++++++ .../Security/DeleteAccountSection.nl.resx | 73 ++++++++++++ .../Security/PasswordChangeSection.en.resx | 73 ++++++++++++ .../Security/PasswordChangeSection.nl.resx | 73 ++++++++++++ .../Security/QuickVaultUnlockSection.en.resx | 101 ++++++++++++++++ .../Security/QuickVaultUnlockSection.nl.resx | 101 ++++++++++++++++ .../Security/RecentAuthLogsSection.en.resx | 105 +++++++++++++++++ .../Security/RecentAuthLogsSection.nl.resx | 105 +++++++++++++++++ .../Security/ShowRecoveryCodes.en.resx | 77 +++++++++++++ .../Security/ShowRecoveryCodes.nl.resx | 77 +++++++++++++ .../TwoFactorAuthenticationSection.en.resx | 81 +++++++++++++ .../TwoFactorAuthenticationSection.nl.resx | 81 +++++++++++++ .../Resources/Layout/Footer.en.resx | 81 +++++++++++++ .../Resources/Layout/Footer.nl.resx | 81 +++++++++++++ .../Resources/Pages/Main/Emails/Home.en.resx | 105 +++++++++++++++++ .../Resources/Pages/Main/Emails/Home.nl.resx | 105 +++++++++++++++++ .../ImportExport/ImportExport.en.resx | 107 +++++++++++++++++ .../ImportExport/ImportExport.nl.resx | 107 +++++++++++++++++ 34 files changed, 2186 insertions(+), 104 deletions(-) create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/PasswordSettingsPopup.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/PasswordSettingsPopup.nl.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/ActiveSessionsSection.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/ActiveSessionsSection.nl.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/DeleteAccountSection.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/DeleteAccountSection.nl.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/PasswordChangeSection.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/PasswordChangeSection.nl.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/QuickVaultUnlockSection.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/QuickVaultUnlockSection.nl.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/RecentAuthLogsSection.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/RecentAuthLogsSection.nl.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/ShowRecoveryCodes.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/ShowRecoveryCodes.nl.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/TwoFactorAuthenticationSection.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Components/Main/Settings/Security/TwoFactorAuthenticationSection.nl.resx create mode 100644 apps/server/AliasVault.Client/Resources/Layout/Footer.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Layout/Footer.nl.resx create mode 100644 apps/server/AliasVault.Client/Resources/Pages/Main/Emails/Home.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Pages/Main/Emails/Home.nl.resx create mode 100644 apps/server/AliasVault.Client/Resources/Pages/Main/Settings/ImportExport/ImportExport.en.resx create mode 100644 apps/server/AliasVault.Client/Resources/Pages/Main/Settings/ImportExport/ImportExport.nl.resx diff --git a/apps/server/AliasVault.Client/Main/Components/Settings/PasswordSettingsPopup.razor b/apps/server/AliasVault.Client/Main/Components/Settings/PasswordSettingsPopup.razor index 639340662..0bcba328d 100644 --- a/apps/server/AliasVault.Client/Main/Components/Settings/PasswordSettingsPopup.razor +++ b/apps/server/AliasVault.Client/Main/Components/Settings/PasswordSettingsPopup.razor @@ -3,15 +3,19 @@ @inject GlobalLoadingService GlobalLoadingService @inject GlobalNotificationService GlobalNotificationService @inject CredentialService CredentialService +@inject IStringLocalizerFactory LocalizerFactory +@inject IStringLocalizer SharedLocalizer +@using Microsoft.Extensions.Localization +@using AliasVault.Client.Resources
-

Change password generator settings

+

@Localizer["Title"]

- + @@ -20,35 +24,35 @@
- +
- +
- +
- +
- +
- +
@if (IsTemporary) { }
@@ -80,6 +84,8 @@ @code { + private IStringLocalizer Localizer => LocalizerFactory.Create("Components.Main.Settings.PasswordSettingsPopup", "AliasVault.Client"); + /// /// The PasswordSettings to mutate. /// @@ -178,7 +184,7 @@ var settingsJson = System.Text.Json.JsonSerializer.Serialize(_workingSettings); await DbService.Settings.SetSettingAsync("PasswordGenerationSettings", settingsJson); GlobalLoadingService.Hide(); - GlobalNotificationService.AddSuccessMessage("Password generation settings updated globally.", true); + GlobalNotificationService.AddSuccessMessage(Localizer["SettingsUpdatedMessage"], true); // Notify parent with both settings and the generated password. await OnSaveSettings.InvokeAsync((_workingSettings, _previewPassword)); diff --git a/apps/server/AliasVault.Client/Main/Layout/Footer.razor b/apps/server/AliasVault.Client/Main/Layout/Footer.razor index da92c7ddc..8234f9324 100644 --- a/apps/server/AliasVault.Client/Main/Layout/Footer.razor +++ b/apps/server/AliasVault.Client/Main/Layout/Footer.razor @@ -1,12 +1,16 @@ @inject NavigationManager NavigationManager +@inject IStringLocalizerFactory LocalizerFactory +@inject IStringLocalizer SharedLocalizer @using AliasVault.Shared.Core +@using Microsoft.Extensions.Localization +@using AliasVault.Client.Resources @implements IDisposable