From 9d25249b6d81d888429c618253bb7818e338188b Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Tue, 20 May 2025 08:35:11 +0200 Subject: [PATCH] Add translations --- src/components/Group/BlockedUsersModal.tsx | 55 ++++++++++++++----- .../Group/ListOfGroupPromotions.tsx | 2 + src/components/WrapperUserAction.tsx | 4 +- src/i18n/locales/en/auth.json | 15 ++++- src/i18n/locales/en/core.json | 2 - 5 files changed, 60 insertions(+), 18 deletions(-) diff --git a/src/components/Group/BlockedUsersModal.tsx b/src/components/Group/BlockedUsersModal.tsx index de9ec80..5ebd2fc 100644 --- a/src/components/Group/BlockedUsersModal.tsx +++ b/src/components/Group/BlockedUsersModal.tsx @@ -200,20 +200,28 @@ export const BlockedUsersModal = () => { variant="contained" onClick={blockUser} > - Block + {t('auth:action.block', { postProcess: 'capitalizeFirstChar' })} {Object.entries(blockedUsers?.addresses).length > 0 && ( <> + - Blocked addresses- blocks processing of txs + {t('auth:message.generic.blocked_addresses', { + postProcess: 'capitalizeFirstChar', + })} + + + )} @@ -255,19 +263,26 @@ export const BlockedUsersModal = () => { } }} > - Unblock + {t('auth:action.unblock', { + postProcess: 'capitalizeFirstChar', + })} ); } )} + {Object.entries(blockedUsers?.names).length > 0 && ( <> + - Blocked names for QDN + {t('core:message.generic.blocked_names', { + postProcess: 'capitalizeFirstChar', + })} + )} @@ -291,6 +306,7 @@ export const BlockedUsersModal = () => { }} > {key} + ); })} + @@ -345,13 +364,19 @@ export const BlockedUsersModal = () => { aria-describedby="alert-dialog-description" > - {'Decide what to block'} + {t('auth:message.generic.decide_block', { + postProcess: 'capitalizeFirstChar', + })} - Blocking {message?.userName || message?.userAddress} + {t('auth:message.generic.blocking', { + name: message?.userName || message?.userAddress, + postProcess: 'capitalizeFirstChar', + })} + { }} />{' '} - Choose "block txs" or "all" to block chat messages{' '} + {t('auth:message.generic.choose_block', { + postProcess: 'capitalizeFirstChar', + })} @@ -378,7 +405,7 @@ export const BlockedUsersModal = () => { onOk('address'); }} > - Block txs + {t('auth:action.block_txs', { postProcess: 'capitalizeFirstChar' })} diff --git a/src/components/Group/ListOfGroupPromotions.tsx b/src/components/Group/ListOfGroupPromotions.tsx index a133c30..b2f22fb 100644 --- a/src/components/Group/ListOfGroupPromotions.tsx +++ b/src/components/Group/ListOfGroupPromotions.tsx @@ -269,6 +269,7 @@ export const ListOfGroupPromotions = () => { try { const groupId = group.groupId; const fee = await getFee('JOIN_GROUP'); + await show({ message: t('core:message.question.perform_transaction', { action: 'JOIN_GROUP', @@ -276,6 +277,7 @@ export const ListOfGroupPromotions = () => { }), publishFee: fee.fee + ' QORT', }); + setIsLoadingJoinGroup(true); await new Promise((res, rej) => { window diff --git a/src/components/WrapperUserAction.tsx b/src/components/WrapperUserAction.tsx index e046ff1..f3f21ee 100644 --- a/src/components/WrapperUserAction.tsx +++ b/src/components/WrapperUserAction.tsx @@ -208,8 +208,8 @@ const BlockUser = ({ address, name, handleClose }) => { )} {isAlreadyBlocked && - t('core:action.unblock_name', { postProcess: 'capitalizeFirstChar' })} - {isAlreadyBlocked === false && t('core:action.block_name', { postProcess: 'capitalizeFirstChar' })}} + t('auth:action.unblock_name', { postProcess: 'capitalizeFirstChar' })} + {isAlreadyBlocked === false && t('auth:action.block_name', { postProcess: 'capitalizeFirstChar' })}} ); }; diff --git a/src/i18n/locales/en/auth.json b/src/i18n/locales/en/auth.json index ba017dd..81e14a5 100644 --- a/src/i18n/locales/en/auth.json +++ b/src/i18n/locales/en/auth.json @@ -11,6 +11,12 @@ "seed_phrase": "add seed-phrase" }, "authenticate": "authenticate", + "block": "block", + "block_all": "block all", + "block_data": "block QDN data", + "block_name": "block name", + "block_txs": "block tsx", + "fetch_names": "fetch names", "copy_address": "copy address", "create_account": "create account", "create_qortal_account": "create your Qortal account by clicking NEXT below.", @@ -22,7 +28,9 @@ "publish_group_secret_key": "publish group secret key", "reencrypt_key": "re-encrypt key", "return_to_list": "return to list", - "setup_qortal_account": "set up your Qortal account" + "setup_qortal_account": "set up your Qortal account", + "unblock": "unblock", + "unblock_name": "unblock name" }, "address": "address", "address_name": "address or name", @@ -52,7 +60,12 @@ "unable_reencrypt_secret_key": "unable to re-encrypt secret key" }, "generic": { + "blocked_addresses": "blocked addresses- blocks processing of txs", + "blocked_names": "blocked names for QDN", + "blocking": "blocking {{ name }}", + "choose_block": "choose 'block txs' or 'all' to block chat messages", "congrats_setup": "congrats, you’re all set up!", + "decide_block": "decide what to block", "no_account": "no accounts saved", "no_minimum_length": "there is no minimum length requirement", "no_secret_key_published": "no secret key published yet", diff --git a/src/i18n/locales/en/core.json b/src/i18n/locales/en/core.json index 1d723f5..2a63179 100644 --- a/src/i18n/locales/en/core.json +++ b/src/i18n/locales/en/core.json @@ -8,7 +8,6 @@ "access_app": "access app", "backup_account": "backup account", "backup_wallet": "backup wallet", - "block_name": "block name", "cancel": "cancel", "cancel_invitation": "cancel invitation", "change": "change", @@ -78,7 +77,6 @@ "start_minting": "start minting", "start_typing": "start typing here...", "transfer_qort": "Transfer QORT", - "unblock_name": "unblock name", "unpin": "unpin", "unpin_app": "unpin app", "unpin_from_dashboard": "unpin from dashboard",