From 129a06cc124ae7cb5e3e362ffa95561a6fbd914b Mon Sep 17 00:00:00 2001 From: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Date: Wed, 25 Jan 2023 10:15:58 -0500 Subject: [PATCH] Copy update on Transaction breakdown for ApproveToken (#17296) --- app/_locales/de/messages.json | 7 ------- app/_locales/el/messages.json | 7 ------- app/_locales/en/messages.json | 10 +++++----- app/_locales/es/messages.json | 7 ------- app/_locales/es_419/messages.json | 7 ------- app/_locales/fr/messages.json | 7 ------- app/_locales/hi/messages.json | 7 ------- app/_locales/id/messages.json | 7 ------- app/_locales/it/messages.json | 7 ------- app/_locales/ja/messages.json | 7 ------- app/_locales/ko/messages.json | 7 ------- app/_locales/ph/messages.json | 7 ------- app/_locales/pt/messages.json | 7 ------- app/_locales/pt_BR/messages.json | 7 ------- app/_locales/ru/messages.json | 7 ------- app/_locales/tl/messages.json | 7 ------- app/_locales/tr/messages.json | 7 ------- app/_locales/vi/messages.json | 7 ------- app/_locales/zh_CN/messages.json | 7 ------- app/_locales/zh_TW/messages.json | 7 ------- test/e2e/tests/collectibles.spec.js | 2 +- test/e2e/tests/custom-token-add-approve.spec.js | 16 ++++++++-------- .../transaction-breakdown.component.js | 2 +- ui/hooks/useTransactionDisplayData.js | 4 +++- 24 files changed, 18 insertions(+), 149 deletions(-) diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index a9e0f83f5..33529f783 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "Genehmigen" }, - "approveSpendLimit": { - "message": "$1 Ausgabelimit genehmigen", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "Dies gestattet es Dritten, ohne weitere Benachrichtigung auf die folgenden NFTs zuzugreifen und diese zu übertragen, bis Sie dieses Zugriffsrecht widerrufen." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "Diese Transaktion beschleunigen" }, - "spendLimitAmount": { - "message": "Ausgabelimitbetrag" - }, "spendLimitInsufficient": { "message": "Ausgabelimit unzureichend" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 3f197f168..1ee944aa8 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "Έγκριση" }, - "approveSpendLimit": { - "message": "Έγκριση ορίου δαπανών $1", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "Αυτό επιτρέπει σε τρίτα μέρη να έχουν πρόσβαση και να μεταφέρουν τα ακόλουθα NFT χωρίς περαιτέρω ειδοποίηση μέχρι να ανακαλέσετε την πρόσβασή τους." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "Επιτάχυνση αυτής της συναλλαγής" }, - "spendLimitAmount": { - "message": "Ποσό ορίου δαπανών" - }, "spendLimitInsufficient": { "message": "Ανεπαρκές όριο δαπανών" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index db771ad38..be6317ea6 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -370,8 +370,8 @@ "approveButtonText": { "message": "Approve" }, - "approveSpendLimit": { - "message": "Approve $1 spend limit", + "approveSpendingCap": { + "message": "Approve $1 spending cap", "description": "The token symbol that is being approved" }, "approveTokenDescription": { @@ -3473,9 +3473,6 @@ "speedUpTransaction": { "message": "Speed up this transaction" }, - "spendLimitAmount": { - "message": "Spend limit amount" - }, "spendLimitInsufficient": { "message": "Spend limit insufficient" }, @@ -3492,6 +3489,9 @@ "spendLimitTooLarge": { "message": "Spend limit too large" }, + "spendingCap": { + "message": "Spending cap" + }, "spendingCapError": { "message": "Error: Enter numbers only" }, diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 981790fb6..a76091764 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "Aprobar" }, - "approveSpendLimit": { - "message": "Aprobar límite de gastos de $1", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "Esto permite que un tercero acceda y transfiera los siguientes NFT sin previo aviso hasta que usted revoque su acceso." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "Acelerar esta transacción" }, - "spendLimitAmount": { - "message": "Monto de límite de gastos" - }, "spendLimitInsufficient": { "message": "Límite de gastos insuficiente" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index 3ef2f63bc..ce5fa117e 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -226,10 +226,6 @@ "approveButtonText": { "message": "Aprobar" }, - "approveSpendLimit": { - "message": "Aprobar límite de gastos de $1", - "description": "The token symbol that is being approved" - }, "approved": { "message": "Aprobado" }, @@ -2360,9 +2356,6 @@ "speedUpTransaction": { "message": "Acelerar esta transacción" }, - "spendLimitAmount": { - "message": "Monto de límite de gastos" - }, "spendLimitInsufficient": { "message": "Límite de gastos insuficiente" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index 8bf8d486a..3d78096ce 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "Approuver" }, - "approveSpendLimit": { - "message": "Approuver la limite de dépenses de $1", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "Tant que vous n’aurez pas révoqué cette autorisation, l’autre partie pourra accéder à votre portefeuille et transférer sans préavis les NFT suivants." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "Accélérez cette transaction" }, - "spendLimitAmount": { - "message": "Montant limite de dépenses" - }, "spendLimitInsufficient": { "message": "Limite de dépenses insuffisante" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index b2d154dd1..f106f73b6 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "अनुमोदित करें" }, - "approveSpendLimit": { - "message": "$1 खर्च सीमा अनुमोदित करें", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "यह किसी तीसरे पक्ष को बिना किसी नोटिस के निम्नलिखित NFTs को ऐक्सेस करने और स्थानांतरित करने की अनुमति देता है जब तक कि आप इसकी ऐक्सेस को रद्द नहीं कर देते।" }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "इस लेनदेन को गति दें" }, - "spendLimitAmount": { - "message": "खर्च सीमा राशि" - }, "spendLimitInsufficient": { "message": "खर्च सीमा अपर्याप्त है" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 1fabd1a34..912f8b1d9 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "Setujui" }, - "approveSpendLimit": { - "message": "Setujui batas penggunaan $1", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "Hal ini memungkinkan pihak ketiga untuk mengakses dan mentransfer NFT berikut tanpa pemberitahuan lebih lanjut sampai Anda mencabut aksesnya." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "Percepat transaksi ini" }, - "spendLimitAmount": { - "message": "Jumlah batas penggunaan" - }, "spendLimitInsufficient": { "message": "Batas penggunaan tidak mencukupi" }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index 6fc451f03..f59741a28 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -305,10 +305,6 @@ "approveButtonText": { "message": "Approva" }, - "approveSpendLimit": { - "message": "Approva limite di spesa per $1", - "description": "The token symbol that is being approved" - }, "approved": { "message": "Approvato" }, @@ -1753,9 +1749,6 @@ "speedUpTransaction": { "message": "Accelera questa transazione" }, - "spendLimitAmount": { - "message": "Limite di spesa" - }, "spendLimitInsufficient": { "message": "Limite di spesa insufficiente" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index f06f587de..406ead8f0 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "承認" }, - "approveSpendLimit": { - "message": "$1使用限度額の承認", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "これにより、アクセス許可を取り消すまで、第三者が今後通知なしに次の NFT にアクセスし、転送できるようになります。" }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "このトランザクションをスピードアップ" }, - "spendLimitAmount": { - "message": "使用限度額" - }, "spendLimitInsufficient": { "message": "使用限度額が十分ではありません" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index b9319686d..0fe204a3c 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "승인" }, - "approveSpendLimit": { - "message": "$1 지출 한도 승인", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "이렇게 하면 사용자가 액세스를 취소할 때까지 제삼자가 가 통지 없이 다음과 같은 NFT에 액세스하고 이를 전송할 수 있습니다." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "이 거래 가속화" }, - "spendLimitAmount": { - "message": "지출 한도 금액" - }, "spendLimitInsufficient": { "message": "지출 한도 부족" }, diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json index 3f5ac76b1..daac60883 100644 --- a/app/_locales/ph/messages.json +++ b/app/_locales/ph/messages.json @@ -134,10 +134,6 @@ "approveButtonText": { "message": "Aprubahan" }, - "approveSpendLimit": { - "message": "Aprubahan ang limitasyon sa paggastos na $1", - "description": "The token symbol that is being approved" - }, "approved": { "message": "Inaprubahan" }, @@ -1555,9 +1551,6 @@ "speedUpTransaction": { "message": "Pabilisin ang transaksyong ito" }, - "spendLimitAmount": { - "message": "Halaga ng limitasyon sa paggastos" - }, "spendLimitInsufficient": { "message": "Hindi sapat ang limitasyon sa paggastos" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 601d77dd3..e964f1498 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "Aprovar" }, - "approveSpendLimit": { - "message": "Aprovar limite de gastos de $1", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "Isso permite que terceiros acessem e transfiram os seguintes NFTs sem aviso prévio até que você revogue o acesso." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "Acelerar essa transação" }, - "spendLimitAmount": { - "message": "Valor do limite de gastos" - }, "spendLimitInsufficient": { "message": "Limite de gastos insuficiente" }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index 38d4622bf..d1085d8ba 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -226,10 +226,6 @@ "approveButtonText": { "message": "Aprovar" }, - "approveSpendLimit": { - "message": "Aprovar limite de gastos de $1", - "description": "The token symbol that is being approved" - }, "approved": { "message": "Aprovado" }, @@ -2360,9 +2356,6 @@ "speedUpTransaction": { "message": "Acelerar essa transação" }, - "spendLimitAmount": { - "message": "Valor do limite de gastos" - }, "spendLimitInsufficient": { "message": "Limite de gastos insuficiente" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 3e74814de..91a5d6166 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "Одобрить" }, - "approveSpendLimit": { - "message": "Одобрить предел расходов $1", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "Это позволяет третьей стороне получать доступ и передавать следующие NFT без дополнительного уведомления, пока вы не отзовете ее доступ." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "Ускорить эту транзакцию" }, - "spendLimitAmount": { - "message": "Сумма лимита расходов" - }, "spendLimitInsufficient": { "message": "Недостаточный лимит расходов" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 850af882b..71ec1a5af 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "Aprubahan" }, - "approveSpendLimit": { - "message": "Aprubahan ang limitasyon sa paggastos na $1", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "Nagbibigay-daan ito sa third party na i-access at ilipat ang mga sumusunod na NFT nang walang karagdagang abiso hanggang sa bawiin mo ang pag-access nito." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "Pabilisin ang transaksyong ito" }, - "spendLimitAmount": { - "message": "Halaga ng limitasyon sa paggastos" - }, "spendLimitInsufficient": { "message": "Hindi sapat ang limitasyon sa paggastos" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index cd1749176..d06f1ef6b 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "Onayla" }, - "approveSpendLimit": { - "message": "$1 harcama limitini onayla", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "Üçüncü bir tarafın, siz bu erişimi iptal edene kadar başka bildirim yapılmaksızın aşağıdaki NFT'lere erişim sağlamasına ve onları transfer edebilmesine izin verir." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "Bu işlemi hızlandır" }, - "spendLimitAmount": { - "message": "Harcama limiti tutarı" - }, "spendLimitInsufficient": { "message": "Harcama limiti yetersiz" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index bf3aa2dc6..d9f953807 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "Phê duyệt" }, - "approveSpendLimit": { - "message": "Phê duyệt giới hạn chi tiêu $1", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "Điều này cho phép bên thứ ba được quyền truy cập và chuyển các NFT sau đây mà không cần thông báo thêm cho đến khi bạn thu hồi quyền truy cập của họ." }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "Tăng tốc giao dịch này" }, - "spendLimitAmount": { - "message": "Khoản tiền giới hạn chi tiêu" - }, "spendLimitInsufficient": { "message": "Giới hạn chi tiêu không đủ" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 43b618451..3f4a42c59 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -370,10 +370,6 @@ "approveButtonText": { "message": "批准" }, - "approveSpendLimit": { - "message": "批准 $1 消费限额", - "description": "The token symbol that is being approved" - }, "approveTokenDescription": { "message": "这允许第三方访问和转移以下 NFT,而无需另行通知,直到您撤销其访问权限。" }, @@ -3442,9 +3438,6 @@ "speedUpTransaction": { "message": "加速该交易" }, - "spendLimitAmount": { - "message": "消费限额" - }, "spendLimitInsufficient": { "message": "消费限额不足" }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index 05a5c3cef..30f4d1b5a 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -133,10 +133,6 @@ "approveButtonText": { "message": "批准" }, - "approveSpendLimit": { - "message": "批准 $1 花費限額", - "description": "The token symbol that is being approved" - }, "approved": { "message": "已許可" }, @@ -1462,9 +1458,6 @@ "speedUpTransaction": { "message": "加速這筆交易" }, - "spendLimitAmount": { - "message": "花費額度上限" - }, "spendLimitInsufficient": { "message": "花費額度上限不足" }, diff --git a/test/e2e/tests/collectibles.spec.js b/test/e2e/tests/collectibles.spec.js index c8e5484fb..9ef28314c 100644 --- a/test/e2e/tests/collectibles.spec.js +++ b/test/e2e/tests/collectibles.spec.js @@ -131,7 +131,7 @@ describe('Collectibles', function () { // Verify transaction const completedTx = await driver.findElement('.list-item__title'); const completedTxText = await completedTx.getText(); - assert.equal(completedTxText, 'Approve Token spend limit'); + assert.equal(completedTxText, 'Approve token spending cap'); }, ); }); diff --git a/test/e2e/tests/custom-token-add-approve.spec.js b/test/e2e/tests/custom-token-add-approve.spec.js index d11ce56fb..4eb9fdb75 100644 --- a/test/e2e/tests/custom-token-add-approve.spec.js +++ b/test/e2e/tests/custom-token-add-approve.spec.js @@ -196,11 +196,11 @@ describe('Create token, approve token and approve token without gas', function ( const approveTokenTask = await driver.waitForSelector({ // Selects only the very first transaction list item immediately following the 'Pending' header css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', - text: 'Approve Token spend limit', + text: 'Approve token spending cap', }); assert.equal( await approveTokenTask.getText(), - 'Approve Token spend limit', + 'Approve token spending cap', ); }, ); @@ -339,11 +339,11 @@ describe('Create token, approve token and approve token without gas', function ( const approveTokenTask = await driver.waitForSelector({ // Select only the heading of the first entry in the transaction list. css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', - text: 'Approve Token spend limit', + text: 'Approve token spending cap', }); assert.equal( await approveTokenTask.getText(), - 'Approve Token spend limit', + 'Approve token spending cap', ); }, ); @@ -426,11 +426,11 @@ describe('Create token, approve token and approve token without gas', function ( const approveTokenTask = await driver.waitForSelector({ // Select only the heading of the first entry in the transaction list. css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', - text: 'Approve Token spend limit', + text: 'Approve token spending cap', }); assert.equal( await approveTokenTask.getText(), - 'Approve Token spend limit', + 'Approve token spending cap', ); }, ); @@ -490,11 +490,11 @@ describe('Create token, approve token and approve token without gas', function ( // check transaction in Activity tab const approveTokenTask = await driver.waitForSelector({ css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', - text: 'Approve Token spend limit', + text: 'Approve token spending cap', }); assert.equal( await approveTokenTask.getText(), - 'Approve Token spend limit', + 'Approve token spending cap', ); }, ); diff --git a/ui/components/app/transaction-breakdown/transaction-breakdown.component.js b/ui/components/app/transaction-breakdown/transaction-breakdown.component.js index ce179036c..821a3da70 100644 --- a/ui/components/app/transaction-breakdown/transaction-breakdown.component.js +++ b/ui/components/app/transaction-breakdown/transaction-breakdown.component.js @@ -74,7 +74,7 @@ export default class TransactionBreakdown extends PureComponent { )} {primaryCurrency} diff --git a/ui/hooks/useTransactionDisplayData.js b/ui/hooks/useTransactionDisplayData.js index 24f65dd73..f0d981127 100644 --- a/ui/hooks/useTransactionDisplayData.js +++ b/ui/hooks/useTransactionDisplayData.js @@ -222,7 +222,9 @@ export function useTransactionDisplayData(transactionGroup) { } else if (type === TransactionType.tokenMethodApprove) { category = TransactionGroupCategory.approval; prefix = ''; - title = t('approveSpendLimit', [token?.symbol || t('token')]); + title = t('approveSpendingCap', [ + token?.symbol || t('token').toLowerCase(), + ]); subtitle = origin; subtitleContainsOrigin = true; } else if (type === TransactionType.tokenMethodSetApprovalForAll) {