mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-07-23 04:36:52 +00:00
Add translations to app
This commit is contained in:
@@ -28,6 +28,7 @@ import { CustomizedSnackbars } from '../Snackbar/Snackbar';
|
||||
import { getFee } from '../../background';
|
||||
import { MyContext } from '../../App';
|
||||
import { subscribeToEvent, unsubscribeFromEvent } from '../../utils/events';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const Label = styled('label')`
|
||||
display: block;
|
||||
@@ -84,6 +85,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
setMaxBlock(event.target.value as string);
|
||||
};
|
||||
|
||||
const { t } = useTranslation(['core']);
|
||||
const theme = useTheme();
|
||||
|
||||
const handleCreateGroup = async () => {
|
||||
@@ -91,9 +93,11 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
if (!name) throw new Error('Please provide a name');
|
||||
if (!description) throw new Error('Please provide a description');
|
||||
|
||||
const fee = await getFee('CREATE_GROUP'); // TODO translate
|
||||
const fee = await getFee('CREATE_GROUP');
|
||||
await show({
|
||||
message: 'Would you like to perform an CREATE_GROUP transaction?',
|
||||
message: t('core:question.perform_create_group', {
|
||||
postProcess: 'capitalize',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
|
||||
@@ -111,10 +115,11 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
if (!response?.error) {
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message:
|
||||
'Successfully created group. It may take a couple of minutes for the changes to propagate',
|
||||
message: t('core:result.success.group_creation', {
|
||||
postProcess: 'capitalize',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
setOpenSnack(true); // TODO translate
|
||||
setTxList((prev) => [
|
||||
{
|
||||
...response,
|
||||
|
@@ -608,7 +608,7 @@ export const Thread = ({
|
||||
>
|
||||
<MailIconImg src={ReturnSVG} />
|
||||
<ComposeP>
|
||||
{t('core:return_to_thread', { postProcess: 'capitalize' })}
|
||||
{t('core:action.return_to_thread', { postProcess: 'capitalize' })}
|
||||
</ComposeP>
|
||||
</ShowMessageReturnButton>
|
||||
{/* Conditionally render the scroll buttons */}
|
||||
@@ -960,7 +960,7 @@ export const Thread = ({
|
||||
color: 'white',
|
||||
}}
|
||||
>
|
||||
{t('core:refetch_page', { postProcess: 'capitalize' })}
|
||||
{t('core:action.refetch_page', { postProcess: 'capitalize' })}
|
||||
</Button>
|
||||
</Box>
|
||||
</>
|
||||
|
Reference in New Issue
Block a user