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

View File

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

View File

@ -65,6 +65,7 @@ export const MainAvatar = ({ myName, balance, setOpenSnack, setInfoSnack }) => {
const publishAvatar = async () => { const publishAvatar = async () => {
try { try {
// TODO translate
const fee = await getFee('ARBITRARY'); const fee = await getFee('ARBITRARY');
if (+balance < +fee.fee) if (+balance < +fee.fee)
throw new Error(`Publishing an Avatar requires ${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'); const fee = await getFee('ARBITRARY');
await show({ await show({
message: t('core:save.publish_qnd', { postProcess: 'capitalize' }), message: t('core:save_options.publish_qnd', {
postProcess: 'capitalize',
}),
publishFee: fee.fee + ' QORT', publishFee: fee.fee + ' QORT',
}); });
const response = await new Promise((res, rej) => { const response = await new Promise((res, rej) => {
@ -184,7 +186,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
setSettingsQdnLastUpdated(Date.now()); setSettingsQdnLastUpdated(Date.now());
setInfoSnack({ setInfoSnack({
type: 'success', type: 'success',
message: t('core:message.success.publish_qdn', { message: t('core:message.success.published_qdn', {
postProcess: 'capitalize', postProcess: 'capitalize',
}), }),
}); });

View File

@ -12,6 +12,8 @@
"close": "close", "close": "close",
"continue": "continue", "continue": "continue",
"continue_logout": "continue to logout", "continue_logout": "continue to logout",
"create_apps": "create apps",
"create_file": "create file",
"create_thread": "create thread", "create_thread": "create thread",
"choose_name": "choose a name", "choose_name": "choose a name",
"decline": "decline", "decline": "decline",
@ -39,11 +41,16 @@
"register_name": "register name", "register_name": "register name",
"remove": "remove", "remove": "remove",
"save": "save", "save": "save",
"select_app_type": "select App Type",
"select_category": "select Category",
"select_name_app": "select Name/App",
"start_minting": "start minting", "start_minting": "start minting",
"unpin": "unpin", "unpin": "unpin",
"unpin_from_dashboard": "unpin from dashboard" "unpin_from_dashboard": "unpin from dashboard"
}, },
"admin": "admin", "admin": "admin",
"app": "app",
"app_service_type": "app service type",
"category": "category", "category": "category",
"core": { "core": {
"block_height": "block height", "block_height": "block height",
@ -83,7 +90,8 @@
"incorrect_password": "incorrect password", "incorrect_password": "incorrect password",
"minting_account_add": "unable to add minting account", "minting_account_add": "unable to add minting account",
"minting_account_remove": "unable to remove 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" "save_qdn": "unable to save to QDN"
}, },
"generic": { "generic": {
@ -93,8 +101,11 @@
"name_registration": "your balance is {{ balance }} QORT. A name registration requires a {{ fee }} QORT fee", "name_registration": "your balance is {{ balance }} QORT. A name registration requires a {{ fee }} QORT fee",
"name_unavailable": "{{ name }} is unavailable", "name_unavailable": "{{ name }} is unavailable",
"no_description": "no description", "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!", "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": { "question": {
"new_user": "are you a new user?" "new_user": "are you a new user?"
@ -107,12 +118,14 @@
}, },
"success": { "success": {
"order_submitted": "your buy order was submitted", "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", "request_read": "I have read this request",
"transfer": "the transfer was succesful!" "transfer": "the transfer was succesful!"
} }
}, },
"minting_status": "minting status", "minting_status": "minting status",
"name_app": "name/App",
"none": "none", "none": "none",
"page": { "page": {
"last": "last", "last": "last",
@ -130,6 +143,7 @@
"no_pinned_changes": "you currently do not have any changes to your pinned apps", "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_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", "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)?", "publish_qdn": "would you like to publish your settings to QDN (encrypted)?",
"qdn": "use QDN saving", "qdn": "use QDN saving",
"register_name": "you need a registered Qortal name to save your pinned apps to QDN.", "register_name": "you need a registered Qortal name to save your pinned apps to QDN.",
@ -144,6 +158,7 @@
}, },
"settings": "settings", "settings": "settings",
"supply": "supply", "supply": "supply",
"tags": "tags",
"theme": { "theme": {
"dark": "dark mode", "dark": "dark mode",
"light": "light mode" "light": "light mode"
@ -163,5 +178,6 @@
"wallet": "wallet", "wallet": "wallet",
"wallet_other": "wallets" "wallet_other": "wallets"
}, },
"website": "website",
"welcome": "welcome" "welcome": "welcome"
} }