diff --git a/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift b/AuthenticatorShared/Core/Platform/Models/Enum/ClearClipboardValue.swift index 575b72f3a1..fc026eca7e 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..020e9d9a57 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..5d701dd6c4 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..c3e5fa17ff 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..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.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 3960ae9a49..a34de2cf86 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..c8f8eef89e 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 + 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 + + + ItemsSuccessfullyImported + + NSStringLocalizedFormatKey + %#@items@ successfully imported + 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 + + + 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 + + + XCharacters + + NSStringLocalizedFormatKey + %#@characters@ + characters + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d character + other + %d characters + + + XDays + + NSStringLocalizedFormatKey + %#@days@ + days + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d day + other + %d days + + + XHours + + NSStringLocalizedFormatKey + %#@hours@ + hours + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d hour + other + %d hours + + + XItems + + NSStringLocalizedFormatKey + %#@items@ + items + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d item + other + %d items + + + XMinutes + + NSStringLocalizedFormatKey + %#@minutes@ + minutes + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d minute + other + %d minutes + + + XSeconds + + NSStringLocalizedFormatKey + %#@seconds@ + seconds + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d second + other + %d seconds + + + XWeeks + + NSStringLocalizedFormatKey + %#@weeks@ + weeks + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d week + other + %d weeks + + + 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 + - diff --git a/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift b/BitwardenShared/Core/Platform/Models/Enum/ClearClipboardValue.swift index 575b72f3a1..fc026eca7e 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..4ec1cd1121 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..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.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..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.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..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.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..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.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..0b9e015ead 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 1f5cecc85a..296dc0c76d 100644 --- a/BitwardenShared/UI/Vault/Extensions/Alert+Vault.swift +++ b/BitwardenShared/UI/Vault/Extensions/Alert+Vault.swift @@ -26,9 +26,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 0d5cec8a5c..cef06d1ae3 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 """