Add missing translation

This commit is contained in:
Nicola Benaglia 2025-04-26 07:41:07 +02:00
parent 51c65e8236
commit 7f2102e5e0
2 changed files with 17 additions and 5 deletions

View File

@ -25,8 +25,10 @@
},
"result": {
"error": {
"access_name": "Cannot send a message without a access to your name",
"group_info": "Cannot access group information"
"access_name": "cannot send a message without a access to your name",
"description_required": "please provide a description",
"group_info": "cannot access group information",
"name_required": "please provide a name"
},
"loading_threads": "loading threads... please wait.",
"success": {

View File

@ -98,8 +98,18 @@ export const AddGroup = ({ address, open, setOpen }) => {
const handleCreateGroup = async () => {
try {
if (!name) throw new Error('Please provide a name');
if (!description) throw new Error('Please provide a description');
if (!name)
throw new Error(
t('group:result.error.name_required', {
postProcess: 'capitalize',
})
);
if (!description)
throw new Error(
t('group:result.error.description_required', {
postProcess: 'capitalize',
})
);
const fee = await getFee('CREATE_GROUP');
@ -128,7 +138,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
postProcess: 'capitalize',
}),
});
setOpenSnack(true); // TODO translate
setOpenSnack(true);
setTxList((prev) => [
{
...response,