Update translations

This commit is contained in:
Nicola Benaglia 2025-05-15 19:02:12 +02:00
parent f6dccdfb2d
commit 3e6d2f5e4b
5 changed files with 98 additions and 30 deletions

View File

@ -169,17 +169,25 @@ export const AppPublish = ({ names, categories }) => {
});
if (missingFields.length > 0) {
const missingFieldsString = missingFields.join(', ');
const errorMsg = `Missing fields: ${missingFieldsString}`;
const errorMsg = t('core:message.error.missing_fields', {
fields: missingFieldsString,
postProcess: 'capitalize',
});
throw new Error(errorMsg);
}
const fee = await getFee('ARBITRARY');
await show({
// TODO translate
message: 'Would you like to publish this app?',
message: t('core:save_options.publish_app', {
postProcess: 'capitalize',
}),
publishFee: fee.fee + ' QORT',
});
setIsLoading('Publishing... Please wait.');
setIsLoading(
t('core:message.generic.publishing', {
postProcess: 'capitalize',
})
);
const fileBase64 = await fileToBase64(file);
await new Promise((res, rej) => {
window
@ -204,13 +212,17 @@ export const AppPublish = ({ names, categories }) => {
rej(response.error);
})
.catch((error) => {
rej(error.message || 'An error occurred');
rej(
error.message ||
t('core:message.error.generic', { postProcess: 'capitalize' })
);
});
});
setInfoSnack({
type: 'success',
message:
'Successfully published. Please wait a couple minutes for the network to propogate the changes.',
message: t('core:message.success.published', {
postProcess: 'capitalize',
}),
});
setOpenSnack(true);
const dataObj = {
@ -229,7 +241,11 @@ export const AppPublish = ({ names, categories }) => {
} catch (error) {
setInfoSnack({
type: 'error',
message: error?.message || 'Unable to publish app',
message:
error?.message ||
t('core:message.error.publish_app', {
postProcess: 'capitalize',
}),
});
setOpenSnack(true);
} finally {
@ -250,18 +266,27 @@ export const AppPublish = ({ names, categories }) => {
width: 'auto',
}}
>
<AppLibrarySubTitle>Create Apps!</AppLibrarySubTitle>
<AppLibrarySubTitle>
{t('core:action.create_apps', {
postProcess: 'capitalize',
})}
!
</AppLibrarySubTitle>
<Spacer height="18px" />
<PublishQAppInfo>
Note: Currently, only one App and Website is allowed per Name.
{t('core:message.generic.one_app_per_name', {
postProcess: 'capitalize',
})}
</PublishQAppInfo>
<Spacer height="18px" />
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
Name/App
{t('core:name_app', {
postProcess: 'capitalize',
})}
</InputLabel>
<CustomSelect
@ -276,7 +301,9 @@ export const AppPublish = ({ names, categories }) => {
color: theme.palette.text.secondary,
}}
>
Select Name/App
{t('core:action.select_name_app', {
postProcess: 'capitalize',
})}
</em>
{/* This is the placeholder item */}
</CustomMenuItem>
@ -288,7 +315,9 @@ export const AppPublish = ({ names, categories }) => {
<Spacer height="15px" />
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
App service type
{t('core:app_service_type', {
postProcess: 'capitalize',
})}
</InputLabel>
<CustomSelect
@ -303,17 +332,29 @@ export const AppPublish = ({ names, categories }) => {
color: theme.palette.text.secondary,
}}
>
Select App Type
{t('core:action.select_app_type', {
postProcess: 'capitalize',
})}
</em>
</CustomMenuItem>
<CustomMenuItem value={'APP'}>App</CustomMenuItem>
<CustomMenuItem value={'WEBSITE'}>Website</CustomMenuItem>
<CustomMenuItem value={'APP'}>
{t('core:app', {
postProcess: 'capitalize',
})}
</CustomMenuItem>
<CustomMenuItem value={'WEBSITE'}>
{t('core:website', {
postProcess: 'capitalize',
})}
</CustomMenuItem>
</CustomSelect>
<Spacer height="15px" />
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
Title
{t('core:title', {
postProcess: 'capitalize',
})}
</InputLabel>
<InputBase
@ -338,7 +379,9 @@ export const AppPublish = ({ names, categories }) => {
<Spacer height="15px" />
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
Description
{t('core:description', {
postProcess: 'capitalize',
})}
</InputLabel>
<InputBase
@ -363,7 +406,9 @@ export const AppPublish = ({ names, categories }) => {
<Spacer height="15px" />
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
Category
{t('core:category', {
postProcess: 'capitalize',
})}
</InputLabel>
<CustomSelect
@ -378,7 +423,9 @@ export const AppPublish = ({ names, categories }) => {
color: theme.palette.text.secondary,
}}
>
Select Category
{t('core:action.select_category', {
postProcess: 'capitalize',
})}
</em>
</CustomMenuItem>
{categories?.map((category) => {
@ -393,7 +440,9 @@ export const AppPublish = ({ names, categories }) => {
<Spacer height="15px" />
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
Tags
{t('core:tags', {
postProcess: 'capitalize',
})}
</InputLabel>
<AppPublishTagsContainer>
@ -487,7 +536,7 @@ export const AppPublish = ({ names, categories }) => {
<Spacer height="30px" />
<PublishQAppInfo>
Select .zip file containing static content:{' '}
{t('core:message.generic.select_zip', { postProcess: 'capitalize' })}
</PublishQAppInfo>
<Spacer height="10px" />
@ -507,7 +556,7 @@ export const AppPublish = ({ names, categories }) => {
<PublishQAppChoseFile {...getRootProps()}>
{' '}
<input {...getInputProps()} />
Choose File
{t('core:action.choose_file', { postProcess: 'capitalize' })}
</PublishQAppChoseFile>
<Spacer height="35px" />
@ -518,7 +567,7 @@ export const AppPublish = ({ names, categories }) => {
}}
onClick={publishApp}
>
Publish
{t('core:action.publish', { postProcess: 'capitalize' })}
</PublishQAppCTAButton>
</AppsWidthLimiter>

View File

@ -202,7 +202,7 @@ export const NewThread = ({
// if (!description) missingFields.push('subject')
if (missingFields.length > 0) {
const missingFieldsString = missingFields.join(', ');
const errMsg = t('group:message.error.missing_field', {
const errMsg = t('core:message.error.missing_fields', {
field: missingFieldsString,
postProcess: 'capitalize',
});

View File

@ -65,6 +65,7 @@ export const MainAvatar = ({ myName, balance, setOpenSnack, setInfoSnack }) => {
const publishAvatar = async () => {
try {
// TODO translate
const fee = await getFee('ARBITRARY');
if (+balance < +fee.fee)
throw new Error(`Publishing an Avatar requires ${fee.fee}`);

View File

@ -155,7 +155,9 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
const fee = await getFee('ARBITRARY');
await show({
message: t('core:save.publish_qnd', { postProcess: 'capitalize' }),
message: t('core:save_options.publish_qnd', {
postProcess: 'capitalize',
}),
publishFee: fee.fee + ' QORT',
});
const response = await new Promise((res, rej) => {
@ -184,7 +186,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
setSettingsQdnLastUpdated(Date.now());
setInfoSnack({
type: 'success',
message: t('core:message.success.publish_qdn', {
message: t('core:message.success.published_qdn', {
postProcess: 'capitalize',
}),
});

View File

@ -12,6 +12,8 @@
"close": "close",
"continue": "continue",
"continue_logout": "continue to logout",
"create_apps": "create apps",
"create_file": "create file",
"create_thread": "create thread",
"choose_name": "choose a name",
"decline": "decline",
@ -39,11 +41,16 @@
"register_name": "register name",
"remove": "remove",
"save": "save",
"select_app_type": "select App Type",
"select_category": "select Category",
"select_name_app": "select Name/App",
"start_minting": "start minting",
"unpin": "unpin",
"unpin_from_dashboard": "unpin from dashboard"
},
"admin": "admin",
"app": "app",
"app_service_type": "app service type",
"category": "category",
"core": {
"block_height": "block height",
@ -83,7 +90,8 @@
"incorrect_password": "incorrect password",
"minting_account_add": "unable to add minting account",
"minting_account_remove": "unable to remove minting account",
"missing_field": "missing: {{ field }}",
"missing_fields": "missing: {{ fields }}",
"publish_app": "unable to publish app",
"save_qdn": "unable to save to QDN"
},
"generic": {
@ -93,8 +101,11 @@
"name_registration": "your balance is {{ balance }} QORT. A name registration requires a {{ fee }} QORT fee",
"name_unavailable": "{{ name }} is unavailable",
"no_description": "no description",
"one_app_per_name": "note: Currently, only one App and Website is allowed per Name.",
"publish_data": "publish data to Qortal: anything from apps to videos. Fully decentralized!",
"secure_ownership": "secure ownership of data published by your name. You can even sell your name, along with your data to a third party."
"publishing": "publishing... Please wait.",
"secure_ownership": "secure ownership of data published by your name. You can even sell your name, along with your data to a third party.",
"select_zip": "select .zip file containing static content:"
},
"question": {
"new_user": "are you a new user?"
@ -107,12 +118,14 @@
},
"success": {
"order_submitted": "your buy order was submitted",
"publish_qdn": "successfully published to QDN",
"published": "successfully published. Please wait a couple minutes for the network to propogate the changes.",
"published_qdn": "successfully published to QDN",
"request_read": "I have read this request",
"transfer": "the transfer was succesful!"
}
},
"minting_status": "minting status",
"name_app": "name/App",
"none": "none",
"page": {
"last": "last",
@ -130,6 +143,7 @@
"no_pinned_changes": "you currently do not have any changes to your pinned apps",
"overwrite_changes": "the app was unable to download your existing QDN-saved pinned apps. Would you like to overwrite those changes?",
"overwrite_qdn": "overwrite to QDN",
"publish_app": "would you like to publish this app?",
"publish_qdn": "would you like to publish your settings to QDN (encrypted)?",
"qdn": "use QDN saving",
"register_name": "you need a registered Qortal name to save your pinned apps to QDN.",
@ -144,6 +158,7 @@
},
"settings": "settings",
"supply": "supply",
"tags": "tags",
"theme": {
"dark": "dark mode",
"light": "light mode"
@ -163,5 +178,6 @@
"wallet": "wallet",
"wallet_other": "wallets"
},
"website": "website",
"welcome": "welcome"
}