diff --git a/src/components/Chat/ChatGroup.tsx b/src/components/Chat/ChatGroup.tsx index 3cddd4d..1e65eb7 100644 --- a/src/components/Chat/ChatGroup.tsx +++ b/src/components/Chat/ChatGroup.tsx @@ -798,7 +798,7 @@ export const ChatGroup = ({ if (messageSize > 4000) return; // TODO magic number if (isPrivate === null) throw new Error( - t('group:message.error.unable_determine_group_private', { + t('group:message.error:determine_group_private', { postProcess: 'capitalizeFirstChar', }) ); diff --git a/src/components/Minting/Minting.tsx b/src/components/Minting/Minting.tsx index f03235b..114d521 100644 --- a/src/components/Minting/Minting.tsx +++ b/src/components/Minting/Minting.tsx @@ -428,7 +428,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { type: 'error', message: error?.message || - t('group:message.error.unable_minting', { + t('group:message.error:minting', { postProcess: 'capitalizeFirstChar', }), }); diff --git a/src/i18n/locales/en/question.json b/src/i18n/locales/en/question.json index 5a815fb..28be8dc 100644 --- a/src/i18n/locales/en/question.json +++ b/src/i18n/locales/en/question.json @@ -12,6 +12,7 @@ "error": { "add_to_list": "failed to add to list", "cancel_sell_order": "failed to Cancel Sell Order. Try again!", + "copy_clipboard": "failed to copy to clipboard", "create_sell_order": "failed to Create Sell Order. Try again!", "create_tradebot": "unable to create tradebot", "decrypt": "unable to decrypt", @@ -26,7 +27,9 @@ "insufficient_balance_qort": "your QORT balance is insufficient", "insufficient_balance": "your asset balance is insufficient", "insufficient_funds": "insufficient funds", + "invalid_receiver": "invalid receiver address or name", "missing_fields": "missing fields: {{ fields }}", + "name_not_for_sale": "this name is not for sale", "no_api_found": "no usable API found", "no_data_encrypted_resource": "no data in the encrypted resource", "no_data_file_submitted": "no data or file was submitted", @@ -35,6 +38,7 @@ "no_poll": "poll not found", "perform_request": "failed to perform request", "process_transaction": "unable to process transaction", + "registered_name": "a registered name is needed to publish", "retrieve_file": "failed to retrieve file", "retrieve_keys": "unable to retrieve keys", "submit_sell_order": "failed to submit sell order", @@ -48,21 +52,28 @@ "include_data_encrypt": "please include data to encrypt", "max_retry_transaction": "max retries reached. Skipping transaction.", "no_action_public_node": "this action cannot be done through a public node", + "private_service": "please use a private service", "provide_group_id": "please provide a groupId", - "user_declined_delete": "user declined delete hosted resources", + "user_declined_add_list": "user declined add to list", + "user_declined_delete_from_list": "User declined delete from list", + "user_declined_delete_hosted_resources": "user declined delete hosted resources", "user_declined_join": "user declined to join group", "user_declined_list": "user declined to get list of hosted resources", - "user_declined_request": "user declined request" + "user_declined_request": "user declined request", + "user_declined_share_list": "user declined to share list" } }, "name": "name: {{ name }}", "option": "option: {{ option }}", "options": "options: {{ optionList }}", + "permission_access_list": "do you give this application permission to access the list", "permission_all_item_list": "do you give this application permission to add the following to the list {{ name }}:", "permission_authenticate": "do you give this application permission to authenticate?", "permission_list_hosted_data": "do you give this application permission to get a list of your hosted data?", "permission_delete_hosts_resources": "do you give this application permission to delete {{ size }} hosted resources?", "permission_pay_publish": "do you give this application permission to make the following payments and publishes?", + "permission_publish_qdn": "do you give this application permission to publish to QDN?", + "permission_remove_from_list": "do you give this application permission to remove the following from the list {{ name }}:", "permission_send_coins": "do you give this application permission to send coins?", "permission_transfer_asset": "do you give this application permission to transfer the following asset?", "poll": "poll: {{ name }}", diff --git a/src/i18n/locales/it/group.json b/src/i18n/locales/it/group.json index 510565f..95731d0 100644 --- a/src/i18n/locales/it/group.json +++ b/src/i18n/locales/it/group.json @@ -102,18 +102,18 @@ }, "error": { "access_name": "impossibile inviare un messaggio senza accesso al tuo nome", - "descrypt_wallet": "errore nella decrittazione del portafoglio {{ :errorMessage }}", "description_required": "inserisci una descrizione", + "descrypt_wallet": "errore nella decrittazione del portafoglio {{ :errorMessage }}", + "determine_group_private": "unable to determine if group is private", "group_info": "impossibile accedere alle informazioni del gruppo", "group_promotion": "error publishing the promotion. Please try again", "group_secret_key": "impossibile ottenere la chiave segreta del gruppo", + "minting": "unable to start minting", "name_required": "inserisci un nome", "notify_admins": "prova a contattare un amministratore dalla lista qui sotto:", "qortals_required": "you need at least {{ quantity }} QORT to send a message", - "timeout_reward": "timeout waiting for reward share confirmation", "thread_id": "impossibile trovare l'ID della discussione", - "unable_determine_group_private": "unable to determine if group is private", - "unable_minting": "unable to start minting" + "timeout_reward": "timeout waiting for reward share confirmation" }, "success": { "group_ban": "membro bannato con successo dal gruppo. Potrebbero volerci alcuni minuti affinché le modifiche si propaghino", diff --git a/src/qortalRequests/get.ts b/src/qortalRequests/get.ts index 1fe5c0d..c949308 100644 --- a/src/qortalRequests/get.ts +++ b/src/qortalRequests/get.ts @@ -996,7 +996,7 @@ export const deleteHostedData = async (data, isFromExtension) => { return true; } else { throw new Error( - i18n.t('question:message.generic.user_declined_delete', { + i18n.t('question:message.generic.user_declined_delete_hosted_resources', { postProcess: 'capitalizeFirstChar', }) ); @@ -1083,7 +1083,9 @@ export const getListItems = async (data, isFromExtension) => { if (!skip) { resPermission = await getUserPermission( { - text1: 'Do you give this application permission to access the list', + text1: i18n.t('question:permission_access_list', { + postProcess: 'capitalizeFirstChar', + }), highlightedText: data.list_name, checkbox1: { value: value, @@ -1113,7 +1115,11 @@ export const getListItems = async (data, isFromExtension) => { const list = await response.json(); return list; } else { - throw new Error('User declined to share list'); + throw new Error( + i18n.t('question:message.generic.user_declined_share_list', { + postProcess: 'capitalizeFirstChar', + }) + ); } }; @@ -1185,7 +1191,11 @@ export const addListItems = async (data, isFromExtension) => { } return res; } else { - throw new Error('User declined add to list'); + throw new Error( + i18n.t('question:message.generic.user_declined_add_list', { + postProcess: 'capitalizeFirstChar', + }) + ); } }; @@ -1227,8 +1237,10 @@ export const deleteListItems = async (data, isFromExtension) => { const resPermission = await getUserPermission( { - text1: 'Do you give this application permission to', - text2: `Remove the following from the list ${list_name}:`, + text1: i18n.t('question:permission_remove_from_list', { + name: list_name, + postProcess: 'capitalizeFirstChar', + }), highlightedText: items ? JSON.stringify(items) : item, }, isFromExtension @@ -1263,7 +1275,11 @@ export const deleteListItems = async (data, isFromExtension) => { } return res; } else { - throw new Error('User declined delete from list'); + throw new Error( + i18n.t('question:message.generic.user_declined_delete_from_list', { + postProcess: 'capitalizeFirstChar', + }) + ); } }; @@ -1390,7 +1406,9 @@ export const publishQDNResource = async ( } const resPermission = await getUserPermission( { - text1: 'Do you give this application permission to publish to QDN?', + text1: i18n.t('question:permission_publish_qdn', { + postProcess: 'capitalizeFirstChar', + }), text2: `service: ${service}`, text3: `identifier: ${identifier || null}`, fee: fee.fee, @@ -1519,18 +1537,15 @@ export const publishMultipleQDNResources = async ( } } - // if ( - // data.encrypt && - // (!data.publicKeys || - // (Array.isArray(data.publicKeys) && data.publicKeys.length === 0)) - // ) { - // throw new Error("Encrypting data requires public keys"); - // } const fee = await getFee('ARBITRARY'); const registeredName = await getNameInfo(); const name = registeredName; if (!name) { - throw new Error('You need a Qortal name to publish.'); + throw new Error( + i18n.t('question:message.error.registered_name', { + postProcess: 'capitalizeFirstChar', + }) + ); } const appFee = data?.appFee ? +data.appFee : undefined; const appFeeRecipient = data?.appFeeRecipient; @@ -1554,7 +1569,9 @@ export const publishMultipleQDNResources = async ( } const resPermission = await getUserPermission( { - text1: 'Do you give this application permission to publish to QDN?', + text1: i18n.t('question:permission_publish_qdn', { + postProcess: 'capitalizeFirstChar', + }), html: `