From 3e2d8f402addc26fc8ce458cc228fd65626f5de8 Mon Sep 17 00:00:00 2001 From: Konrad <11725227+mKoonrad@users.noreply.github.com> Date: Mon, 29 Sep 2025 00:53:07 +0200 Subject: [PATCH 1/5] Add plurals --- .../Models/Enum/ClearClipboardValue.swift | 6 +- .../Enum/ClearClipboardValueTests.swift | 6 +- .../Models/Enum/SessionTimeoutValue.swift | 4 +- .../Enum/SessionTimeoutValueTests.swift | 4 +- .../AuthenticatorItemState.swift | 6 +- .../en.lproj/Localizable.strings | 23 -- .../en.lproj/Localizable.stringsdict | 244 ++++++++++++++++-- .../Models/Enum/ClearClipboardValue.swift | 6 +- .../Enum/ClearClipboardValueTests.swift | 6 +- .../Enum/FlightRecorderLoggingDuration.swift | 4 +- .../FlightRecorderLoggingDurationTests.swift | 4 +- .../Models/Enum/SendDeletionDateType.swift | 12 +- .../Enum/SendDeletionDateTypeTests.swift | 12 +- .../AccountSecurityState.swift | 4 +- .../UI/Vault/Extensions/Alert+Vault.swift | 4 +- .../UI/Vault/Extensions/AlertVaultTests.swift | 4 +- 16 files changed, 269 insertions(+), 80 deletions(-) diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift index 575b72f3a1..8e60e4997c 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift @@ -44,11 +44,11 @@ enum ClearClipboardValue: Int, Menuable { case .never: Localizations.never case .tenSeconds: - Localizations.tenSeconds + Localizations.XSeconds(10) case .twentySeconds: - Localizations.twentySeconds + Localizations.XSeconds(20) case .thirtySeconds: - Localizations.thirtySeconds + Localizations.XSeconds(30) case .oneMinute: Localizations.xMinutes(1) case .twoMinutes: diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift index 680d101562..4599a0d8d0 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift @@ -9,9 +9,9 @@ class ClearClipboardValueTests: BitwardenTestCase { /// `localizedName` returns the correct values. func test_localizedName() { XCTAssertEqual(ClearClipboardValue.never.localizedName, Localizations.never) - XCTAssertEqual(ClearClipboardValue.tenSeconds.localizedName, Localizations.tenSeconds) - XCTAssertEqual(ClearClipboardValue.twentySeconds.localizedName, Localizations.twentySeconds) - XCTAssertEqual(ClearClipboardValue.thirtySeconds.localizedName, Localizations.thirtySeconds) + XCTAssertEqual(ClearClipboardValue.tenSeconds.localizedName, Localizations.XSeconds(10)) + XCTAssertEqual(ClearClipboardValue.twentySeconds.localizedName, Localizations.XSeconds(20)) + XCTAssertEqual(ClearClipboardValue.thirtySeconds.localizedName, Localizations.XSeconds(30)) XCTAssertEqual(ClearClipboardValue.oneMinute.localizedName, Localizations.xMinutes(1)) XCTAssertEqual(ClearClipboardValue.twoMinutes.localizedName, Localizations.xMinutes(2)) XCTAssertEqual(ClearClipboardValue.fiveMinutes.localizedName, Localizations.xMinutes(5)) diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift index 461b8cb588..4f8c45c787 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift @@ -34,9 +34,9 @@ extension SessionTimeoutValue: @retroactive CaseIterable, Menuable { case .thirtyMinutes: Localizations.xMinutes(30) case .oneHour: - Localizations.oneHour + Localizations.XHours(1) case .fourHours: - Localizations.fourHours + Localizations.XHours(4) case .onAppRestart: Localizations.onRestart case .never: diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift index 794a8f9a9a..c1d48b5b46 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift @@ -32,8 +32,8 @@ final class SessionTimeoutValueTests: BitwardenTestCase { XCTAssertEqual(SessionTimeoutValue.fiveMinutes.localizedName, Localizations.xMinutes(5)) XCTAssertEqual(SessionTimeoutValue.fifteenMinutes.localizedName, Localizations.xMinutes(15)) XCTAssertEqual(SessionTimeoutValue.thirtyMinutes.localizedName, Localizations.xMinutes(30)) - XCTAssertEqual(SessionTimeoutValue.oneHour.localizedName, Localizations.oneHour) - XCTAssertEqual(SessionTimeoutValue.fourHours.localizedName, Localizations.fourHours) + XCTAssertEqual(SessionTimeoutValue.oneHour.localizedName, Localizations.XHours(1)) + XCTAssertEqual(SessionTimeoutValue.fourHours.localizedName, Localizations.XHours(4)) XCTAssertEqual(SessionTimeoutValue.onAppRestart.localizedName, Localizations.onRestart) XCTAssertEqual(SessionTimeoutValue.never.localizedName, Localizations.never) XCTAssertEqual(SessionTimeoutValue.custom(123).localizedName, Localizations.custom) diff --git a/AuthenticatorShared/UI/Vault/AuthenticatorItem/AuthenticatorItemState.swift b/AuthenticatorShared/UI/Vault/AuthenticatorItem/AuthenticatorItemState.swift index 314d78923b..001f673820 100644 --- a/AuthenticatorShared/UI/Vault/AuthenticatorItem/AuthenticatorItemState.swift +++ b/AuthenticatorShared/UI/Vault/AuthenticatorItem/AuthenticatorItemState.swift @@ -161,11 +161,11 @@ enum TotpPeriodOptions: Int, Menuable, CaseIterable { var localizedName: String { switch self { case .thirty: - Localizations.thirtySeconds + Localizations.XSeconds(30) case .sixty: - Localizations.sixtySeconds + Localizations.XSeconds(60) case .ninety: - Localizations.ninetySeconds + Localizations.XSeconds(90) } } } diff --git a/BitwardenResources/Localizations/en.lproj/Localizable.strings b/BitwardenResources/Localizations/en.lproj/Localizable.strings index a22a1d0562..2397555499 100644 --- a/BitwardenResources/Localizations/en.lproj/Localizable.strings +++ b/BitwardenResources/Localizations/en.lproj/Localizable.strings @@ -131,8 +131,6 @@ "LastSync" = "Last sync:"; "Length" = "Length"; "Lock" = "Lock"; -"OneHour" = "1 hour"; -"FourHours" = "4 hours"; "Immediately" = "Immediately"; "VaultTimeout" = "Vault timeout"; "VaultTimeoutAction" = "Vault timeout action"; @@ -389,7 +387,6 @@ "AllItems" = "All items"; "CheckingPassword" = "Checking password…"; "CheckPassword" = "Check if password has been exposed."; -"PasswordExposed" = "This password has been exposed %1$@ time(s) in data breaches. You should change it."; "PasswordSafe" = "This password was not found in any known data breaches. It should be safe to use."; "IdentityName" = "Identity name"; "Value" = "Value"; @@ -437,9 +434,6 @@ "VaultLockedIdentity" = "Your vault is locked. Verify your identity to continue."; "Dark" = "Dark"; "Light" = "Light"; -"TenSeconds" = "10 seconds"; -"ThirtySeconds" = "30 seconds"; -"TwentySeconds" = "20 seconds"; "ClearClipboard" = "Clear clipboard"; "ClearClipboardDescription" = "Automatically clear copied values from your clipboard."; "DefaultUriMatchDetection" = "Default URI match detection"; @@ -582,11 +576,6 @@ "SendDeleted" = "Send deleted"; "SendUpdated" = "Send saved"; "NewSendCreated" = "Send created"; -"OneDay" = "1 day"; -"TwoDays" = "2 days"; -"ThreeDays" = "3 days"; -"SevenDays" = "7 days"; -"ThirtyDays" = "30 days"; "Custom" = "Custom"; "ShareOnSave" = "Share this Send upon save"; "SendDisabledWarning" = "Due to an enterprise policy, you are only able to delete an existing Send."; @@ -617,8 +606,6 @@ "Fido2ReturnToApp" = "Return to app"; "Fido2CheckBrowser" = "Please make sure your default browser supports WebAuthn and try again."; "ResetPasswordAutoEnrollInviteWarning" = "This organization has an enterprise policy that will automatically enroll you in password reset. Enrollment will allow organization administrators to change your master password."; -"VaultTimeoutPolicyInEffect" = "Your organization policies have set your maximum allowed vault timeout to %1$@ hour(s) and %2$@ minute(s)."; -"VaultTimeoutPolicyWithActionInEffect" = "Your organization policies are affecting your vault timeout. Maximum allowed vault timeout is %1$@ hour(s) and %2$@ minute(s). Your vault timeout action is set to %3$@."; "VaultTimeoutActionPolicyInEffect" = "Your organization policies have set your vault timeout action to %1$@."; "VaultTimeoutToLarge" = "Your vault timeout exceeds the restrictions set by your organization."; "DisablePersonalVaultExportPolicyInEffect" = "One or more organization policies prevents your from exporting your individual vault."; @@ -839,7 +826,6 @@ "OneHourAndXMinute" = "One hour and %1$@ minutes"; "XHoursAndOneMinute" = "%1$@ hours and one minute"; "XHoursAndYMinutes" = "%1$@ hours and %2$@ minutes"; -"XHours" = "%1$@ hours"; "PasskeyManagementExplanationLong" = "Use Bitwarden to save new passkeys and log in with passkeys stored in your vault."; "AutofillServicesExplanationLong" = "The Android Autofill Framework is used to assist in filling login information into other apps on your device."; "UseInlineAutofillExplanationLong" = "Use inline autofill if your selected keyboard supports it. Otherwise, use the default overlay."; @@ -974,7 +960,6 @@ "BitwardenCannotResetALostOrForgottenMasterPassword" = "Bitwarden cannot reset a lost or forgotten master password."; "LearnAboutWaysToPreventAccountLockout" = "Learn about ways to prevent account lockout"; "WhatMakesAPasswordStrong" = "What makes a password strong?"; -"XCharacters" = "%1$@ Characters"; "RemoveMasterPasswordMessage" = "%1$@ is using SSO with a self-hosted key server. A master password is no longer required to log in for members of this organization."; "RestartRegistration" = "Restart registration"; "ExpiredLink" = "Expired link"; @@ -1089,7 +1074,6 @@ "ImportingEllipsis" = "Importing…"; "AreYouSureYouWantToCancelTheImportProcessQuestionMark" = "Are you sure you want to cancel the import process?"; "ImportFailed" = "Import failed"; -"ItemsSuccessfullyImported" = "%1$@ items successfully imported"; "ThereWasAnIssueImportingAllOfYourPasswordsNoDataWasDeleted" = "There was an issue importing all of your passwords.\n\nNo data was deleted."; "RetryImport" = "Retry import"; "ShowVault" = "Show vault"; @@ -1111,7 +1095,6 @@ "SendNameRequired" = "Send name (required)"; "CheckPasswordForDataBreaches" = "Check password for data breaches"; "PrivateNote" = "Private note"; -"XItems" = "%1$@ items"; "CannotDeleteUserSoleOwnerDescriptionLong" = "Cannot delete this user because it is the sole owner of at least one organization. Please delete these organizations or upgrade another user."; "APasskeyAlreadyExistsForThisApplication" = "A passkey already exists for this application."; "APasskeyAlreadyExistsForThisApplicationButAnErrorOccurredWhileLoadingIt" = "A passkey already exists for this application but an error occurred while loading it."; @@ -1145,7 +1128,6 @@ "LoggingDuration" = "Logging duration"; "LogsWillBeAutomaticallyDeletedAfter30DaysDescriptionLong" = "Logs will be automatically deleted after 30 days. Bitwarden is only able to access your log data when you share it."; "ForDetailsOnWhatIsAndIsntLoggedVisitTheBitwardenHelpCenter" = "For details on what is and isn’t logged, visit the **[Bitwarden help center](%1$@)**."; -"OneWeek" = "1 week"; "ShowMore" = "Show more"; "ShowLess" = "Show less"; "ItemNameX" = "Item name, %1$@"; @@ -1169,7 +1151,6 @@ "GeneratePassphrase" = "Generate passphrase"; "AllowUniversalClipboard" = "Allow Universal Clipboard"; "UseUniversalClipboardToCopyDescriptionLong" = "Use Universal Clipboard to copy here and paste on other devices signed in with the same Apple ID."; -"YourPINMustBeAtLeastXCharactersDescriptionLong" = "Your PIN must be at least %1$@ characters. Your PIN settings will be reset if you ever fully log out of the application."; "RemoveMasterPasswordMessage" = "%1$@ is using SSO with a self-hosted key server. A master password is no longer required to log in for members of this organization."; "RemoveMasterPasswordConfirmDomain" = "A master password is no longer required for members of the following organization. Please confirm the domain below with your organization administrator."; "ConfirmKeyConnectorDomain" = "Confirm Key Connector domain"; @@ -1204,8 +1185,6 @@ "PasswordLastUpdated" = "Password last updated: %1$@"; "DecryptionError" = "Decryption error"; "BitwardenCouldNotDecryptThisVaultItemDescriptionLong" = "Bitwarden could not decrypt this vault item. Copy and share this error report with customer success to avoid additional data loss."; -"BitwardenCouldNotDecryptOneVaultItemDescriptionLong" = "Bitwarden could not decrypt 1 vault item. Copy and share this error report with customer success to avoid additional data loss."; -"BitwardenCouldNotDecryptXVaultItemsDescriptionLong" = "Bitwarden could not decrypt %1$@ vault items. Copy and share this error report with customer success to avoid additional data loss."; "CopyErrorReport" = "Copy error report"; "ErrorCannotDecrypt" = "[error: cannot decrypt]"; "AccountName" = "Account name"; @@ -1240,7 +1219,6 @@ "LearnMoreLink" = "[Learn more](%1$@)"; "LocalCodes" = "Local codes"; "NeedHelpVisitOurHelpCenterForGuidance" = "Need help? Visit our Help Center for guidance."; -"NinetySeconds" = "90 seconds"; "NoAskMe" = "No, ask me"; "NoCodes" = "You don’t have any codes to display"; "None" = "None"; @@ -1258,7 +1236,6 @@ "SetSaveLocallyAsYourDefaultSaveOption" = "Set “Save locally” as your default save option?"; "SetSaveToBitwardenAsYourDefaultSaveOption" = "Set “Save to Bitwarden” as your default save option?"; "SignInUsingUniqueCodes" = "Sign in using unique codes"; -"SixtySeconds" = "60 seconds"; "Skip" = "Skip"; "Steam" = "Steam"; "StoreAllOfYourLoginsAndSyncVerificationCodesDirectlyWithTheAuthenticatorApp" = "Store all of your logins and sync verification codes directly with the Authenticator app."; diff --git a/BitwardenResources/Localizations/en.lproj/Localizable.stringsdict b/BitwardenResources/Localizations/en.lproj/Localizable.stringsdict index 85d5f314a4..a832c8cf4a 100644 --- a/BitwardenResources/Localizations/en.lproj/Localizable.stringsdict +++ b/BitwardenResources/Localizations/en.lproj/Localizable.stringsdict @@ -1,22 +1,236 @@ - - XMinutes - NSStringLocalizedFormatKey - %#@minutes@ - minutes - - NSStringFormatSpecTypeKey - NSStringPluralRuleType - NSStringFormatValueTypeKey - d - one - %d minute - other - %d minutes + XMinutes + + NSStringLocalizedFormatKey + %#@minutes@ + minutes + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d minute + other + %d minutes + + + XHours + + NSStringLocalizedFormatKey + %#@hours@ + hours + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d hour + other + %d hours + + + XSeconds + + NSStringLocalizedFormatKey + %#@seconds@ + seconds + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d second + other + %d seconds + + + XDays + + NSStringLocalizedFormatKey + %#@days@ + days + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d day + other + %d days + + + XWeeks + + NSStringLocalizedFormatKey + %#@weeks@ + weeks + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d week + other + %d weeks + + + XCharacters + + NSStringLocalizedFormatKey + %#@characters@ + characters + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d character + other + %d characters + + + XItems + + NSStringLocalizedFormatKey + %#@items@ + items + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d item + other + %d items + + + PasswordExposed + + NSStringLocalizedFormatKey + This password has been exposed %#@times@ in data breaches. You should change it. + times + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d time + other + %d times + + + ItemsSuccessfullyImported + + NSStringLocalizedFormatKey + %#@items@ successfully imported + items + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d item + other + %d items + + + VaultTimeoutPolicyInEffect + + NSStringLocalizedFormatKey + Your organization policies have set your maximum allowed vault timeout to %#@hours@ and %#@minutes@. + hours + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d hour + other + %d hours + + minutes + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d minute + other + %d minutes + + + VaultTimeoutPolicyWithActionInEffect + + NSStringLocalizedFormatKey + Your organization policies are affecting your vault timeout. Maximum allowed vault timeout is %#@hours@ and %#@minutes@. Your vault timeout action is set to %@. + hours + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d hour + other + %d hours + + minutes + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d minute + other + %d minutes + + + YourPINMustBeAtLeastXCharactersDescriptionLong + + NSStringLocalizedFormatKey + Your PIN must be at least %#@characters@. Your PIN settings will be reset if you ever fully log out of the application. + characters + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d character + other + %d characters + + + BitwardenCouldNotDecryptXVaultItemsDescriptionLong + + NSStringLocalizedFormatKey + Bitwarden could not decrypt %#@items@. Copy and share this error report with customer success to avoid additional data loss. + items + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d vault item + other + %d vault items + - diff --git a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift index 575b72f3a1..8e60e4997c 100644 --- a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift +++ b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift @@ -44,11 +44,11 @@ enum ClearClipboardValue: Int, Menuable { case .never: Localizations.never case .tenSeconds: - Localizations.tenSeconds + Localizations.XSeconds(10) case .twentySeconds: - Localizations.twentySeconds + Localizations.XSeconds(20) case .thirtySeconds: - Localizations.thirtySeconds + Localizations.XSeconds(30) case .oneMinute: Localizations.xMinutes(1) case .twoMinutes: diff --git a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift index 08ffc1b939..ad6aea15e4 100644 --- a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift +++ b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift @@ -9,9 +9,9 @@ class ClearClipboardValueTests: BitwardenTestCase { /// `localizedName` returns the correct values. func test_localizedName() { XCTAssertEqual(ClearClipboardValue.never.localizedName, Localizations.never) - XCTAssertEqual(ClearClipboardValue.tenSeconds.localizedName, Localizations.tenSeconds) - XCTAssertEqual(ClearClipboardValue.twentySeconds.localizedName, Localizations.twentySeconds) - XCTAssertEqual(ClearClipboardValue.thirtySeconds.localizedName, Localizations.thirtySeconds) + XCTAssertEqual(ClearClipboardValue.tenSeconds.localizedName, Localizations.XSeconds(10)) + XCTAssertEqual(ClearClipboardValue.twentySeconds.localizedName, Localizations.XSeconds(20)) + XCTAssertEqual(ClearClipboardValue.thirtySeconds.localizedName, Localizations.XSeconds(30)) XCTAssertEqual(ClearClipboardValue.oneMinute.localizedName, Localizations.xMinutes(1)) XCTAssertEqual(ClearClipboardValue.twoMinutes.localizedName, Localizations.xMinutes(2)) XCTAssertEqual(ClearClipboardValue.fiveMinutes.localizedName, Localizations.xMinutes(5)) diff --git a/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDuration.swift b/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDuration.swift index c6c8917e95..c29ce4edb7 100644 --- a/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDuration.swift +++ b/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDuration.swift @@ -18,10 +18,10 @@ enum FlightRecorderLoggingDuration: CaseIterable, Codable, Menuable { var localizedName: String { switch self { - case .oneHour: Localizations.oneHour + case .oneHour: Localizations.XHours(1) case .eightHours: Localizations.xHours(8) case .twentyFourHours: Localizations.xHours(24) - case .oneWeek: Localizations.oneWeek + case .oneWeek: Localizations.XWeeks(1) } } diff --git a/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDurationTests.swift b/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDurationTests.swift index 0424b58035..fd3f8b97d2 100644 --- a/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDurationTests.swift +++ b/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDurationTests.swift @@ -25,10 +25,10 @@ class FlightRecorderLoggingDurationTests: BitwardenTestCase { /// `localizedName` returns the correct values. func test_localizedName() { - XCTAssertEqual(FlightRecorderLoggingDuration.oneHour.localizedName, Localizations.oneHour) + XCTAssertEqual(FlightRecorderLoggingDuration.oneHour.localizedName, Localizations.XHours(1)) XCTAssertEqual(FlightRecorderLoggingDuration.eightHours.localizedName, Localizations.xHours(8)) XCTAssertEqual(FlightRecorderLoggingDuration.twentyFourHours.localizedName, Localizations.xHours(24)) - XCTAssertEqual(FlightRecorderLoggingDuration.oneWeek.localizedName, Localizations.oneWeek) + XCTAssertEqual(FlightRecorderLoggingDuration.oneWeek.localizedName, Localizations.XWeeks(1)) } /// `shortDescription` returns a short string representation of the logging duration. diff --git a/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateType.swift b/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateType.swift index 934ec04784..b90d6194f7 100644 --- a/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateType.swift +++ b/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateType.swift @@ -31,12 +31,12 @@ enum SendDeletionDateType: Menuable { var localizedName: String { switch self { - case .oneHour: Localizations.oneHour - case .oneDay: Localizations.oneDay - case .twoDays: Localizations.twoDays - case .threeDays: Localizations.threeDays - case .sevenDays: Localizations.sevenDays - case .thirtyDays: Localizations.thirtyDays + case .oneHour: Localizations.XHours(1) + case .oneDay: Localizations.XDays(1) + case .twoDays: Localizations.XDays(2) + case .threeDays: Localizations.XDays(3) + case .sevenDays: Localizations.XDays(7) + case .thirtyDays: Localizations.XDays(30) case let .custom(customDate): customDate.dateTimeDisplay } } diff --git a/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateTypeTests.swift b/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateTypeTests.swift index fe9a237a21..849674cc86 100644 --- a/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateTypeTests.swift +++ b/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateTypeTests.swift @@ -37,12 +37,12 @@ class SendDeletionDateTypeTests: BitwardenTestCase { /// `localizedName` returns the localized name of the option to display in the menu. func test_localizedName() { - XCTAssertEqual(SendDeletionDateType.oneHour.localizedName, Localizations.oneHour) - XCTAssertEqual(SendDeletionDateType.oneDay.localizedName, Localizations.oneDay) - XCTAssertEqual(SendDeletionDateType.twoDays.localizedName, Localizations.twoDays) - XCTAssertEqual(SendDeletionDateType.threeDays.localizedName, Localizations.threeDays) - XCTAssertEqual(SendDeletionDateType.sevenDays.localizedName, Localizations.sevenDays) - XCTAssertEqual(SendDeletionDateType.thirtyDays.localizedName, Localizations.thirtyDays) + XCTAssertEqual(SendDeletionDateType.oneHour.localizedName, Localizations.XHours(1)) + XCTAssertEqual(SendDeletionDateType.oneDay.localizedName, Localizations.XDays(1)) + XCTAssertEqual(SendDeletionDateType.twoDays.localizedName, Localizations.XDays(2)) + XCTAssertEqual(SendDeletionDateType.threeDays.localizedName, Localizations.XDays(3)) + XCTAssertEqual(SendDeletionDateType.sevenDays.localizedName, Localizations.XDays(7)) + XCTAssertEqual(SendDeletionDateType.thirtyDays.localizedName, Localizations.XDays(30)) XCTAssertEqual( SendDeletionDateType.custom(Date(year: 2024, month: 1, day: 19)).localizedName, diff --git a/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift b/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift index 6679395b4f..948c2dc831 100644 --- a/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift +++ b/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift @@ -50,9 +50,9 @@ extension SessionTimeoutValue: @retroactive CaseIterable, Menuable { case .thirtyMinutes: Localizations.xMinutes(30) case .oneHour: - Localizations.oneHour + Localizations.XHours(1) case .fourHours: - Localizations.fourHours + Localizations.XHours(4) case .onAppRestart: Localizations.onRestart case .never: diff --git a/BitwardenShared/UI/Vault/Extensions/Alert+Vault.swift b/BitwardenShared/UI/Vault/Extensions/Alert+Vault.swift index 5fe071e8a1..f6b00c83b0 100644 --- a/BitwardenShared/UI/Vault/Extensions/Alert+Vault.swift +++ b/BitwardenShared/UI/Vault/Extensions/Alert+Vault.swift @@ -24,9 +24,7 @@ extension Alert { let message = if isFromCipherTap { Localizations.bitwardenCouldNotDecryptThisVaultItemDescriptionLong } else { - cipherIds.count == 1 - ? Localizations.bitwardenCouldNotDecryptOneVaultItemDescriptionLong - : Localizations.bitwardenCouldNotDecryptXVaultItemsDescriptionLong(cipherIds.count) + Localizations.bitwardenCouldNotDecryptXVaultItemsDescriptionLong(cipherIds.count) } return Alert( diff --git a/BitwardenShared/UI/Vault/Extensions/AlertVaultTests.swift b/BitwardenShared/UI/Vault/Extensions/AlertVaultTests.swift index 4cff097076..b0719f8e3f 100644 --- a/BitwardenShared/UI/Vault/Extensions/AlertVaultTests.swift +++ b/BitwardenShared/UI/Vault/Extensions/AlertVaultTests.swift @@ -48,7 +48,7 @@ class AlertVaultTests: BitwardenTestCase { // swiftlint:disable:this type_body_l XCTAssertEqual(subject.title, Localizations.decryptionError) XCTAssertEqual( subject.message, - Localizations.bitwardenCouldNotDecryptOneVaultItemDescriptionLong + Localizations.BitwardenCouldNotDecryptXVaultItemsDescriptionLong(1) ) XCTAssertEqual(subject.alertActions.count, 2) XCTAssertEqual(subject.alertActions[0].title, Localizations.copyErrorReport) @@ -61,7 +61,7 @@ class AlertVaultTests: BitwardenTestCase { // swiftlint:disable:this type_body_l copyString, """ \(Localizations.decryptionError) - \(Localizations.bitwardenCouldNotDecryptOneVaultItemDescriptionLong) + \(Localizations.BitwardenCouldNotDecryptXVaultItemsDescriptionLong(1)) 123abc """ From 250c9edf21f28913d622cea5faec1b86a1454ba9 Mon Sep 17 00:00:00 2001 From: Konrad <11725227+mKoonrad@users.noreply.github.com> Date: Tue, 30 Sep 2025 21:27:38 +0200 Subject: [PATCH 2/5] Alphabetical order --- .../en.lproj/Localizable.stringsdict | 148 +++++++++--------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/BitwardenResources/Localizations/en.lproj/Localizable.stringsdict b/BitwardenResources/Localizations/en.lproj/Localizable.stringsdict index a832c8cf4a..c8f8eef89e 100644 --- a/BitwardenResources/Localizations/en.lproj/Localizable.stringsdict +++ b/BitwardenResources/Localizations/en.lproj/Localizable.stringsdict @@ -2,154 +2,144 @@ - XMinutes + BitwardenCouldNotDecryptXVaultItemsDescriptionLong NSStringLocalizedFormatKey - %#@minutes@ - minutes + Bitwarden could not decrypt %#@items@. Copy and share this error report with customer success to avoid additional data loss. + items NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d minute + %d vault item other - %d minutes + %d vault items - XHours + ItemsSuccessfullyImported NSStringLocalizedFormatKey - %#@hours@ - hours + %#@items@ successfully imported + items NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d hour + %d item other - %d hours + %d items - XSeconds + PasswordExposed NSStringLocalizedFormatKey - %#@seconds@ - seconds + This password has been exposed %#@times@ in data breaches. You should change it. + times NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d second + %d time other - %d seconds + %d times - XDays + VaultTimeoutPolicyInEffect NSStringLocalizedFormatKey - %#@days@ - days + Your organization policies have set your maximum allowed vault timeout to %#@hours@ and %#@minutes@. + hours NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d day + %d hour other - %d days + %d hours - - XWeeks - - NSStringLocalizedFormatKey - %#@weeks@ - weeks + minutes NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d week + %d minute other - %d weeks + %d minutes - XCharacters + VaultTimeoutPolicyWithActionInEffect NSStringLocalizedFormatKey - %#@characters@ - characters + Your organization policies are affecting your vault timeout. Maximum allowed vault timeout is %#@hours@ and %#@minutes@. Your vault timeout action is set to %@. + hours NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d character + %d hour other - %d characters + %d hours - - XItems - - NSStringLocalizedFormatKey - %#@items@ - items + minutes NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d item + %d minute other - %d items + %d minutes - PasswordExposed + XCharacters NSStringLocalizedFormatKey - This password has been exposed %#@times@ in data breaches. You should change it. - times + %#@characters@ + characters NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d time + %d character other - %d times + %d characters - ItemsSuccessfullyImported + XDays NSStringLocalizedFormatKey - %#@items@ successfully imported - items + %#@days@ + days NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d item + %d day other - %d items + %d days - VaultTimeoutPolicyInEffect + XHours NSStringLocalizedFormatKey - Your organization policies have set your maximum allowed vault timeout to %#@hours@ and %#@minutes@. + %#@hours@ hours NSStringFormatSpecTypeKey @@ -161,75 +151,85 @@ other %d hours - minutes + + XItems + + NSStringLocalizedFormatKey + %#@items@ + items NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d minute + %d item other - %d minutes + %d items - VaultTimeoutPolicyWithActionInEffect + XMinutes NSStringLocalizedFormatKey - Your organization policies are affecting your vault timeout. Maximum allowed vault timeout is %#@hours@ and %#@minutes@. Your vault timeout action is set to %@. - hours + %#@minutes@ + minutes NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d hour + %d minute other - %d hours + %d minutes - minutes + + XSeconds + + NSStringLocalizedFormatKey + %#@seconds@ + seconds NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d minute + %d second other - %d minutes + %d seconds - YourPINMustBeAtLeastXCharactersDescriptionLong + XWeeks NSStringLocalizedFormatKey - Your PIN must be at least %#@characters@. Your PIN settings will be reset if you ever fully log out of the application. - characters + %#@weeks@ + weeks NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d character + %d week other - %d characters + %d weeks - BitwardenCouldNotDecryptXVaultItemsDescriptionLong + YourPINMustBeAtLeastXCharactersDescriptionLong NSStringLocalizedFormatKey - Bitwarden could not decrypt %#@items@. Copy and share this error report with customer success to avoid additional data loss. - items + Your PIN must be at least %#@characters@. Your PIN settings will be reset if you ever fully log out of the application. + characters NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d one - %d vault item + %d character other - %d vault items + %d characters From 9ada4c4142d766d75a56e8f65a76c8706878f9a6 Mon Sep 17 00:00:00 2001 From: Konrad <11725227+mKoonrad@users.noreply.github.com> Date: Tue, 30 Sep 2025 22:09:04 +0200 Subject: [PATCH 3/5] XMinutes letter case fix --- .../Core/Platform/Models/Enum/ClearClipboardValue.swift | 6 +++--- .../Platform/Models/Enum/ClearClipboardValueTests.swift | 6 +++--- .../Core/Platform/Models/Enum/SessionTimeoutValue.swift | 8 ++++---- .../Platform/Models/Enum/SessionTimeoutValueTests.swift | 8 ++++---- .../Core/Platform/Models/Enum/ClearClipboardValue.swift | 6 +++--- .../Platform/Models/Enum/ClearClipboardValueTests.swift | 6 +++--- .../Settings/AccountSecurity/AccountSecurityState.swift | 8 ++++---- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift index 8e60e4997c..e05f6f21c5 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift @@ -50,11 +50,11 @@ enum ClearClipboardValue: Int, Menuable { case .thirtySeconds: Localizations.XSeconds(30) case .oneMinute: - Localizations.xMinutes(1) + Localizations.XMinutes(1) case .twoMinutes: - Localizations.xMinutes(2) + Localizations.XMinutes(2) case .fiveMinutes: - Localizations.xMinutes(5) + Localizations.XMinutes(5) } } } diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift index 4599a0d8d0..71256dc106 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift @@ -12,9 +12,9 @@ class ClearClipboardValueTests: BitwardenTestCase { XCTAssertEqual(ClearClipboardValue.tenSeconds.localizedName, Localizations.XSeconds(10)) XCTAssertEqual(ClearClipboardValue.twentySeconds.localizedName, Localizations.XSeconds(20)) XCTAssertEqual(ClearClipboardValue.thirtySeconds.localizedName, Localizations.XSeconds(30)) - XCTAssertEqual(ClearClipboardValue.oneMinute.localizedName, Localizations.xMinutes(1)) - XCTAssertEqual(ClearClipboardValue.twoMinutes.localizedName, Localizations.xMinutes(2)) - XCTAssertEqual(ClearClipboardValue.fiveMinutes.localizedName, Localizations.xMinutes(5)) + XCTAssertEqual(ClearClipboardValue.oneMinute.localizedName, Localizations.XMinutes(1)) + XCTAssertEqual(ClearClipboardValue.twoMinutes.localizedName, Localizations.XMinutes(2)) + XCTAssertEqual(ClearClipboardValue.fiveMinutes.localizedName, Localizations.XMinutes(5)) } /// `rawValue` returns the correct values. diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift index 4f8c45c787..85a47c0794 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift @@ -26,13 +26,13 @@ extension SessionTimeoutValue: @retroactive CaseIterable, Menuable { case .immediately: Localizations.immediately case .oneMinute: - Localizations.xMinutes(1) + Localizations.XMinutes(1) case .fiveMinutes: - Localizations.xMinutes(5) + Localizations.XMinutes(5) case .fifteenMinutes: - Localizations.xMinutes(15) + Localizations.XMinutes(15) case .thirtyMinutes: - Localizations.xMinutes(30) + Localizations.XMinutes(30) case .oneHour: Localizations.XHours(1) case .fourHours: diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift index c1d48b5b46..3eef956fc9 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift @@ -28,10 +28,10 @@ final class SessionTimeoutValueTests: BitwardenTestCase { /// `localizedName` returns the correct values. func test_localizedName() { XCTAssertEqual(SessionTimeoutValue.immediately.localizedName, Localizations.immediately) - XCTAssertEqual(SessionTimeoutValue.oneMinute.localizedName, Localizations.xMinutes(1)) - XCTAssertEqual(SessionTimeoutValue.fiveMinutes.localizedName, Localizations.xMinutes(5)) - XCTAssertEqual(SessionTimeoutValue.fifteenMinutes.localizedName, Localizations.xMinutes(15)) - XCTAssertEqual(SessionTimeoutValue.thirtyMinutes.localizedName, Localizations.xMinutes(30)) + XCTAssertEqual(SessionTimeoutValue.oneMinute.localizedName, Localizations.XMinutes(1)) + XCTAssertEqual(SessionTimeoutValue.fiveMinutes.localizedName, Localizations.XMinutes(5)) + XCTAssertEqual(SessionTimeoutValue.fifteenMinutes.localizedName, Localizations.XMinutes(15)) + XCTAssertEqual(SessionTimeoutValue.thirtyMinutes.localizedName, Localizations.XMinutes(30)) XCTAssertEqual(SessionTimeoutValue.oneHour.localizedName, Localizations.XHours(1)) XCTAssertEqual(SessionTimeoutValue.fourHours.localizedName, Localizations.XHours(4)) XCTAssertEqual(SessionTimeoutValue.onAppRestart.localizedName, Localizations.onRestart) diff --git a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift index 8e60e4997c..e05f6f21c5 100644 --- a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift +++ b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift @@ -50,11 +50,11 @@ enum ClearClipboardValue: Int, Menuable { case .thirtySeconds: Localizations.XSeconds(30) case .oneMinute: - Localizations.xMinutes(1) + Localizations.XMinutes(1) case .twoMinutes: - Localizations.xMinutes(2) + Localizations.XMinutes(2) case .fiveMinutes: - Localizations.xMinutes(5) + Localizations.XMinutes(5) } } } diff --git a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift index ad6aea15e4..a272536668 100644 --- a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift +++ b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift @@ -12,9 +12,9 @@ class ClearClipboardValueTests: BitwardenTestCase { XCTAssertEqual(ClearClipboardValue.tenSeconds.localizedName, Localizations.XSeconds(10)) XCTAssertEqual(ClearClipboardValue.twentySeconds.localizedName, Localizations.XSeconds(20)) XCTAssertEqual(ClearClipboardValue.thirtySeconds.localizedName, Localizations.XSeconds(30)) - XCTAssertEqual(ClearClipboardValue.oneMinute.localizedName, Localizations.xMinutes(1)) - XCTAssertEqual(ClearClipboardValue.twoMinutes.localizedName, Localizations.xMinutes(2)) - XCTAssertEqual(ClearClipboardValue.fiveMinutes.localizedName, Localizations.xMinutes(5)) + XCTAssertEqual(ClearClipboardValue.oneMinute.localizedName, Localizations.XMinutes(1)) + XCTAssertEqual(ClearClipboardValue.twoMinutes.localizedName, Localizations.XMinutes(2)) + XCTAssertEqual(ClearClipboardValue.fiveMinutes.localizedName, Localizations.XMinutes(5)) } /// `rawValue` returns the correct values. diff --git a/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift b/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift index 948c2dc831..47f644d6ed 100644 --- a/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift +++ b/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift @@ -42,13 +42,13 @@ extension SessionTimeoutValue: @retroactive CaseIterable, Menuable { case .immediately: Localizations.immediately case .oneMinute: - Localizations.xMinutes(1) + Localizations.XMinutes(1) case .fiveMinutes: - Localizations.xMinutes(5) + Localizations.XMinutes(5) case .fifteenMinutes: - Localizations.xMinutes(15) + Localizations.XMinutes(15) case .thirtyMinutes: - Localizations.xMinutes(30) + Localizations.XMinutes(30) case .oneHour: Localizations.XHours(1) case .fourHours: From f6af490a2e38048f6fe571c3a8cc864b3097501a Mon Sep 17 00:00:00 2001 From: Konrad <11725227+mKoonrad@users.noreply.github.com> Date: Thu, 2 Oct 2025 15:50:34 +0200 Subject: [PATCH 4/5] Update AlertVaultTests.swift --- BitwardenShared/UI/Vault/Extensions/AlertVaultTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BitwardenShared/UI/Vault/Extensions/AlertVaultTests.swift b/BitwardenShared/UI/Vault/Extensions/AlertVaultTests.swift index b0719f8e3f..71e511ee2d 100644 --- a/BitwardenShared/UI/Vault/Extensions/AlertVaultTests.swift +++ b/BitwardenShared/UI/Vault/Extensions/AlertVaultTests.swift @@ -48,7 +48,7 @@ class AlertVaultTests: BitwardenTestCase { // swiftlint:disable:this type_body_l XCTAssertEqual(subject.title, Localizations.decryptionError) XCTAssertEqual( subject.message, - Localizations.BitwardenCouldNotDecryptXVaultItemsDescriptionLong(1) + Localizations.bitwardenCouldNotDecryptXVaultItemsDescriptionLong(1) ) XCTAssertEqual(subject.alertActions.count, 2) XCTAssertEqual(subject.alertActions[0].title, Localizations.copyErrorReport) @@ -61,7 +61,7 @@ class AlertVaultTests: BitwardenTestCase { // swiftlint:disable:this type_body_l copyString, """ \(Localizations.decryptionError) - \(Localizations.BitwardenCouldNotDecryptXVaultItemsDescriptionLong(1)) + \(Localizations.bitwardenCouldNotDecryptXVaultItemsDescriptionLong(1)) 123abc """ From 7295affe455de4c0a5d4227104d3c23d22f943c7 Mon Sep 17 00:00:00 2001 From: Konrad <11725227+mKoonrad@users.noreply.github.com> Date: Thu, 2 Oct 2025 16:00:06 +0200 Subject: [PATCH 5/5] Fix plural --- .../Platform/Models/Enum/ClearClipboardValue.swift | 12 ++++++------ .../Models/Enum/ClearClipboardValueTests.swift | 12 ++++++------ .../Platform/Models/Enum/SessionTimeoutValue.swift | 12 ++++++------ .../Models/Enum/SessionTimeoutValueTests.swift | 12 ++++++------ .../AuthenticatorItem/AuthenticatorItemState.swift | 6 +++--- .../Platform/Models/Enum/ClearClipboardValue.swift | 12 ++++++------ .../Models/Enum/ClearClipboardValueTests.swift | 12 ++++++------ .../Models/Enum/FlightRecorderLoggingDuration.swift | 4 ++-- .../Enum/FlightRecorderLoggingDurationTests.swift | 4 ++-- .../Tools/Models/Enum/SendDeletionDateType.swift | 12 ++++++------ .../Models/Enum/SendDeletionDateTypeTests.swift | 12 ++++++------ .../AccountSecurity/AccountSecurityState.swift | 12 ++++++------ 12 files changed, 61 insertions(+), 61 deletions(-) diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift index e05f6f21c5..fc026eca7e 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift @@ -44,17 +44,17 @@ enum ClearClipboardValue: Int, Menuable { case .never: Localizations.never case .tenSeconds: - Localizations.XSeconds(10) + Localizations.xSeconds(10) case .twentySeconds: - Localizations.XSeconds(20) + Localizations.xSeconds(20) case .thirtySeconds: - Localizations.XSeconds(30) + Localizations.xSeconds(30) case .oneMinute: - Localizations.XMinutes(1) + Localizations.xMinutes(1) case .twoMinutes: - Localizations.XMinutes(2) + Localizations.xMinutes(2) case .fiveMinutes: - Localizations.XMinutes(5) + Localizations.xMinutes(5) } } } diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift index 71256dc106..020e9d9a57 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift @@ -9,12 +9,12 @@ class ClearClipboardValueTests: BitwardenTestCase { /// `localizedName` returns the correct values. func test_localizedName() { XCTAssertEqual(ClearClipboardValue.never.localizedName, Localizations.never) - XCTAssertEqual(ClearClipboardValue.tenSeconds.localizedName, Localizations.XSeconds(10)) - XCTAssertEqual(ClearClipboardValue.twentySeconds.localizedName, Localizations.XSeconds(20)) - XCTAssertEqual(ClearClipboardValue.thirtySeconds.localizedName, Localizations.XSeconds(30)) - XCTAssertEqual(ClearClipboardValue.oneMinute.localizedName, Localizations.XMinutes(1)) - XCTAssertEqual(ClearClipboardValue.twoMinutes.localizedName, Localizations.XMinutes(2)) - XCTAssertEqual(ClearClipboardValue.fiveMinutes.localizedName, Localizations.XMinutes(5)) + XCTAssertEqual(ClearClipboardValue.tenSeconds.localizedName, Localizations.xSeconds(10)) + XCTAssertEqual(ClearClipboardValue.twentySeconds.localizedName, Localizations.xSeconds(20)) + XCTAssertEqual(ClearClipboardValue.thirtySeconds.localizedName, Localizations.xSeconds(30)) + XCTAssertEqual(ClearClipboardValue.oneMinute.localizedName, Localizations.xMinutes(1)) + XCTAssertEqual(ClearClipboardValue.twoMinutes.localizedName, Localizations.xMinutes(2)) + XCTAssertEqual(ClearClipboardValue.fiveMinutes.localizedName, Localizations.xMinutes(5)) } /// `rawValue` returns the correct values. diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift index 85a47c0794..5d701dd6c4 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValue.swift @@ -26,17 +26,17 @@ extension SessionTimeoutValue: @retroactive CaseIterable, Menuable { case .immediately: Localizations.immediately case .oneMinute: - Localizations.XMinutes(1) + Localizations.xMinutes(1) case .fiveMinutes: - Localizations.XMinutes(5) + Localizations.xMinutes(5) case .fifteenMinutes: - Localizations.XMinutes(15) + Localizations.xMinutes(15) case .thirtyMinutes: - Localizations.XMinutes(30) + Localizations.xMinutes(30) case .oneHour: - Localizations.XHours(1) + Localizations.xHours(1) case .fourHours: - Localizations.XHours(4) + Localizations.xHours(4) case .onAppRestart: Localizations.onRestart case .never: diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift index 3eef956fc9..c3e5fa17ff 100644 --- a/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift +++ b/AuthenticatorShared/Core/Platform/Models/Enum/SessionTimeoutValueTests.swift @@ -28,12 +28,12 @@ final class SessionTimeoutValueTests: BitwardenTestCase { /// `localizedName` returns the correct values. func test_localizedName() { XCTAssertEqual(SessionTimeoutValue.immediately.localizedName, Localizations.immediately) - XCTAssertEqual(SessionTimeoutValue.oneMinute.localizedName, Localizations.XMinutes(1)) - XCTAssertEqual(SessionTimeoutValue.fiveMinutes.localizedName, Localizations.XMinutes(5)) - XCTAssertEqual(SessionTimeoutValue.fifteenMinutes.localizedName, Localizations.XMinutes(15)) - XCTAssertEqual(SessionTimeoutValue.thirtyMinutes.localizedName, Localizations.XMinutes(30)) - XCTAssertEqual(SessionTimeoutValue.oneHour.localizedName, Localizations.XHours(1)) - XCTAssertEqual(SessionTimeoutValue.fourHours.localizedName, Localizations.XHours(4)) + XCTAssertEqual(SessionTimeoutValue.oneMinute.localizedName, Localizations.xMinutes(1)) + XCTAssertEqual(SessionTimeoutValue.fiveMinutes.localizedName, Localizations.xMinutes(5)) + XCTAssertEqual(SessionTimeoutValue.fifteenMinutes.localizedName, Localizations.xMinutes(15)) + XCTAssertEqual(SessionTimeoutValue.thirtyMinutes.localizedName, Localizations.xMinutes(30)) + XCTAssertEqual(SessionTimeoutValue.oneHour.localizedName, Localizations.xHours(1)) + XCTAssertEqual(SessionTimeoutValue.fourHours.localizedName, Localizations.xHours(4)) XCTAssertEqual(SessionTimeoutValue.onAppRestart.localizedName, Localizations.onRestart) XCTAssertEqual(SessionTimeoutValue.never.localizedName, Localizations.never) XCTAssertEqual(SessionTimeoutValue.custom(123).localizedName, Localizations.custom) diff --git a/AuthenticatorShared/UI/Vault/AuthenticatorItem/AuthenticatorItemState.swift b/AuthenticatorShared/UI/Vault/AuthenticatorItem/AuthenticatorItemState.swift index 001f673820..7b75c679ad 100644 --- a/AuthenticatorShared/UI/Vault/AuthenticatorItem/AuthenticatorItemState.swift +++ b/AuthenticatorShared/UI/Vault/AuthenticatorItem/AuthenticatorItemState.swift @@ -161,11 +161,11 @@ enum TotpPeriodOptions: Int, Menuable, CaseIterable { var localizedName: String { switch self { case .thirty: - Localizations.XSeconds(30) + Localizations.xSeconds(30) case .sixty: - Localizations.XSeconds(60) + Localizations.xSeconds(60) case .ninety: - Localizations.XSeconds(90) + Localizations.xSeconds(90) } } } diff --git a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift index e05f6f21c5..fc026eca7e 100644 --- a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift +++ b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift @@ -44,17 +44,17 @@ enum ClearClipboardValue: Int, Menuable { case .never: Localizations.never case .tenSeconds: - Localizations.XSeconds(10) + Localizations.xSeconds(10) case .twentySeconds: - Localizations.XSeconds(20) + Localizations.xSeconds(20) case .thirtySeconds: - Localizations.XSeconds(30) + Localizations.xSeconds(30) case .oneMinute: - Localizations.XMinutes(1) + Localizations.xMinutes(1) case .twoMinutes: - Localizations.XMinutes(2) + Localizations.xMinutes(2) case .fiveMinutes: - Localizations.XMinutes(5) + Localizations.xMinutes(5) } } } diff --git a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift index a272536668..4ec1cd1121 100644 --- a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift +++ b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValueTests.swift @@ -9,12 +9,12 @@ class ClearClipboardValueTests: BitwardenTestCase { /// `localizedName` returns the correct values. func test_localizedName() { XCTAssertEqual(ClearClipboardValue.never.localizedName, Localizations.never) - XCTAssertEqual(ClearClipboardValue.tenSeconds.localizedName, Localizations.XSeconds(10)) - XCTAssertEqual(ClearClipboardValue.twentySeconds.localizedName, Localizations.XSeconds(20)) - XCTAssertEqual(ClearClipboardValue.thirtySeconds.localizedName, Localizations.XSeconds(30)) - XCTAssertEqual(ClearClipboardValue.oneMinute.localizedName, Localizations.XMinutes(1)) - XCTAssertEqual(ClearClipboardValue.twoMinutes.localizedName, Localizations.XMinutes(2)) - XCTAssertEqual(ClearClipboardValue.fiveMinutes.localizedName, Localizations.XMinutes(5)) + XCTAssertEqual(ClearClipboardValue.tenSeconds.localizedName, Localizations.xSeconds(10)) + XCTAssertEqual(ClearClipboardValue.twentySeconds.localizedName, Localizations.xSeconds(20)) + XCTAssertEqual(ClearClipboardValue.thirtySeconds.localizedName, Localizations.xSeconds(30)) + XCTAssertEqual(ClearClipboardValue.oneMinute.localizedName, Localizations.xMinutes(1)) + XCTAssertEqual(ClearClipboardValue.twoMinutes.localizedName, Localizations.xMinutes(2)) + XCTAssertEqual(ClearClipboardValue.fiveMinutes.localizedName, Localizations.xMinutes(5)) } /// `rawValue` returns the correct values. diff --git a/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDuration.swift b/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDuration.swift index c29ce4edb7..882ac5e082 100644 --- a/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDuration.swift +++ b/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDuration.swift @@ -18,10 +18,10 @@ enum FlightRecorderLoggingDuration: CaseIterable, Codable, Menuable { var localizedName: String { switch self { - case .oneHour: Localizations.XHours(1) + case .oneHour: Localizations.xHours(1) case .eightHours: Localizations.xHours(8) case .twentyFourHours: Localizations.xHours(24) - case .oneWeek: Localizations.XWeeks(1) + case .oneWeek: Localizations.xWeeks(1) } } diff --git a/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDurationTests.swift b/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDurationTests.swift index fd3f8b97d2..9ec4e67b69 100644 --- a/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDurationTests.swift +++ b/BitwardenShared/Core/Platform/Models/Enum/FlightRecorderLoggingDurationTests.swift @@ -25,10 +25,10 @@ class FlightRecorderLoggingDurationTests: BitwardenTestCase { /// `localizedName` returns the correct values. func test_localizedName() { - XCTAssertEqual(FlightRecorderLoggingDuration.oneHour.localizedName, Localizations.XHours(1)) + XCTAssertEqual(FlightRecorderLoggingDuration.oneHour.localizedName, Localizations.xHours(1)) XCTAssertEqual(FlightRecorderLoggingDuration.eightHours.localizedName, Localizations.xHours(8)) XCTAssertEqual(FlightRecorderLoggingDuration.twentyFourHours.localizedName, Localizations.xHours(24)) - XCTAssertEqual(FlightRecorderLoggingDuration.oneWeek.localizedName, Localizations.XWeeks(1)) + XCTAssertEqual(FlightRecorderLoggingDuration.oneWeek.localizedName, Localizations.xWeeks(1)) } /// `shortDescription` returns a short string representation of the logging duration. diff --git a/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateType.swift b/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateType.swift index b90d6194f7..1670091ff6 100644 --- a/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateType.swift +++ b/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateType.swift @@ -31,12 +31,12 @@ enum SendDeletionDateType: Menuable { var localizedName: String { switch self { - case .oneHour: Localizations.XHours(1) - case .oneDay: Localizations.XDays(1) - case .twoDays: Localizations.XDays(2) - case .threeDays: Localizations.XDays(3) - case .sevenDays: Localizations.XDays(7) - case .thirtyDays: Localizations.XDays(30) + case .oneHour: Localizations.xHours(1) + case .oneDay: Localizations.xDays(1) + case .twoDays: Localizations.xDays(2) + case .threeDays: Localizations.xDays(3) + case .sevenDays: Localizations.xDays(7) + case .thirtyDays: Localizations.xDays(30) case let .custom(customDate): customDate.dateTimeDisplay } } diff --git a/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateTypeTests.swift b/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateTypeTests.swift index 849674cc86..e9566c4ee5 100644 --- a/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateTypeTests.swift +++ b/BitwardenShared/Core/Tools/Models/Enum/SendDeletionDateTypeTests.swift @@ -37,12 +37,12 @@ class SendDeletionDateTypeTests: BitwardenTestCase { /// `localizedName` returns the localized name of the option to display in the menu. func test_localizedName() { - XCTAssertEqual(SendDeletionDateType.oneHour.localizedName, Localizations.XHours(1)) - XCTAssertEqual(SendDeletionDateType.oneDay.localizedName, Localizations.XDays(1)) - XCTAssertEqual(SendDeletionDateType.twoDays.localizedName, Localizations.XDays(2)) - XCTAssertEqual(SendDeletionDateType.threeDays.localizedName, Localizations.XDays(3)) - XCTAssertEqual(SendDeletionDateType.sevenDays.localizedName, Localizations.XDays(7)) - XCTAssertEqual(SendDeletionDateType.thirtyDays.localizedName, Localizations.XDays(30)) + XCTAssertEqual(SendDeletionDateType.oneHour.localizedName, Localizations.xHours(1)) + XCTAssertEqual(SendDeletionDateType.oneDay.localizedName, Localizations.xDays(1)) + XCTAssertEqual(SendDeletionDateType.twoDays.localizedName, Localizations.xDays(2)) + XCTAssertEqual(SendDeletionDateType.threeDays.localizedName, Localizations.xDays(3)) + XCTAssertEqual(SendDeletionDateType.sevenDays.localizedName, Localizations.xDays(7)) + XCTAssertEqual(SendDeletionDateType.thirtyDays.localizedName, Localizations.xDays(30)) XCTAssertEqual( SendDeletionDateType.custom(Date(year: 2024, month: 1, day: 19)).localizedName, diff --git a/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift b/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift index 47f644d6ed..0b9e015ead 100644 --- a/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift +++ b/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/AccountSecurityState.swift @@ -42,17 +42,17 @@ extension SessionTimeoutValue: @retroactive CaseIterable, Menuable { case .immediately: Localizations.immediately case .oneMinute: - Localizations.XMinutes(1) + Localizations.xMinutes(1) case .fiveMinutes: - Localizations.XMinutes(5) + Localizations.xMinutes(5) case .fifteenMinutes: - Localizations.XMinutes(15) + Localizations.xMinutes(15) case .thirtyMinutes: - Localizations.XMinutes(30) + Localizations.xMinutes(30) case .oneHour: - Localizations.XHours(1) + Localizations.xHours(1) case .fourHours: - Localizations.XHours(4) + Localizations.xHours(4) case .onAppRestart: Localizations.onRestart case .never: