From f6d3f4cb14a8ebb24657bc686068222c550f3fb2 Mon Sep 17 00:00:00 2001 From: okbel Date: Thu, 3 May 2018 13:32:52 -0300 Subject: [PATCH] translations --- .../components/DeleteMyAccountDialog.js | 5 ++- .../components/DeleteMyAccountFinalStep.js | 31 +++++++++++++------ .../client/components/DeleteMyAccountStep0.js | 13 ++++---- .../client/components/DeleteMyAccountStep1.js | 21 +++++++------ .../client/components/DeleteMyAccountStep2.js | 13 ++++---- .../client/components/DeleteMyAccountStep3.js | 18 ++++++----- .../components/DownloadCommentHistory.js | 5 +-- .../client/translations.yml | 30 +++++++++++++++++- 8 files changed, 91 insertions(+), 45 deletions(-) diff --git a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountDialog.js b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountDialog.js index 35069384c..f6ab9c2ce 100644 --- a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountDialog.js +++ b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountDialog.js @@ -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 { × -

Delete My Account

+

+ {t('talk-plugin-profile-data.delete_request.delete_my_account')} +

{step === 0 && ( (

- 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' + )}

- Your account is scheduled to be deleted at: + {t( + 'talk-plugin-profile-data.delete_request.your_account_deletion_scheduled' + )} - Account Deletion Date and Time + {0}

- Changed your mind? Simply go to your account again before - this time and click “Cancel Account Deletion Request.” + + {' '} + {t('talk-plugin-profile-data.delete_request.changed_your_mind')} + {' '} + {t('talk-plugin-profile-data.delete_request.simply_go_to')} “ + {t( + 'talk-plugin-profile-data.delete_request.cancel_account_deletion_request' + )}. +

- Tell us why. Wed like to know why you chose to delete - your account. Send us feedback on our comment system by emailing. + + {t('talk-plugin-profile-data.delete_request.tell_us_why')}. + {' '} + {t('talk-plugin-profile-data.delete_request.feedback_copy')}

@@ -37,7 +50,7 @@ const DeleteMyAccountFinalStep = props => ( onClick={props.finish} full > - Done + {t('talk-plugin-profile-data.delete_request.done')}
diff --git a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep0.js b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep0.js index 901466d3b..468c96e94 100644 --- a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep0.js +++ b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep0.js @@ -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 => (

- You are attempting to delete your account. This means: + {t('talk-plugin-profile-data.delete_request.you_are_attempting')}

  • - All of your comments are removed from this site + {t('talk-plugin-profile-data.delete_request.item_1')}
  • - All of your comments are deleted from our database + {t('talk-plugin-profile-data.delete_request.item_2')}
  • - Your username and email address are removed from our system + {t('talk-plugin-profile-data.delete_request.item_3')}
@@ -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')}
diff --git a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep1.js b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep1.js index ace020c65..7408df688 100644 --- a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep1.js +++ b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep1.js @@ -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 => (
-

When will my account be deleted?

-

- Your account will be deleted 24 hours after your request has been - submitted. -

- Can I still write comments until my account is deleted?{' '} + {t('talk-plugin-profile-data.delete_request.step1.subtitle')}

- 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')} +

+

+ {t('talk-plugin-profile-data.delete_request.step1.subtitle_2')} +

+

+ {t('talk-plugin-profile-data.delete_request.step1.description_2')}

diff --git a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep2.js b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep2.js index 8ef14445e..8976c7dcd 100644 --- a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep2.js +++ b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep2.js @@ -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 => (

- 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')}

- To download your comment history go to: + {t('talk-plugin-profile-data.delete_request.step2.to_download')} - My Profile {`>`} Download My Comment History + {t('talk-plugin-profile-data.delete_request.step2.path')}

@@ -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')}
diff --git a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep3.js b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep3.js index 4c87bbcf2..dfbe9bf1f 100644 --- a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep3.js +++ b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountStep3.js @@ -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 (

- Are you sure you want to delete your account? + {t('talk-plugin-profile-data.delete_request.step3.subtitle')}

- 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')}

@@ -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')}
diff --git a/plugins/talk-plugin-profile-data/client/components/DownloadCommentHistory.js b/plugins/talk-plugin-profile-data/client/components/DownloadCommentHistory.js index 398e2a640..feff6b582 100644 --- a/plugins/talk-plugin-profile-data/client/components/DownloadCommentHistory.js +++ b/plugins/talk-plugin-profile-data/client/components/DownloadCommentHistory.js @@ -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)); } diff --git a/plugins/talk-plugin-profile-data/client/translations.yml b/plugins/talk-plugin-profile-data/client/translations.yml index e0b275224..839154446 100644 --- a/plugins/talk-plugin-profile-data/client/translations.yml +++ b/plugins/talk-plugin-profile-data/client/translations.yml @@ -10,6 +10,7 @@ en: days: "{0} days" hour: "{0} hour" day: "{0} day" + download_preparing: "Account Download Preparing - Check your email shortly for a download link" 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' @@ -19,4 +20,31 @@ en: 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" \ No newline at end of file + 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" + your_request_submitted_description: "Your request has been submitted and confirmation has been sent to the email address associated with your account." + your_account_deletion_scheduled: "Your account is scheduled to be deleted at:" + changed_your_mind: "Changed your mind?" + simply_go_to: "Simply go to your account again before this time and click" + tell_us_why: "Tell us why" + feedback_copy: "We'd like to know why you chose to delete your account. Send us feedback on our comment system by emailing." + done: "Done" + cancel: "Cancel" + proceed: "Proceed" + input_is_not_correct: "The input is not correct" + you_are_attempting: "You are attempting to delete your account. This means:" + item_1: "All of your comments are removed from this site" + item_2: "All of your comments are deleted from our database" + item_3: "Your username and email address are removed from our system" + step1: + subtitle: "When will my account be deleted?" + description: "Your account will be deleted 24 hours after your request has been submitted." + subtitle_2: "Can I still write comments until my account is deleted?" + description_2: "No. Once you have requested account deletion, you can no longer write comments, reply to comments, or select reactions." + step2: + 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." + to_download: "To download your comment history go to:" + path: "My Profile > Download My Comment History" + step3: + subtitle: "Are you sure you want to delete your account?" + description: "To confirm you would like to delete your account please type in the following phrase into the text box below:" + type_to_confirm: "Type phrase below to confirm"