translations

This commit is contained in:
okbel
2018-05-03 13:32:52 -03:00
parent 94b3ab4ac8
commit f6d3f4cb14
8 changed files with 91 additions and 45 deletions
@@ -8,6 +8,7 @@ import DeleteMyAccountStep1 from './DeleteMyAccountStep1';
import DeleteMyAccountStep2 from './DeleteMyAccountStep2';
import DeleteMyAccountStep3 from './DeleteMyAccountStep3';
import DeleteMyAccountFinalStep from './DeleteMyAccountFinalStep';
import { t } from 'plugin-api/beta/client/services';
const initialState = { step: 0, formData: {} };
@@ -47,7 +48,9 @@ class DeleteMyAccountDialog extends React.Component {
<span className={styles.close} onClick={this.cancel}>
×
</span>
<h3 className={styles.title}>Delete My Account</h3>
<h3 className={styles.title}>
{t('talk-plugin-profile-data.delete_request.delete_my_account')}
</h3>
<StepProgress currentStep={this.state.step} totalSteps={4} />
{step === 0 && (
<DeleteMyAccountStep0
@@ -3,32 +3,45 @@ import cn from 'classnames';
import PropTypes from 'prop-types';
import { Button, Icon } from 'plugin-api/beta/client/components/ui';
import styles from './DeleteMyAccountStep.css';
import { t } from 'plugin-api/beta/client/services';
const DeleteMyAccountFinalStep = props => (
<div className={styles.step}>
<p className={styles.description}>
Your request has been submitted and confirmation has been sent to the
email address associated with your account.
{t(
'talk-plugin-profile-data.delete_request.your_request_submitted_description'
)}
</p>
<div className={cn(styles.box, styles.scheduledDeletion)}>
<strong className={styles.block}>
Your account is scheduled to be deleted at:
{t(
'talk-plugin-profile-data.delete_request.your_account_deletion_scheduled'
)}
</strong>
<strong className={styles.block}>
<Icon name="access_time" className={styles.timeIcon} />
<span>Account Deletion Date and Time</span>
<span>{0}</span>
</strong>
</div>
<p className={styles.description}>
<strong>Changed your mind?</strong> Simply go to your account again before
this time and click <strong>Cancel Account Deletion Request.</strong>
<strong>
{' '}
{t('talk-plugin-profile-data.delete_request.changed_your_mind')}
</strong>{' '}
{t('talk-plugin-profile-data.delete_request.simply_go_to')} <strong>
{t(
'talk-plugin-profile-data.delete_request.cancel_account_deletion_request'
)}.
</strong>
</p>
<p className={styles.description}>
<strong>Tell us why.</strong> Wed like to know why you chose to delete
your account. Send us feedback on our comment system by emailing.
<strong>
{t('talk-plugin-profile-data.delete_request.tell_us_why')}.
</strong>{' '}
{t('talk-plugin-profile-data.delete_request.feedback_copy')}
</p>
<div className={cn(styles.actions, styles.columnView)}>
@@ -37,7 +50,7 @@ const DeleteMyAccountFinalStep = props => (
onClick={props.finish}
full
>
Done
{t('talk-plugin-profile-data.delete_request.done')}
</Button>
</div>
</div>
@@ -3,29 +3,30 @@ import PropTypes from 'prop-types';
import cn from 'classnames';
import { Button, Icon } from 'plugin-api/beta/client/components/ui';
import styles from './DeleteMyAccountStep.css';
import { t } from 'plugin-api/beta/client/services';
const DeleteMyAccountStep0 = props => (
<div className={styles.step}>
<p className={styles.description}>
You are attempting to delete your account. This means:
{t('talk-plugin-profile-data.delete_request.you_are_attempting')}
</p>
<ul className={styles.list}>
<li className={styles.item}>
<Icon name="done" className={styles.itemIcon} />
<span className={styles.text}>
All of your comments are removed from this site
{t('talk-plugin-profile-data.delete_request.item_1')}
</span>
</li>
<li className={styles.item}>
<Icon name="done" className={styles.itemIcon} />
<span className={styles.text}>
All of your comments are deleted from our database
{t('talk-plugin-profile-data.delete_request.item_2')}
</span>
</li>
<li className={styles.item}>
<Icon name="done" className={styles.itemIcon} />
<span className={styles.text}>
Your username and email address are removed from our system
{t('talk-plugin-profile-data.delete_request.item_3')}
</span>
</li>
</ul>
@@ -34,13 +35,13 @@ const DeleteMyAccountStep0 = props => (
className={cn(styles.button, styles.cancel)}
onClick={props.cancel}
>
Cancel
{t('talk-plugin-profile-data.delete_request.cancel')}
</Button>
<Button
className={cn(styles.button, styles.proceed)}
onClick={props.goToNextStep}
>
Proceed
{t('talk-plugin-profile-data.delete_request.proceed')}
</Button>
</div>
</div>
@@ -3,33 +3,34 @@ import PropTypes from 'prop-types';
import cn from 'classnames';
import { Button } from 'plugin-api/beta/client/components/ui';
import styles from './DeleteMyAccountStep.css';
import { t } from 'plugin-api/beta/client/services';
const DeleteMyAccountStep1 = props => (
<div className={styles.step}>
<h4 className={styles.subTitle}>When will my account be deleted?</h4>
<p className={styles.description}>
Your account will be deleted 24 hours after your request has been
submitted.
</p>
<h4 className={styles.subTitle}>
Can I still write comments until my account is deleted?{' '}
{t('talk-plugin-profile-data.delete_request.step1.subtitle')}
</h4>
<p className={styles.description}>
No. Once you have requested account deletion, you can no longer write
comments, reply to comments, or select reactions.
{t('talk-plugin-profile-data.delete_request.step1.description')}
</p>
<h4 className={styles.subTitle}>
{t('talk-plugin-profile-data.delete_request.step1.subtitle_2')}
</h4>
<p className={styles.description}>
{t('talk-plugin-profile-data.delete_request.step1.description_2')}
</p>
<div className={cn(styles.actions)}>
<Button
className={cn(styles.button, styles.cancel)}
onClick={props.cancel}
>
Cancel
{t('talk-plugin-profile-data.delete_request.cancel')}
</Button>
<Button
className={cn(styles.button, styles.proceed)}
onClick={props.goToNextStep}
>
Proceed
{t('talk-plugin-profile-data.delete_request.proceed')}
</Button>
</div>
</div>
@@ -3,18 +3,17 @@ import PropTypes from 'prop-types';
import cn from 'classnames';
import { Button } from 'plugin-api/beta/client/components/ui';
import styles from './DeleteMyAccountStep.css';
import { t } from 'plugin-api/beta/client/services';
const DeleteMyAccountStep2 = props => (
<div className={styles.step}>
<p className={styles.description}>
Before your account is deleted, we recommend you download your comment
history for your records. After your account is deleted, you will be
unable to request your comment history.
{t('talk-plugin-profile-data.delete_request.step2.description')}
</p>
<p className={styles.description}>
To download your comment history go to:
{t('talk-plugin-profile-data.delete_request.step2.to_download')}
<strong className={styles.block}>
My Profile {`>`} Download My Comment History
{t('talk-plugin-profile-data.delete_request.step2.path')}
</strong>
</p>
<div className={cn(styles.actions)}>
@@ -22,13 +21,13 @@ const DeleteMyAccountStep2 = props => (
className={cn(styles.button, styles.cancel)}
onClick={props.cancel}
>
Cancel
{t('talk-plugin-profile-data.delete_request.step2.cancel')}
</Button>
<Button
className={cn(styles.button, styles.proceed)}
onClick={props.goToNextStep}
>
Proceed
{t('talk-plugin-profile-data.delete_request.step2.proceed')}
</Button>
</div>
</div>
@@ -4,6 +4,7 @@ import cn from 'classnames';
import { Button } from 'plugin-api/beta/client/components/ui';
import styles from './DeleteMyAccountStep.css';
import InputField from './InputField';
import { t } from 'plugin-api/beta/client/services';
const initialState = {
showError: false,
@@ -42,11 +43,10 @@ class DeleteMyAccountStep3 extends React.Component {
return (
<div className={styles.step}>
<h4 className={styles.subTitle}>
Are you sure you want to delete your account?
{t('talk-plugin-profile-data.delete_request.step3.subtitle')}
</h4>
<p className={styles.description}>
To confirm you would like to delete your account please type in the
following phrase into the text box below:
{t('talk-plugin-profile-data.delete_request.step3.description')}
</p>
<input
className={styles.textBox}
@@ -56,13 +56,17 @@ class DeleteMyAccountStep3 extends React.Component {
/>
<InputField
id="confirmPhrase"
label={'Type phrase below to confirm'}
label={t(
'talk-plugin-profile-data.delete_request.step3.type_to_confirm'
)}
name="confirmPhrase"
type="text"
onChange={this.props.onChange}
defaultValue=""
hasError={this.formHasError()}
errorMsg={'The input is not correct'}
errorMsg={t(
'talk-plugin-profile-data.delete_request.input_is_not_correct'
)}
showError={this.state.showError}
columnDisplay
/>
@@ -71,13 +75,13 @@ class DeleteMyAccountStep3 extends React.Component {
className={cn(styles.button, styles.cancel)}
onClick={this.props.cancel}
>
Cancel
{t('talk-plugin-profile-data.delete_request.cancel')}
</Button>
<Button
className={cn(styles.button, styles.danger)}
onClick={this.deleteAndContinue}
>
Delete My Account
{t('talk-plugin-profile-data.delete_request.delete_my_account')}
</Button>
</div>
</div>
@@ -28,10 +28,7 @@ class DownloadCommentHistory extends Component {
const { requestDownloadLink, notify } = this.props;
try {
await requestDownloadLink();
notify(
'success',
'Account Download Preparing - Check your email shortly for a download link'
);
notify('success', t('download_request.download_preparing'));
} catch (err) {
notify('error', getErrorMessages(err));
}