diff --git a/core/Extensions/Lwk.swift b/core/Extensions/Lwk.swift index 8a4a5deff..e7fa58456 100644 --- a/core/Extensions/Lwk.swift +++ b/core/Extensions/Lwk.swift @@ -17,18 +17,18 @@ extension LwkError { switch self { case .Generic(msg: let msg): return msg.replacingOccurrences(of: "BoltzApi(HTTP(\"\\\"", with: "").replacingOccurrences(of: "\\\"\"))", with: "") - case .PoisonError(msg: let msg): - return "Poison Error \(msg)" + case .PoisonError(msg: _): + return "An internal error occurred. Please try again or contact support." case .MagicRoutingHint(_, _, _): - return "Magic Routing Hint" + return "A routing error occurred. Please try again." case .SwapExpired(_, _): - return "Swap Expired" + return "This swap has expired. Please start a new one." case .NoBoltzUpdate: - return "No Boltz Update" + return "The swap service is not responding. Please try again later." case .ObjectConsumed: - return "Object Consumed" - case .BoltzBackendHttpError(status: let status, error: let error): - return "Http error \(status): \(error ?? "")" + return "An internal error occurred. Please restart the app and try again." + case .BoltzBackendHttpError(status: let status, error: _): + return "A server error occurred (code \(status)). Please try again later." } } } diff --git a/gaios/Extensions/Error.swift b/gaios/Extensions/Error.swift index cce2d077e..df853554b 100644 --- a/gaios/Extensions/Error.swift +++ b/gaios/Extensions/Error.swift @@ -21,15 +21,15 @@ extension Error { case HWError.Abort(let txt), HWError.Declined(let txt): return txt case HWError.Disconnected(_): - return "id_disconnect" + return "id_your_device_was_disconnected" case .URLError: return "id_invalid_url" case .InvalidResponse: - return "Invalid Response" + return "id_invalid_response" case .NoNewFirmwareFound: - return "Firmware up to date" + return "id_firmware_up_to_date" case .Rebooted(_): - return "Device rebooted, waiting to reconnect" + return "id_device_rebooted_reconnecting" } } if let swError = self as? BleLedgerConnection.SWError { @@ -50,7 +50,7 @@ extension Error { case LoginError.hostUnblindingDisabled(let txt): return txt ?? "id_operation_failure" case LoginError.walletMismatch( _): - return "Wallet mismatch" + return "id_wallet_mismatch" case LoginError.walletsJustRestored(_): return "id_wallet_already_restored" case LoginError.invalidMnemonic(_): @@ -60,15 +60,15 @@ extension Error { if let gdkError = self as? GaError { switch gdkError { case GaError.NotAuthorizedError: - return "Not Authorized Error" + return "id_not_authorized" case GaError.GenericError(let txt): return txt ?? "id_operation_failure" case .ReconnectError: - return "Reconnect Error" + return "id_reconnect_error" case .SessionLost: - return "Session Error" + return "id_session_expired" case .TimeoutError: - return "Timeout Error" + return "id_timeout" } } if let resolverError = self as? TwoFactorCallError { @@ -90,28 +90,28 @@ extension Error { } } if let breezError = self as? BreezSDK.SdkError { - return breezError.description() ?? "Sdk error" + return breezError.description() ?? "id_operation_failure" } if let breezError = self as? BreezSDK.SendOnchainError { - return breezError.description() ?? "Send onchain error" + return breezError.description() ?? "id_operation_failure" } if let breezError = self as? BreezSDK.SendPaymentError { - return breezError.description() ?? "Send payment error" + return breezError.description() ?? "id_operation_failure" } if let breezError = self as? BreezSDK.ReceiveOnchainError { - return breezError.description() ?? "Receive onchain error" + return breezError.description() ?? "id_operation_failure" } if let breezError = self as? BreezSDK.ReceivePaymentError { - return breezError.description() ?? "Receive payment error" + return breezError.description() ?? "id_operation_failure" } if let breezError = self as? BreezSDK.LnUrlPayError { return breezError.description() ?? "id_operation_failure" } if let breezError = self as? BreezSDK.LnUrlAuthError { - return breezError.description() ?? "LN url auth error" + return breezError.description() ?? "id_operation_failure" } if let breezError = self as? BreezSDK.ConnectError { - return breezError.description() ?? "Connection error" + return breezError.description() ?? "id_connection_failed" } if let error = self as? LwkError { return error.description() diff --git a/gaios/Sendflow/Flow/Error/SendFlowError.swift b/gaios/Sendflow/Flow/Error/SendFlowError.swift index d3fccd24c..2ebf2c2dc 100644 --- a/gaios/Sendflow/Flow/Error/SendFlowError.swift +++ b/gaios/Sendflow/Flow/Error/SendFlowError.swift @@ -22,7 +22,7 @@ enum SendFlowError: Error, Sendable, Equatable { case .invalidPaymentTarget: return "id_invalid_address" case .failedToBuildTransaction: - return "Failed to build transaction" + return "id_failed_to_build_transaction" case .wrongSubaccount: return "id_invalid_address" case .wrongAssetId(let ticker): @@ -30,11 +30,11 @@ enum SendFlowError: Error, Sendable, Equatable { case .insufficientFunds: return "id_insufficient_funds" case .invalidSession: - return "Invalid session" + return "id_invalid_session" case .generic(let msg): return msg.localized case .serviceUnavailable: - return "Service temporary unavailable" + return "id_service_temporarily_unavailable" case .gdkError(let msg): return msg.localized case .invalidAmount(let msg): diff --git a/gaios/en.lproj/Localizable.strings b/gaios/en.lproj/Localizable.strings index a8ceda01a..ad4dca9df 100644 --- a/gaios/en.lproj/Localizable.strings +++ b/gaios/en.lproj/Localizable.strings @@ -131,8 +131,8 @@ "id_amp_accounts_are_only_available" = "AMP accounts are only available on Liquid wallets. You may be required to provide your account ID to issuers to receive an AMP Asset."; "id_amp_id" = "AMP ID"; "id_amp_wallet" = "AMP Wallet"; -"id_an_unidentified_error_occured" = "An unidentified error occured. The following error log can help you identify the issue:"; -"id_an_unidentified_error_occurred" = "An unidentified error occurred. The following error log can help you identify the issue:\n\n%@"; +"id_an_unidentified_error_occured" = "An unexpected error occurred. The following error log may help identify the issue:"; +"id_an_unidentified_error_occurred" = "An unexpected error occurred. The following error log may help identify the issue:\n\n%@"; "id_another_2fa_method_is_already" = "Another 2FA method is already active. Confirm via 2FA that you authorize this change."; "id_any_wallet_found_will_be" = "Any wallet found will be displayed here."; "id_app_access" = "APP ACCESS"; @@ -165,7 +165,7 @@ "id_authenticate_to_view_the" = "Authenticate to view the recovery phrase"; "id_authenticate_your_jade" = "Authenticate your Jade"; "id_authentication_error_s" = "Authentication error: %@"; -"id_authentication_failed" = "Authentication failed"; +"id_authentication_failed" = "Authentication failed. Please try again."; "id_authentication_successful" = "Authentication Successful"; "id_authenticator_app" = "Authenticator app"; "id_authenticator_qr_code" = "Authenticator QR Code"; @@ -349,8 +349,8 @@ "id_connection" = "Connection"; "id_connection_attempt_to_s" = "Connection attempt to: %@"; "id_connection_blocked" = "Connection Blocked"; -"id_connection_failed" = "Connection failed"; -"id_connection_to_device_failed" = "Connection to device failed! Move closer to the device and try again."; +"id_connection_failed" = "Unable to connect. Please check your internet connection and try again."; +"id_connection_to_device_failed" = "Could not connect to your device. Make sure it is nearby and powered on, then try again."; "id_contact_support" = "Contact Support"; "id_contact_support_at_s_or_visit_s" = "Contact support at %@ or visit %@"; "id_contact_us" = "Contact Us"; @@ -379,8 +379,8 @@ "id_copy_xpub" = "Copy xpub"; "id_copying" = "Copying..."; "id_correct_order" = "correct order"; -"id_could_not_recognized_qr_code" = "Could not recognized QR code"; -"id_could_not_recognized_the_uri" = "Could not recognized the URI"; +"id_could_not_recognized_qr_code" = "Could not recognize this QR code. Please try scanning again."; +"id_could_not_recognized_the_uri" = "Could not recognize this payment link. Please check and try again."; "id_country" = "Country"; "id_create" = "Create"; "id_create_a_bitcoin_2fa_protected" = "Create a Bitcoin 2FA protected account"; @@ -425,7 +425,7 @@ "id_day" = "day"; "id_days" = "days"; "id_days_remaining_s" = "Days remaining: %@"; -"id_decoding_error_try_again_by" = "Decoding error: try again by scanning the QR code with Jade"; +"id_decoding_error_try_again_by" = "The QR code could not be read. Please try scanning it again with your Jade."; "id_default_custom_fee_rate" = "Default custom fee rate"; "id_default_transaction_priority" = "Default transaction priority"; "id_delete" = "Delete"; @@ -443,6 +443,7 @@ "id_details" = "Details"; "id_device" = "Device"; "id_device_access_using_faceid" = "Device access using FaceID."; +"id_device_rebooted_reconnecting" = "Your device has restarted. Please wait while it reconnects."; "id_device_access_using_touchid" = "Device access using TouchID."; "id_devices" = "Devices"; "id_different_passphrases_generate" = "Different passphrases generate new wallets!\n\nRemember you can only restore this wallet with both your recovery phrase and the passphrase."; @@ -562,11 +563,11 @@ "id_entity" = "Entity"; "id_ephemeral_wallets" = "Ephemeral wallets"; "id_error" = "Error"; -"id_error_logging_in_with_hardware" = "Error logging in with Hardware Wallet"; +"id_error_logging_in_with_hardware" = "Unable to log in with your hardware wallet. Make sure it is connected and unlocked, then try again."; "id_error_nfc_tag_not_writable" = "Error: NFC tag not writable"; "id_error_nfc_tag_too_small" = "Error: NFC tag too small"; -"id_error_passphrases_do_not_match" = "Error: passphrases do not match"; -"id_error_setting_fee_rate" = "Error setting Fee Rate"; +"id_error_passphrases_do_not_match" = "The passphrases you entered do not match. Please try again."; +"id_error_setting_fee_rate" = "The fee rate could not be set. Please enter a valid fee rate."; "id_establishing_session" = "Establishing session"; "id_estimated_blocks_until" = "Estimated blocks until confirmation: %d"; "id_everything_you_need_to_take" = "Everything you need to take control of your bitcoin."; @@ -592,9 +593,10 @@ "id_extended_public_keys" = "Extended Public Keys"; "id_face_id" = "Face ID"; "id_faceid" = "FaceID"; -"id_failed" = "Failed"; -"id_failed_to_load_asset_icons" = "Failed to load asset icons"; -"id_failed_to_load_asset_registry" = "Failed to Load Asset Registry"; +"id_failed" = "The operation could not be completed. Please try again."; +"id_failed_to_build_transaction" = "Your transaction could not be prepared. Please check the details and try again."; +"id_failed_to_load_asset_icons" = "Asset icons could not be loaded. They will appear after your next connection."; +"id_failed_to_load_asset_registry" = "The asset registry could not be loaded. Please check your connection and try again."; "id_fast" = "Fast"; "id_fast_transactions_on_the" = "Fast transactions on the Lightning Network, powered by Greenlight."; "id_faster_more_confidential" = "Faster, more confidential Bitcoin transactions"; @@ -621,7 +623,7 @@ "id_firmware_up_to_date" = "Firmware up to date"; "id_firmware_update" = "Firmware Update"; "id_firmware_update_completed" = "Firmware update completed"; -"id_firmware_update_failed" = "Firmware update failed"; +"id_firmware_update_failed" = "The firmware update could not be completed. Please try again. If the issue persists, contact support."; "id_firmware_upgrade" = "Firmware Upgrade"; "id_firmware_version_s" = "Firmware Version: %@"; "id_follow_the_instructions_of_your" = "Follow the instructions of your hardware wallet before continuing."; @@ -756,35 +758,36 @@ "id_install_version_s" = "Install version: %@?"; "id_instant" = "Instant"; "id_instant_recovery" = "Instant recovery"; -"id_insufficient_funds" = "Insufficient funds"; +"id_insufficient_funds" = "You don't have enough funds for this transaction."; "id_insufficient_lbtc_for_fees" = "Insufficient LBTC for fees"; "id_insufficient_lbtc_to_send_a" = "Insufficient LBTC to send a transaction. In Liquid, LBTC are needed to pay transaction fees. Generate an address to receive LBTC"; -"id_invalid_address" = "Invalid address"; -"id_invalid_amount" = "Invalid amount"; +"id_invalid_address" = "The address you entered is not valid. Please check and try again."; +"id_invalid_amount" = "The amount you entered is not valid. Please check and try again."; "id_invalid_asset_id" = "Invalid Asset ID"; -"id_invalid_clipboard_contents" = "Invalid clipboard contents"; +"id_invalid_clipboard_contents" = "The clipboard does not contain a valid address or payment request."; "id_invalid_merkle_proof" = "Invalid Merkle proof"; -"id_invalid_mnemonic" = "Invalid mnemonic"; +"id_invalid_mnemonic" = "The recovery phrase you entered is not valid. Please check and try again."; "id_invalid_mnemonic_continue" = "Invalid mnemonic. Continue typing or ask for help"; "id_invalid_mnemonic_must_be_24_or" = "Invalid mnemonic (must be 24 or 27 words)"; "id_invalid_network_configuration" = "Invalid network configuration"; "id_invalid_payment_request_assetid" = "Invalid payment request, AssetID has to be specified"; "id_invalid_pgp_key" = "Invalid PGP key"; "id_invalid_phone_number_format" = "Invalid phone number format"; -"id_invalid_pin" = "Invalid PIN"; +"id_invalid_pin" = "The PIN you entered is incorrect."; "id_invalid_pin_remaining_attempts" = "Invalid PIN. Remaining attempts: %1$d."; "id_invalid_pin_you_dont_have_any" = "Invalid PIN, you don't have any attempts left. Please log in using your mnemonic."; "id_invalid_pin_you_have_1d" = "Invalid PIN, you have %1$d attempts left"; "id_invalid_private_key" = "Invalid private key"; -"id_invalid_psbt" = "Invalid psbt"; -"id_invalid_recovery_phrase" = "Invalid recovery phrase"; -"id_invalid_replacement_fee_rate" = "Invalid replacement fee rate"; -"id_invalid_session" = "Invalid session"; +"id_invalid_psbt" = "The transaction data (PSBT) is not valid. Please check and try again."; +"id_invalid_recovery_phrase" = "The recovery phrase you entered is not valid. Please check and try again."; +"id_invalid_response" = "Received an unexpected response. Please try again."; +"id_invalid_replacement_fee_rate" = "The replacement fee rate is not valid. It must be higher than the original fee."; +"id_invalid_session" = "Your session is no longer valid. Please log in again."; "id_invalid_spv" = "Invalid SPV"; -"id_invalid_status_check_that_your" = "Invalid status. Check that your device is unlocked and try again."; +"id_invalid_status_check_that_your" = "Your device may be locked or unresponsive. Please unlock it and try again."; "id_invalid_subaccount" = "Invalid subaccount"; -"id_invalid_swap_proposal" = "Invalid swap proposal"; -"id_invalid_twofactor_code" = "Invalid Two-Factor code"; +"id_invalid_swap_proposal" = "This swap could not be processed. Please try again or contact support."; +"id_invalid_twofactor_code" = "The two-factor authentication code you entered is incorrect. Please try again."; "id_invalid_url" = "Invalid URL"; "id_invalid_xpub" = "Invalid xpub"; "id_invoice" = "Invoice"; @@ -880,7 +883,7 @@ "id_logged_in_wallets" = "Logged in wallets"; "id_logging_in" = "Logging in…"; "id_logging_out" = "Logging out…"; -"id_login_failed" = "Login Failed"; +"id_login_failed" = "Unable to log in. Please check your credentials and try again."; "id_login_options" = "Login options"; "id_logout" = "Logout"; "id_logout_and_switch" = "Logout and Switch"; @@ -999,6 +1002,7 @@ "id_nonconfidential_addresses_not" = "Non-confidential addresses not supported"; "id_noradio_firmware" = "No-radio firmware"; "id_normal" = "Normal"; +"id_not_authorized" = "You are not authorized to perform this action. Please log in again."; "id_not_a_valid_email_address" = "Not a valid email address"; "id_not_a_valid_phone_number" = "Not a valid phone number"; "id_not_a_valid_word" = "Not a valid word"; @@ -1039,7 +1043,7 @@ "id_open_permissions" = "Open Permissions"; "id_open_settings" = "Open Settings"; "id_open_wallet_to_receive_a_payment" = "Open wallet to receive a payment"; -"id_operation_failure" = "Operation failure"; +"id_operation_failure" = "Something went wrong. Please try again or contact support if the issue persists."; "id_optimal_if_you_rarely_spend" = "Optimal if you rarely spend coins. Wallet coins will require two-factor reactivation every 455 days to remain protected by two-factor authentication"; "id_optimal_if_you_spend_coins" = "Optimal if you spend coins every 6 months. Wallet coins will require two-factor reactivation every 6 months to remain protected by two-factor authentication."; "id_optional" = "Optional"; @@ -1206,7 +1210,7 @@ "id_replaceable" = "replaceable"; "id_report" = "Report"; "id_request_amount" = "Request Amount"; -"id_request_failed" = "Request Failed"; +"id_request_failed" = "The request could not be completed. Please check your connection and try again."; "id_request_recovery_transactions" = "Request recovery transactions"; "id_request_sent" = "Request Sent"; "id_request_twofactor_reset" = "Request Two-Factor reset"; @@ -1325,7 +1329,10 @@ "id_sent" = "Sent"; "id_sent_to" = "Sent to"; "id_server_ip_and_port_ipport" = "Server IP and port (ip:port)"; +"id_reconnect_error" = "Connection was interrupted. Please check your internet and try again."; "id_service_not_available" = "Service not available"; +"id_service_temporarily_unavailable" = "This service is temporarily unavailable. Please try again later."; +"id_session_expired" = "Your session has expired. Please log in again."; "id_set_2fa_expiry" = "Set 2FA expiry"; "id_set_a_limit_to_spend_without" = "Set a limit to spend without two-factor authentication"; "id_set_a_new_pin" = "Set a new PIN"; @@ -1391,7 +1398,7 @@ "id_sign_transaction" = "Sign Transaction"; "id_sign_transaction_via_qr" = "Sign transaction via QR"; "id_signature" = "Signature"; -"id_signature_validation_failed_if" = "Signature validation failed. If this error is unexpected and has happened repeatedly, it is possible the hardware wallet is faulty or has been compromised. It could be leaking your keys, which could lead to loss of funds. Please consider replacing the hardware wallet."; +"id_signature_validation_failed_if" = "Signature validation failed. This may be a temporary communication issue. If this keeps happening, your hardware wallet may need to be replaced. Please contact support."; "id_signer_unlocked" = "Signer Unlocked"; "id_signing" = "Signing…"; "id_signup_in_progress" = "Signup in progress"; @@ -1534,7 +1541,7 @@ "id_this_will_log_you_out_and" = "This will log you out and delete this wallet from the app and the Blockstream servers database."; "id_ticker" = "Ticker"; "id_time_s" = "Time: %@"; -"id_timeout" = "Timeout"; +"id_timeout" = "The request timed out. Please check your internet connection and try again."; "id_tip_we_recommend_you_enable" = "Tip: We recommend you enable more than one 2FA method. If you only set up one 2FA method and then lose it, you'll have to wait at least one year until the 2FA expires."; "id_tip_you_can_use_the" = "Tip: You can use the xPub/yPub/zPub to view your watch-only wallet in Green, or you may import it to another platform. Each account in your wallet has a separate xPub/yPub/zPub."; "id_to" = "TO"; @@ -1566,7 +1573,7 @@ "id_transaction_confirmed_ss" = "Transaction Confirmed %@/%@"; "id_transaction_copied_to_clipboard" = "Transaction copied to clipboard"; "id_transaction_details" = "Transaction details"; -"id_transaction_failed" = "Transaction Failed"; +"id_transaction_failed" = "Your transaction could not be completed. Please try again."; "id_transaction_id" = "Transaction ID"; "id_transaction_sent" = "Transaction Sent"; "id_transaction_status" = "Transaction status"; @@ -1598,7 +1605,7 @@ "id_type_an_amount_between_s_and_s" = "Type an amount between %@ and %@. A minimum setup fee of %@ will be applied to the received amount."; "id_type_pin" = "Type PIN"; "id_type_the_next_word" = "Type the next word"; -"id_unable_to_contact_the_green" = "Unable to contact the Green service. Please check your network connection and wait to be reconnected."; +"id_unable_to_contact_the_green" = "Unable to reach the Blockstream server. Please check your internet connection and wait to be reconnected."; "id_unarchive" = "Unarchive"; "id_unarchive_account" = "Unarchive account"; "id_unblinding_data" = "Unblinding data"; @@ -1642,7 +1649,7 @@ "id_use_your_email_to_receive" = "Use your email to receive recovery transactions and transactions notifications"; "id_user_authentication" = "User Authentication"; "id_user_contact_info_ip_address" = "User contact info, IP address, detailed location"; -"id_user_not_found_or_invalid" = "User not found or invalid password"; +"id_user_not_found_or_invalid" = "The username or password you entered is incorrect."; "id_username" = "Username"; "id_username_not_available" = "Username not available"; "id_uuid_copied_to_clipboard" = "UUID copied to clipboard"; @@ -1679,11 +1686,12 @@ "id_wallet_assets" = "Wallet Assets"; "id_wallet_backup" = "Wallet Backup"; "id_wallet_coins_will_require" = "Wallet coins will require two-factor reactivation once a year to remain protected by two-factor authentication."; -"id_wallet_creation_failed" = "Wallet creation failed"; +"id_wallet_creation_failed" = "Your wallet could not be created. Please try again or contact support."; "id_wallet_details" = "Wallet Details"; "id_wallet_found" = "Wallet found"; +"id_wallet_mismatch" = "The wallet on this device does not match. Please check your recovery phrase."; "id_wallet_name" = "Wallet Name"; -"id_wallet_not_found" = "Wallet not found"; +"id_wallet_not_found" = "No wallet was found with the provided credentials. Please check and try again."; "id_wallet_overview" = "Wallet Overview"; "id_wallet_pockets" = "Wallet Pockets"; "id_wallet_settings" = "Wallet Settings"; diff --git a/hw/Ledger/BleLedgerConnection.swift b/hw/Ledger/BleLedgerConnection.swift index c203e4180..973011a5e 100644 --- a/hw/Ledger/BleLedgerConnection.swift +++ b/hw/Ledger/BleLedgerConnection.swift @@ -52,19 +52,19 @@ public class BleLedgerConnection: HWConnectionProtocol { case .SW_OK: return nil case .SW_INS_NOT_SUPPORTED: - return "Command not supported" + return "This command is not supported by your Ledger device." case .SW_WRONG_P1_P2: - return "Wrong package" + return "Communication error with your Ledger. Please try again." case .SW_INCORRECT_P1_P2: - return "Incorrect package" + return "Communication error with your Ledger. Please try again." case .SW_RECONNECT: - return "Reconnection required" + return "Your Ledger needs to reconnect. Please disconnect and reconnect it." case .SW_INVALID_STATUS: - return "Invalid status" + return "Your Ledger is in an unexpected state. Please unlock it and try again." case .SW_REJECTED: return "Transaction was rejected by user" case .SW_INVALID_PKG: - return "Invalid package" + return "Communication error with your Ledger. Please try again." case .SW_ABORT: return "Aborted operation" }