mirror of
https://github.com/wassname/talk.git
synced 2026-07-24 13:20:47 +08:00
translations
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import cn from 'classnames';
|
||||
import { t } from 'plugin-api/beta/client/services';
|
||||
import moment from 'moment';
|
||||
import { Button, Icon } from 'plugin-api/beta/client/components/ui';
|
||||
import styles from './AccountDeletionRequestedSign.css';
|
||||
@@ -13,7 +14,7 @@ class AccountDeletionRequestedSign extends React.Component {
|
||||
await cancelAccountDeletion();
|
||||
notify(
|
||||
'success',
|
||||
'Account Deletion Request Cancelled - Your request to delete your account has been cancelled. You may now write comments, reply to comments, and select reactions.'
|
||||
t('talk-plugin-profile-data.delete_request.account_deletion_cancelled')
|
||||
);
|
||||
} catch (err) {
|
||||
notify('error', getErrorMessages(err));
|
||||
@@ -33,24 +34,33 @@ class AccountDeletionRequestedSign extends React.Component {
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<h4 className={styles.title}>
|
||||
<Icon name="warning" className={styles.icon} />Account Deletion
|
||||
Requested
|
||||
<Icon name="warning" className={styles.icon} />{' '}
|
||||
{t(
|
||||
'talk-plugin-profile-data.delete_request.account_deletion_requested'
|
||||
)}
|
||||
</h4>
|
||||
<p className={styles.description}>
|
||||
A request to delete your account was received on{' '}
|
||||
{t('talk-plugin-profile-data.delete_request.received_on')}
|
||||
{deletionScheduledFor}.
|
||||
</p>
|
||||
<p className={styles.description}>
|
||||
If you would like to continue leaving comments, replies or reactions,
|
||||
you may cancel your request to delete your account below{' '}
|
||||
<b>before {deletionScheduledOn}</b>.
|
||||
{t(
|
||||
'talk-plugin-profile-data.delete_request.cancel_request_description'
|
||||
)}
|
||||
<b>
|
||||
{' '}
|
||||
{t('talk-plugin-profile-data.delete_request.before')}{' '}
|
||||
{deletionScheduledOn}
|
||||
</b>.
|
||||
</p>
|
||||
<div className={styles.actions}>
|
||||
<Button
|
||||
className={cn(styles.button, styles.secondary)}
|
||||
onClick={this.cancelAccountDeletion}
|
||||
>
|
||||
Cancel Account Deletion Request
|
||||
{t(
|
||||
'talk-plugin-profile-data.delete_request.cancel_account_deletion_request'
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,7 @@ import styles from './DeleteMyAccount.css';
|
||||
import { Button } from 'plugin-api/beta/client/components/ui';
|
||||
import DeleteMyAccountDialog from './DeleteMyAccountDialog';
|
||||
import { getErrorMessages } from 'coral-framework/utils';
|
||||
import { t } from 'plugin-api/beta/client/services';
|
||||
|
||||
const initialState = { showDialog: false };
|
||||
|
||||
@@ -30,7 +31,7 @@ class DeleteMyAccount extends React.Component {
|
||||
await cancelAccountDeletion();
|
||||
notify(
|
||||
'success',
|
||||
'Account Deletion Request Cancelled - Your request to delete your account has been cancelled. You may now write comments, reply to comments, and select reactions.'
|
||||
t('talk-plugin-profile-data.delete_request.account_deletion_requested')
|
||||
);
|
||||
} catch (err) {
|
||||
notify('error', getErrorMessages(err));
|
||||
@@ -41,7 +42,10 @@ class DeleteMyAccount extends React.Component {
|
||||
const { requestAccountDeletion, notify } = this.props;
|
||||
try {
|
||||
await requestAccountDeletion();
|
||||
notify('success', 'Account Deletion Requested');
|
||||
notify(
|
||||
'success',
|
||||
t('talk-plugin-profile-data.delete_request.account_deletion_requested')
|
||||
);
|
||||
} catch (err) {
|
||||
notify('error', getErrorMessages(err));
|
||||
}
|
||||
@@ -62,7 +66,7 @@ class DeleteMyAccount extends React.Component {
|
||||
'talk-plugin-auth--delete-my-account-description'
|
||||
)}
|
||||
>
|
||||
Delete My Account
|
||||
{t('talk-plugin-profile-data.delete_request.delete_my_account')}
|
||||
</h3>
|
||||
<p
|
||||
className={cn(
|
||||
@@ -70,8 +74,9 @@ class DeleteMyAccount extends React.Component {
|
||||
'talk-plugin-auth--delete-my-account-description'
|
||||
)}
|
||||
>
|
||||
Deleting your account will permanently erase your profile and remove
|
||||
all your comments from this site.
|
||||
{t(
|
||||
'talk-plugin-profile-data.delete_request.delete_my_account_description'
|
||||
)}
|
||||
</p>
|
||||
<p
|
||||
className={cn(
|
||||
@@ -80,18 +85,19 @@ class DeleteMyAccount extends React.Component {
|
||||
)}
|
||||
>
|
||||
{scheduledDeletionDate &&
|
||||
`You have already submitted a request to delete your account.
|
||||
Your account will be deleted on ${moment(
|
||||
scheduledDeletionDate
|
||||
).format('MMM Do YYYY, h:mm:ss a')}. You may
|
||||
cancel the request until that time`}
|
||||
t(
|
||||
'talk-plugin-profile-data.delete_request.already_submitted_request_description',
|
||||
moment(scheduledDeletionDate).format('MMM Do YYYY, h:mm:ss a')
|
||||
)}
|
||||
</p>
|
||||
{scheduledDeletionDate ? (
|
||||
<Button
|
||||
className={cn(styles.button, styles.secondary)}
|
||||
onClick={this.cancelAccountDeletion}
|
||||
>
|
||||
Cancel Account Deletion Request
|
||||
{t(
|
||||
'talk-plugin-profile-data.delete_request.cancel_account_deletion_request'
|
||||
)}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
@@ -99,7 +105,7 @@ class DeleteMyAccount extends React.Component {
|
||||
icon="delete"
|
||||
onClick={this.showDialog}
|
||||
>
|
||||
Delete My Account
|
||||
{t('talk-plugin-profile-data.delete_request.delete_my_account')}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -10,3 +10,13 @@ en:
|
||||
days: "{0} days"
|
||||
hour: "{0} hour"
|
||||
day: "{0} day"
|
||||
delete_request:
|
||||
account_deletion_cancelled: 'Account Deletion Request Cancelled - Your request to delete your account has been cancelled. You may now write comments, reply to comments, and select reactions.'
|
||||
account_deletion_requested: 'Account Deletion Requested'
|
||||
received_on: "A request to delete your account was received on "
|
||||
cancel_request_description: "If you would like to continue leaving comments, replies or reactions, you may cancel your request to delete your account below"
|
||||
before: "before"
|
||||
cancel_account_deletion_request: "Cancel Account Deletion Request"
|
||||
delete_my_account: "Delete My Account"
|
||||
delete_my_account_description: "Deleting your account will permanently erase your profile and remove all your comments from this site."
|
||||
already_submitted_request_description: "You have already submitted a request to delete your account. Your account will be deleted on {0}. You may cancel the request until that time"
|
||||
Reference in New Issue
Block a user