From 2b060d958006ab97687271a0bf66e934b76128b6 Mon Sep 17 00:00:00 2001 From: weatherstar Date: Wed, 8 May 2024 19:57:07 +0800 Subject: [PATCH] chore: update locale --- packages/components/src/locale/ar.json | 2 ++ packages/components/src/locale/bn.json | 2 ++ packages/components/src/locale/de.json | 2 ++ packages/components/src/locale/en-US.json | 2 ++ packages/components/src/locale/es.json | 2 ++ packages/components/src/locale/fil.json | 2 ++ packages/components/src/locale/fr_FR.json | 2 ++ packages/components/src/locale/hi_IN.json | 2 ++ packages/components/src/locale/id.json | 2 ++ packages/components/src/locale/it_IT.json | 2 ++ packages/components/src/locale/ja_JP.json | 2 ++ packages/components/src/locale/ko_KR.json | 2 ++ packages/components/src/locale/mn_MN.json | 2 ++ packages/components/src/locale/pt.json | 2 ++ packages/components/src/locale/pt_BR.json | 2 ++ packages/components/src/locale/ru.json | 2 ++ packages/components/src/locale/th_TH.json | 4 +++- packages/components/src/locale/uk_UA.json | 2 ++ packages/components/src/locale/vi.json | 2 ++ packages/components/src/locale/zh-CN.json | 2 ++ packages/components/src/locale/zh_HK.json | 2 ++ packages/engine/src/types/account.ts | 1 + .../src/vaults/impl/dynex/KeyringHardware.ts | 2 +- packages/engine/src/vaults/impl/dynex/Vault.ts | 6 +++--- packages/engine/src/vaults/impl/dynex/settings.ts | 4 ++-- .../AccountInfo/accountInfoConstants.ts | 14 ++++++++++++++ .../src/views/ManagerAccount/AccountInfo/index.tsx | 3 ++- 27 files changed, 66 insertions(+), 8 deletions(-) diff --git a/packages/components/src/locale/ar.json b/packages/components/src/locale/ar.json index 6108cc1dd48..03a50ff15a6 100644 --- a/packages/components/src/locale/ar.json +++ b/packages/components/src/locale/ar.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "تبادل أي رموز", "content__existing": "موجود", "content__exit_value": "قيمة الخروج", + "content__export_tracking_key": "تصدير مفتاح التتبع", + "content__export_tracking_key_desc": "يتم استخدام مفتاح التتبع لإنشاء دليل على الأصول.", "content__ext_metamask_tutorials_1": "انقر على الصورة الرمزية في الشريط العلوي", "content__external_account": "الحسابات الخارجية", "content__face_id": "معرف الوجه", diff --git a/packages/components/src/locale/bn.json b/packages/components/src/locale/bn.json index fe631997984..2e8c60424a1 100644 --- a/packages/components/src/locale/bn.json +++ b/packages/components/src/locale/bn.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "যেকোনো টোকেন বিনিময় করুন", "content__existing": "বিদ্যমান", "content__exit_value": "প্রস্থান মান", + "content__export_tracking_key": "এক্সপোর্ট ট্র্যাকিং কী", + "content__export_tracking_key_desc": "ট্র্যাকিং কী ব্যবহার করা হয় সম্পদের প্রমাণ তৈরি করার জন্য।", "content__ext_metamask_tutorials_1": "উপরের বারে Avatar-এ ক্লিক করুন", "content__external_account": "বাহ্যিক অ্যাকাউন্ট", "content__face_id": "ফেস আইডি", diff --git a/packages/components/src/locale/de.json b/packages/components/src/locale/de.json index d6fb2037f32..1fb581d2977 100644 --- a/packages/components/src/locale/de.json +++ b/packages/components/src/locale/de.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Tauschen Sie alle Token aus", "content__existing": "Vorhandenen", "content__exit_value": "Ausgangswert", + "content__export_tracking_key": "Tracking-Schlüssel exportieren", + "content__export_tracking_key_desc": "Der Tracking-Schlüssel wird zum Generieren von Vermögensnachweisen verwendet.", "content__ext_metamask_tutorials_1": "Klicken Sie auf den Avatar in der oberen Leiste", "content__external_account": "Externe Konten", "content__face_id": "Gesichts-ID", diff --git a/packages/components/src/locale/en-US.json b/packages/components/src/locale/en-US.json index cb818c20c70..7d196a26207 100644 --- a/packages/components/src/locale/en-US.json +++ b/packages/components/src/locale/en-US.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Exchange any tokens", "content__existing": "Existing", "content__exit_value": "Exit Value", + "content__export_tracking_key": "Export Tracking Key", + "content__export_tracking_key_desc": "Tracking Key is used for generating proof of assets.", "content__ext_metamask_tutorials_1": "Click on the Avatar in the Top bar", "content__external_account": "External Accounts", "content__face_id": "Face ID", diff --git a/packages/components/src/locale/es.json b/packages/components/src/locale/es.json index e507c4c890f..ed6edd8711b 100644 --- a/packages/components/src/locale/es.json +++ b/packages/components/src/locale/es.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Intercambia cualquier token", "content__existing": "Existente", "content__exit_value": "Valor de salida", + "content__export_tracking_key": "Clave de seguimiento de exportaciones", + "content__export_tracking_key_desc": "La clave de seguimiento se utiliza para generar pruebas de activos.", "content__ext_metamask_tutorials_1": "Haz clic en el Avatar en la barra superior", "content__external_account": "Cuentas externas", "content__face_id": "Face ID", diff --git a/packages/components/src/locale/fil.json b/packages/components/src/locale/fil.json index 25044e91c7e..cd23b226259 100644 --- a/packages/components/src/locale/fil.json +++ b/packages/components/src/locale/fil.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Palitan ng anumang mga token", "content__existing": "Umiiral", "content__exit_value": "Exit Value", + "content__export_tracking_key": "I-export ang Tracking Key", + "content__export_tracking_key_desc": "Ginagamit ang Tracking Key para sa pagbuo ng patunay ng mga asset.", "content__ext_metamask_tutorials_1": "Mag-click sa Avatar sa Top bar", "content__external_account": "Mga Panlabas na Account", "content__face_id": "Face ID", diff --git a/packages/components/src/locale/fr_FR.json b/packages/components/src/locale/fr_FR.json index 52ef300946e..5be11850e24 100644 --- a/packages/components/src/locale/fr_FR.json +++ b/packages/components/src/locale/fr_FR.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Échangez des jetons", "content__existing": "Existant", "content__exit_value": "Valeur de sortie", + "content__export_tracking_key": "Clé de suivi des exportations", + "content__export_tracking_key_desc": "La clé de suivi est utilisée pour générer une preuve d’actifs.", "content__ext_metamask_tutorials_1": "Cliquez sur l'avatar dans la barre supérieure", "content__external_account": "Comptes externes", "content__face_id": "Identification faciale", diff --git a/packages/components/src/locale/hi_IN.json b/packages/components/src/locale/hi_IN.json index 5ef0da949fd..d98e27a6f50 100644 --- a/packages/components/src/locale/hi_IN.json +++ b/packages/components/src/locale/hi_IN.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "किसी भी टोकन का आदान-प्रदान करें", "content__existing": "मौजूदा", "content__exit_value": "बाहर निकलें मूल्य", + "content__export_tracking_key": "ट्रैकिंग कुंजी निर्यात करें", + "content__export_tracking_key_desc": "ट्रैकिंग कुंजी का उपयोग परिसंपत्तियों का प्रमाण तैयार करने के लिए किया जाता है।", "content__ext_metamask_tutorials_1": "टॉप बार में अवतार पर क्लिक करें", "content__external_account": "बाहरी खाते", "content__face_id": "फेस आईडी", diff --git a/packages/components/src/locale/id.json b/packages/components/src/locale/id.json index 5da2dcc255d..5146389c325 100644 --- a/packages/components/src/locale/id.json +++ b/packages/components/src/locale/id.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Tukarkan token apa pun", "content__existing": "Ada", "content__exit_value": "Nilai Keluar", + "content__export_tracking_key": "Ekspor Kunci Pelacakan", + "content__export_tracking_key_desc": "Kunci Pelacakan digunakan untuk menghasilkan bukti aset.", "content__ext_metamask_tutorials_1": "Klik pada Avatar di bilah Atas", "content__external_account": "Akun Eksternal", "content__face_id": "ID wajah", diff --git a/packages/components/src/locale/it_IT.json b/packages/components/src/locale/it_IT.json index f53134ccc39..aecf9a1630a 100644 --- a/packages/components/src/locale/it_IT.json +++ b/packages/components/src/locale/it_IT.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Scambia qualsiasi token", "content__existing": "Esistente", "content__exit_value": "Valore di uscita", + "content__export_tracking_key": "Chiave di tracciamento dell'esportazione", + "content__export_tracking_key_desc": "La chiave di tracciamento viene utilizzata per generare prove delle risorse.", "content__ext_metamask_tutorials_1": "Fare clic sull'Avatar nella barra in alto", "content__external_account": "Conti esterni", "content__face_id": "ID viso", diff --git a/packages/components/src/locale/ja_JP.json b/packages/components/src/locale/ja_JP.json index acfda820e6b..1597bcfbd2f 100644 --- a/packages/components/src/locale/ja_JP.json +++ b/packages/components/src/locale/ja_JP.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "任意のトークンを交換する", "content__existing": "既に存在", "content__exit_value": "終了値", + "content__export_tracking_key": "エクスポートトラッキングキー", + "content__export_tracking_key_desc": "トラッキングキーは、資産の証明を生成するために使用されます。", "content__ext_metamask_tutorials_1": "トップバーのアバターをクリック", "content__external_account": "外部アカウント", "content__face_id": "顔認証", diff --git a/packages/components/src/locale/ko_KR.json b/packages/components/src/locale/ko_KR.json index 545dd5ccbf0..ffcd478e379 100644 --- a/packages/components/src/locale/ko_KR.json +++ b/packages/components/src/locale/ko_KR.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "모든 토큰 교환", "content__existing": "기존의", "content__exit_value": "종료 값", + "content__export_tracking_key": "추적 키 내보내기", + "content__export_tracking_key_desc": "추적 키는 자산 증명을 생성하는 데 사용됩니다.", "content__ext_metamask_tutorials_1": "상단 표시줄에서 아바타를 클릭합니다.", "content__external_account": "외부 계정", "content__face_id": "페이스 아이디", diff --git a/packages/components/src/locale/mn_MN.json b/packages/components/src/locale/mn_MN.json index af1bea999de..3a16f79c10a 100644 --- a/packages/components/src/locale/mn_MN.json +++ b/packages/components/src/locale/mn_MN.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Аливаа жетон солилцох", "content__existing": "Одоо байгаа", "content__exit_value": "Утга гарах", + "content__export_tracking_key": "Экспортын хяналтын түлхүүр", + "content__export_tracking_key_desc": "Хяналтын түлхүүрийг хөрөнгийн нотлох баримт бүрдүүлэхэд ашигладаг.", "content__ext_metamask_tutorials_1": "Дээд талбар дахь Аватар дээр дарна уу", "content__external_account": "Гадаад дансууд", "content__face_id": "Нүүрний ID", diff --git a/packages/components/src/locale/pt.json b/packages/components/src/locale/pt.json index 2a0ab57bf38..650163c3f42 100644 --- a/packages/components/src/locale/pt.json +++ b/packages/components/src/locale/pt.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Troque qualquer token", "content__existing": "Existir", "content__exit_value": "Valor de saída", + "content__export_tracking_key": "Chave de rastreamento de exportação", + "content__export_tracking_key_desc": "A chave de rastreamento é usada para gerar prova de ativos.", "content__ext_metamask_tutorials_1": "Clique no Avatar na barra superior", "content__external_account": "Contas externas", "content__face_id": "ID de rosto", diff --git a/packages/components/src/locale/pt_BR.json b/packages/components/src/locale/pt_BR.json index 76e0c094dcd..c82ffa41879 100644 --- a/packages/components/src/locale/pt_BR.json +++ b/packages/components/src/locale/pt_BR.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Trocar qualquer token", "content__existing": "Existente", "content__exit_value": "Valor de saída", + "content__export_tracking_key": "Chave de rastreamento de exportação", + "content__export_tracking_key_desc": "A chave de rastreamento é usada para gerar prova de ativos.", "content__ext_metamask_tutorials_1": "Clique no Avatar na barra superior", "content__external_account": "Contas externas", "content__face_id": "ID facial", diff --git a/packages/components/src/locale/ru.json b/packages/components/src/locale/ru.json index 3b9b45892cb..f68f6e12176 100644 --- a/packages/components/src/locale/ru.json +++ b/packages/components/src/locale/ru.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Обмен любых токенов", "content__existing": "Существующий", "content__exit_value": "Выходное значение", + "content__export_tracking_key": "Экспортировать ключ отслеживания", + "content__export_tracking_key_desc": "Ключ отслеживания используется для создания подтверждения активов.", "content__ext_metamask_tutorials_1": "Нажмите на аватарку в верхней панели", "content__external_account": "Внешние аккаунты", "content__face_id": "Идентификатор лица", diff --git a/packages/components/src/locale/th_TH.json b/packages/components/src/locale/th_TH.json index 7e8dad10cc0..dbac9345c3f 100644 --- a/packages/components/src/locale/th_TH.json +++ b/packages/components/src/locale/th_TH.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "แลกเปลี่ยนโทเค็นใด ๆ", "content__existing": "ที่มีอยู่เดิม", "content__exit_value": "ค่าทางออก", + "content__export_tracking_key": "ส่งออกคีย์การติดตาม", + "content__export_tracking_key_desc": "รหัสติดตามใช้ในการสร้างหลักฐานสินทรัพย์", "content__ext_metamask_tutorials_1": "คลิกที่รูปอวาตาร์ในแถบด้านบน", "content__external_account": "บัญชีภายนอก", "content__face_id": "รหัสประจำตัว", @@ -670,7 +672,7 @@ "content__hardware_wallet_does_not_support_str_yet": "Hardware wallet ยังไม่รองรับ {0}", "content__hardware_wallets_do_not_support_this_feature": "ไม่รองรับ Hardware Wallet", "content__hardware_wallets_do_not_support_this_feature_desc": "ฟีเจอร์นี้ใช้ได้เฉพาะกับการชำระเงินด่วนของแอพวอลเล็ต ฮาร์ดแวร์วอลเล็ทยังคงต้องการการยืนยันจากฮาร์ดแวร์", - "content__hash": "กัญชา", + "content__hash": "แฮช", "content__have_been_connected": "เชื่อมต่อก่อนหน้านี้", "content__have_you_been_spared_this_year_we_hope_you_re_the": "ปีนี้คุณรอดแล้วหรือยัง?\n เราหวังว่าคุณจะเป็น...", "content__height": "ส่วนสูง", diff --git a/packages/components/src/locale/uk_UA.json b/packages/components/src/locale/uk_UA.json index 8ae917bc42a..d9032cd8ce6 100644 --- a/packages/components/src/locale/uk_UA.json +++ b/packages/components/src/locale/uk_UA.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Обміняйте будь-які токени", "content__existing": "Існуючий", "content__exit_value": "Значення виходу", + "content__export_tracking_key": "Ключ відстеження експорту", + "content__export_tracking_key_desc": "Ключ відстеження використовується для створення підтвердження активів.", "content__ext_metamask_tutorials_1": "Натисніть на аватар у верхній панелі", "content__external_account": "Зовнішні облікові записи", "content__face_id": "Face ID", diff --git a/packages/components/src/locale/vi.json b/packages/components/src/locale/vi.json index 5468bdbf823..86c748d9171 100644 --- a/packages/components/src/locale/vi.json +++ b/packages/components/src/locale/vi.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "Trao đổi bất kỳ mã thông báo nào", "content__existing": "Hiện có", "content__exit_value": "Giá trị thoát", + "content__export_tracking_key": "Xuất khóa theo dõi", + "content__export_tracking_key_desc": "Khóa theo dõi được sử dụng để tạo bằng chứng về tài sản.", "content__ext_metamask_tutorials_1": "Nhấp vào Hình đại diện ở thanh trên cùng", "content__external_account": "Tài khoản bên ngoài", "content__face_id": "Face ID", diff --git a/packages/components/src/locale/zh-CN.json b/packages/components/src/locale/zh-CN.json index a5b5adf2e67..f556126b239 100644 --- a/packages/components/src/locale/zh-CN.json +++ b/packages/components/src/locale/zh-CN.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "兑换任何代币", "content__existing": "已存在", "content__exit_value": "离场价", + "content__export_tracking_key": "导出跟踪密钥", + "content__export_tracking_key_desc": "跟踪密钥用于生成资产证明。", "content__ext_metamask_tutorials_1": "点击顶部栏中的「头像」", "content__external_account": "外部账户", "content__face_id": "面容识别", diff --git a/packages/components/src/locale/zh_HK.json b/packages/components/src/locale/zh_HK.json index 34da9892ad9..b48f369baef 100644 --- a/packages/components/src/locale/zh_HK.json +++ b/packages/components/src/locale/zh_HK.json @@ -631,6 +631,8 @@ "content__exchange_any_tokens": "兌換任何代幣", "content__existing": "現存的", "content__exit_value": "離場價", + "content__export_tracking_key": "導出跟踪密鑰", + "content__export_tracking_key_desc": "追蹤密鑰用於產生資產證明。", "content__ext_metamask_tutorials_1": "點擊頂部欄中的「頭像」", "content__external_account": "外部賬戶", "content__face_id": "人臉識別", diff --git a/packages/engine/src/types/account.ts b/packages/engine/src/types/account.ts index a22c845e820..e3b0c25055b 100644 --- a/packages/engine/src/types/account.ts +++ b/packages/engine/src/types/account.ts @@ -16,6 +16,7 @@ enum AccountCredentialType { PrivateKey = 'PrivateKey', PrivateViewKey = 'PrivateViewKey', PrivateSpendKey = 'PrivateSpendKey', + TrackingKey = 'TrackingKey', Mnemonic = 'Mnemonic', } diff --git a/packages/engine/src/vaults/impl/dynex/KeyringHardware.ts b/packages/engine/src/vaults/impl/dynex/KeyringHardware.ts index 226a2dc2add..b7a59acf6cb 100644 --- a/packages/engine/src/vaults/impl/dynex/KeyringHardware.ts +++ b/packages/engine/src/vaults/impl/dynex/KeyringHardware.ts @@ -199,7 +199,7 @@ export class KeyringHardware extends KeyringHardwareBase { throw new Error('Method not implemented.'); } - async getPrivateViewKey(params: { path: string }): Promise { + async getTrackingKey(params: { path: string }): Promise { const HardwareSDK = await this.getHardwareSDKInstance(); const { connectId, deviceId } = await this.getHardwareInfo(); const passphraseState = await this.getWalletPassphraseState(); diff --git a/packages/engine/src/vaults/impl/dynex/Vault.ts b/packages/engine/src/vaults/impl/dynex/Vault.ts index 015d7a03981..df657abb3ba 100644 --- a/packages/engine/src/vaults/impl/dynex/Vault.ts +++ b/packages/engine/src/vaults/impl/dynex/Vault.ts @@ -136,15 +136,15 @@ export default class Vault extends VaultBase { ): Promise { if ( this.accountId.startsWith('hw-') && - credentialType === AccountCredentialType.PrivateViewKey + credentialType === AccountCredentialType.TrackingKey ) { const path = await this.getAccountPath(); - return (this.keyring as KeyringHardware).getPrivateViewKey({ path }); + return (this.keyring as KeyringHardware).getTrackingKey({ path }); } throw new OneKeyInternalError( - 'Only private view key of HW accounts can be exported', + 'Only tracking key of HW accounts can be exported', ); } diff --git a/packages/engine/src/vaults/impl/dynex/settings.ts b/packages/engine/src/vaults/impl/dynex/settings.ts index 73384e5c9dc..d23c3b89d87 100644 --- a/packages/engine/src/vaults/impl/dynex/settings.ts +++ b/packages/engine/src/vaults/impl/dynex/settings.ts @@ -43,8 +43,8 @@ const settings: IVaultSettings = Object.freeze({ exportCredentialInfo: [ { - type: AccountCredentialType.PrivateViewKey, - key: 'action__export_view_key' as LocaleIds, + type: AccountCredentialType.TrackingKey, + key: 'content__export_tracking_key' as LocaleIds, }, ], }); diff --git a/packages/kit/src/views/ManagerAccount/AccountInfo/accountInfoConstants.ts b/packages/kit/src/views/ManagerAccount/AccountInfo/accountInfoConstants.ts index c3d34bd28a4..72d1d776d9d 100644 --- a/packages/kit/src/views/ManagerAccount/AccountInfo/accountInfoConstants.ts +++ b/packages/kit/src/views/ManagerAccount/AccountInfo/accountInfoConstants.ts @@ -10,6 +10,7 @@ export enum ManageAccountKeys { ExportSecretMnemonic = 'ExportSecretMnemonic', ExportPrivateViewKey = 'ExportPrivateViewKey', ExportPrivateSpendKey = 'ExportPrivateSpendKey', + ExportTrackingKey = 'ExportTrackingKey', HardwareCanNotExportPrivateKey = 'HardwareCanNotExportPrivateKey', RemoveAccount = 'RemoveAccount', } @@ -18,6 +19,7 @@ export const SpecialExportCredentialKeys = [ ManageAccountKeys.ExportPrivateViewKey, ManageAccountKeys.ExportPrivateSpendKey, ManageAccountKeys.ExportSecretMnemonic, + ManageAccountKeys.ExportTrackingKey, ]; export const getManageAccountOptions: ( @@ -48,6 +50,18 @@ export const getManageAccountOptions: ( key: 'action__export_private_key', }, }, + + [ManageAccountKeys.ExportTrackingKey]: { + label: intl.formatMessage({ id: 'content__export_tracking_key' }), + description: intl.formatMessage({ + id: 'content__export_tracking_key_desc', + }), + key: ManageAccountKeys.ExportTrackingKey, + credentialInfo: { + type: AccountCredentialType.TrackingKey, + key: 'content__export_tracking_key', + }, + }, [ManageAccountKeys.ExportPrivateViewKey]: { label: intl.formatMessage({ id: 'action__export_private_view_key' }), description: intl.formatMessage({ diff --git a/packages/kit/src/views/ManagerAccount/AccountInfo/index.tsx b/packages/kit/src/views/ManagerAccount/AccountInfo/index.tsx index 8d4677ee6c6..52d2b0f09a9 100644 --- a/packages/kit/src/views/ManagerAccount/AccountInfo/index.tsx +++ b/packages/kit/src/views/ManagerAccount/AccountInfo/index.tsx @@ -126,7 +126,8 @@ const ManagerAccountModal: FC = () => { case ManageAccountKeys.ExportPrivateKey: case ManageAccountKeys.ExportPrivateSpendKey: case ManageAccountKeys.ExportPrivateViewKey: - case ManageAccountKeys.ExportSecretMnemonic: { + case ManageAccountKeys.ExportSecretMnemonic: + case ManageAccountKeys.ExportTrackingKey: { if (item.credentialInfo) { navigation.navigate(RootRoutes.Modal, { screen: ModalRoutes.ManagerAccount,