Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,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";
Expand All @@ -1102,7 +1101,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.";
Expand Down Expand Up @@ -1194,8 +1192,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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- An error report if there are issues decrypting vault items. -->
<key>BitwardenCouldNotDecryptXVaultItemsDescriptionLong</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@vaultitems@. Copy and share this error report with customer success to avoid additional data loss.</string>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โ„น๏ธ I pulled the entire "Bitwarden could not decrypt X vault items" sentence into a plural-rule string because some languages inflect verbs based on the number of the object.

<key>vaultitems</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>Bitwarden could not decrypt %d vault item</string>
<key>other</key>
<string>Bitwarden could not decrypt %d vault items</string>
</dict>
</dict>
<!-- A number of days, used in menu selections. For example, the number of days to keep a send before deletion. -->
<key>XDays</key>
<dict>
Expand All @@ -19,6 +36,40 @@
<string>%d days</string>
</dict>
</dict>
<!-- A number of items, used in headers' voiceover to indicate how many items are in a section. -->
<key>XItems</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@items@</string>
<key>items</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d item</string>
<key>other</key>
<string>%d items</string>
</dict>
</dict>
<!-- Message indicating a number of items were successfully imported in the Credential Exchange flow. -->
<key>XItemsSuccessfullyImported</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@items@ successfully imported</string>
<key>items</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d item</string>
<key>other</key>
<string>%d items</string>
</dict>
</dict>
<!-- A number of hours, used in menu selections. For example, how long to log events in the flight recorder. -->
<key>XHours</key>
<dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct ImportCXFState: Equatable, Sendable {
case .importing:
Localizations.pleaseDoNotCloseTheApp
case let .success(total, _):
Localizations.itemsSuccessfullyImported(total)
Localizations.xItemsSuccessfullyImported(total)
case let .failure(message):
message
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ImportCXFStateTests: BitwardenTestCase {
XCTAssertEqual(subject.message, Localizations.pleaseDoNotCloseTheApp)

subject.status = .success(totalImportedCredentials: 1, importedResults: [])
XCTAssertEqual(subject.message, Localizations.itemsSuccessfullyImported(1))
XCTAssertEqual(subject.message, Localizations.xItemsSuccessfullyImported(1))

subject.status = .failure(message: "Something went wrong")
XCTAssertEqual(subject.message, "Something went wrong")
Expand Down
4 changes: 1 addition & 3 deletions BitwardenShared/UI/Vault/Extensions/Alert+Vault.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,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(
Expand Down
4 changes: 2 additions & 2 deletions BitwardenShared/UI/Vault/Extensions/AlertVaultTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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)
Expand All @@ -62,7 +62,7 @@ class AlertVaultTests: BitwardenTestCase { // swiftlint:disable:this type_body_l
copyString,
"""
\(Localizations.decryptionError)
\(Localizations.bitwardenCouldNotDecryptOneVaultItemDescriptionLong)
\(Localizations.bitwardenCouldNotDecryptXVaultItemsDescriptionLong(1))

123abc
""",
Expand Down
Loading