Skip to content

Commit

Permalink
Show separate messages for backupFailedAlreadyCreated and noActiveBac…
Browse files Browse the repository at this point in the history
…kup errors
  • Loading branch information
fedorov-d committed Apr 1, 2024
1 parent 24d07f5 commit 36fc852
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 2 deletions.
7 changes: 5 additions & 2 deletions TangemSdk/TangemSdk/Common/Core/TangemSdkError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,12 @@ public enum TangemSdkError: Error, LocalizedError, Encodable {
case .backupFailedNotEmptyWallets: return "error_backup_not_empty_wallets".localized
case .backupFailedWrongIssuer, .backupFailedHDWalletSettings, .backupFailedNotEnoughCurves,
.backupFailedNotEnoughWallets, .backupFailedFirmware, .backupNotAllowed,
.backupFailedIncompatibleBatch, .backupFailedIncompatibleFirmware, .backupFailedKeysImportSettings,
.backupFailedAlreadyCreated:
.backupFailedIncompatibleBatch, .backupFailedIncompatibleFirmware, .backupFailedKeysImportSettings:
return "error_backup_wrong_card".localized("\(self.code)")
case .backupFailedAlreadyCreated:
return "error_backup_failed_already_created".localized
case .noActiveBackup:
return "error_no_active_backup".localized
case .resetPinWrongCard:
return "error_reset_wrong_card".localized("\(self.code)")
case .oldCard: return "error_old_card".localized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"common_warning" = "Warning";
"error_already_created" = "Ein Wallet ist bereits erstellt worden";
"error_backup_card_already_added" = "This card has already been added to the list";
"error_backup_failed_already_created" = "This card cannot be used as a backup because it already contains a wallet. Ensure that no funds are stored on the card by scanning it in the app. Then, reset it to factory settings.";
"error_backup_not_empty_wallets" = "This card already has a wallet. If you want to proceed you have to reset it to factory settings first.";
"error_backup_wrong_card" = "This card can't be used as a backup card. Error code: %@.";
"error_card_verification_failed" = "Die Kartenverifizierung ist fehlgeschlagen";
"error_file_not_found" = "File not found";
"error_no_active_backup" = "The selected card cannot be used to reset the card access code, because there is no backup on it. Please contact support team.";
"error_old_card" = "Tangem cards issued before September 2019 cannot sign data using an iPhone due to iOS restrictions";
"error_pin_cannot_be_changed_format" = "%@ cannot be changed";
"error_pin_cannot_be_default_format" = "%@ cannot be changed to this value. Please, enter another one.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"common_warning" = "Warning";
"error_already_created" = "A wallet has already been created";
"error_backup_card_already_added" = "This card has already been added to the list";
"error_backup_failed_already_created" = "This card cannot be used as a backup because it already contains a wallet. Ensure that no funds are stored on the card by scanning it in the app. Then, reset it to factory settings.";
"error_backup_not_empty_wallets" = "This card already has a wallet. If you want to proceed you have to reset it to factory settings first.";
"error_backup_wrong_card" = "This card can't be used as a backup card. Error code: %@.";
"error_card_verification_failed" = "Card verification failed";
"error_file_not_found" = "File not found";
"error_no_active_backup" = "The selected card cannot be used to reset the card access code, because there is no backup on it. Please contact support team.";
"error_old_card" = "Tangem cards issued before September 2019 cannot sign data using an iPhone due to iOS restrictions";
"error_pin_cannot_be_changed_format" = "%@ cannot be changed";
"error_pin_cannot_be_default_format" = "%@ cannot be changed to this value. Please, enter another one.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"common_warning" = "Warning";
"error_already_created" = "Le portefeuille a déjà été créé";
"error_backup_card_already_added" = "This card has already been added to the list";
"error_backup_failed_already_created" = "This card cannot be used as a backup because it already contains a wallet. Ensure that no funds are stored on the card by scanning it in the app. Then, reset it to factory settings.";
"error_backup_not_empty_wallets" = "This card already has a wallet. If you want to proceed you have to reset it to factory settings first.";
"error_backup_wrong_card" = "This card can't be used as a backup card. Error code: %@.";
"error_card_verification_failed" = "Erreur de validation de la carte";
"error_file_not_found" = "File not found";
"error_no_active_backup" = "The selected card cannot be used to reset the card access code, because there is no backup on it. Please contact support team.";
"error_old_card" = "Tangem cards issued before September 2019 cannot sign data using an iPhone due to iOS restrictions";
"error_pin_cannot_be_changed_format" = "%@ cannot be changed";
"error_pin_cannot_be_default_format" = "%@ cannot be changed to this value. Please, enter another one.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"common_warning" = "Warning";
"error_already_created" = "Portafoglio già creato";
"error_backup_card_already_added" = "This card has already been added to the list";
"error_backup_failed_already_created" = "This card cannot be used as a backup because it already contains a wallet. Ensure that no funds are stored on the card by scanning it in the app. Then, reset it to factory settings.";
"error_backup_not_empty_wallets" = "This card already has a wallet. If you want to proceed you have to reset it to factory settings first.";
"error_backup_wrong_card" = "This card can't be used as a backup card. Error code: %@.";
"error_card_verification_failed" = "Non è stata eseguita la verifica della carta";
"error_file_not_found" = "File not found";
"error_no_active_backup" = "The selected card cannot be used to reset the card access code, because there is no backup on it. Please contact support team.";
"error_old_card" = "Tangem cards issued before September 2019 cannot sign data using an iPhone due to iOS restrictions";
"error_pin_cannot_be_changed_format" = "%@ cannot be changed";
"error_pin_cannot_be_default_format" = "%@ cannot be changed to this value. Please, enter another one.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"common_warning" = "Предупреждение";
"error_already_created" = "Кошелек уже создан";
"error_backup_card_already_added" = "Эта карта уже добавлена в список";
"error_backup_failed_already_created" = "Резервное копирование не возможно, на выбранной карте уже создан кошелек. Пожалуйста, убедитесь, что на этой карте нет средств, отсканировав её в приложении, и затем сбросьте её до заводских настроек.";
"error_backup_not_empty_wallets" = "На этой карте уже создан кошелёк. Если вы хотите продолжить, сбросьте карту к заводским настройкам.";
"error_backup_wrong_card" = "Эту карту нельзя использовать для резервного копирования. Код ошибки: %@.";
"error_card_verification_failed" = "Ошибка проверки карты";
"error_file_not_found" = "Файл не найден";
"error_no_active_backup" = "Выбранная карта не может использоваться для сброса кода доступа карты, т.к. на ней нет резервного копирования. Обратитесь, пожалуйста, в поддержку.";
"error_old_card" = "Карты Tangem, выпущенные до сентября 2019 года, не могут подписывать данные с помощью iPhone из-за ограничений iOS.";
"error_pin_cannot_be_changed_format" = "%@ не может быть изменен";
"error_pin_cannot_be_default_format" = "%@ нельзя изменить на это значение. Пожалуйста, введите другое";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"common_warning" = "警告";
"error_already_created" = "已創建錢包";
"error_backup_card_already_added" = "此卡已添加到列表中";
"error_backup_failed_already_created" = "This card cannot be used as a backup because it already contains a wallet. Ensure that no funds are stored on the card by scanning it in the app. Then, reset it to factory settings.";
"error_backup_not_empty_wallets" = "這張卡已經有錢包了。如果要繼續,您必須先將其重置為出廠設置";
"error_backup_wrong_card" = "此卡不能作為備用卡使用。錯誤代碼:%@。";
"error_card_verification_failed" = "卡驗證失敗";
"error_file_not_found" = "文件未找到";
"error_no_active_backup" = "The selected card cannot be used to reset the card access code, because there is no backup on it. Please contact support team.";
"error_old_card" = "由於 iOS 限制,2019 年 9 月之前發行的 Tangem 卡無法使用 iPhone 簽署數據";
"error_pin_cannot_be_changed_format" = "%@ 無法更改";
"error_pin_cannot_be_default_format" = "%@ 不能更改為此值。 請輸入另一個";
Expand Down

0 comments on commit 36fc852

Please sign in to comment.