mirror of
https://github.com/wassname/talk.git
synced 2026-09-13 13:10:43 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4c4032b0d | ||
|
|
2ea0d51613 | ||
|
|
f2564f4eda | ||
|
|
73040b1314 | ||
|
|
c3c106c7b0 | ||
|
|
8faf69ce48 |
@@ -1,4 +1,4 @@
|
||||
Copyright 2018 Mozilla Foundation
|
||||
Copyright 2019 Vox Media, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Talk · [](https://circleci.com/gh/coralproject/talk) · [](CONTRIBUTING.md#pull-requests)
|
||||
|
||||
---
|
||||
|
||||
> :construction: **NOTE:** We're currently building v5 of this platform, check it out in our [next branch](https://github.com/coralproject/talk/tree/next) :construction_worker_man: :construction_worker_woman:
|
||||
|
||||
---
|
||||
|
||||
Online comments are broken. Our open-source commenting platform, Talk, rethinks how moderation, comment display, and conversation function, creating the opportunity for safer, smarter discussions around your work. [Read more about Talk here](https://coralproject.net/talk).
|
||||
|
||||
Built with <3 by The Coral Project, a part of [Vox Media](https://www.voxmedia.com/).
|
||||
|
||||
@@ -81,7 +81,7 @@ class EmbedContainer extends React.Component {
|
||||
},
|
||||
}
|
||||
) => {
|
||||
notify('info', t('your_username_has_been_rejected'));
|
||||
notify('info', t('your_username_has_been_rejected_not_in_line'));
|
||||
props.updateStatus(state.status);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -48,7 +48,7 @@ class ChangeUsername extends Component {
|
||||
return (
|
||||
<RestrictedMessageBox>
|
||||
<div className="talk-change-username">
|
||||
<span>{t('framework.edit_name.msg')}</span>
|
||||
<span>{t('framework.edit_name.rejected')}</span>
|
||||
<div className={styles.alert}>{alert}</div>
|
||||
<label htmlFor="username" className="screen-reader-text">
|
||||
{t('framework.edit_name.label')}
|
||||
|
||||
@@ -312,7 +312,6 @@ ar:
|
||||
button: أرسل
|
||||
error: 'يمكن أن تحتوي أسماء المستخدمين على أحرف, أرقام و _ فقط'
|
||||
label: 'اسم مستخدم جديد'
|
||||
msg: 'تم تعليق حسابك حاليا نظرا لأن اسم المستخدم قد اعتبر غير لائق. لاستعادة حسابك، يرجى إدخال اسم مستخدم جديد. يرجى الاتصال بنا إذا كان لديك أي أسئلة.'
|
||||
my_comments: تعليقاتي
|
||||
my_profile: ملفي
|
||||
new_count: 'شاهد {0} أكثر {1}'
|
||||
@@ -559,4 +558,3 @@ ar:
|
||||
view_conversation: 'عرض المحادثة'
|
||||
your_account_has_been_banned: 'تم حظر حسابك.'
|
||||
your_account_has_been_suspended: 'تم تعليق حسابك مؤقتا.'
|
||||
your_username_has_been_rejected: 'تم تعليق حسابك لعدم صلاحية اسم المستخدم الخاصة بك. لاستعادة حسابك رجاء أدخل اسم مستخدم جديدة.'
|
||||
|
||||
@@ -266,7 +266,6 @@ da:
|
||||
button: Indsend
|
||||
error: 'Brugernavne kan kun indeholde bogstaver og _'
|
||||
label: 'Nyt brugernavn'
|
||||
msg: 'Din konto er midlertidigt suspenderet, fordi dit brugernavn er blevet anset for upassende. For at gendanne din konto skal du indtaste et nyt brugernavn. Kontakt os venligst, hvis du har spørgsmål.'
|
||||
my_comments: 'Mine kommentarer'
|
||||
my_profile: 'Min profil'
|
||||
new_count: 'Se {0} mere {1}'
|
||||
@@ -473,4 +472,3 @@ da:
|
||||
view_conversation: 'Vis samtale'
|
||||
your_account_has_been_banned: 'Din konto er blevet banned.'
|
||||
your_account_has_been_suspended: 'Din konto er midlertidigt suspenderet'
|
||||
your_username_has_been_rejected: 'Din konto er blevet suspenderet fordi dit brugernavn er blevet anset for upassende. For at gendanne din konto, venligst indtast et nyt brugernavn.'
|
||||
|
||||
@@ -337,7 +337,6 @@ de:
|
||||
button: Senden
|
||||
error: 'Nutzernamen dürfen nur Buchstaben, Zahlen und _ enthalten'
|
||||
label: 'Neuer Nutzername'
|
||||
msg: 'Ihr Konto ist vorübergehend gesperrt, da Ihr Nutzername als unangemessen eingestuft wurde. Um Ihr Konto wieder herzustellen, geben Sie bitte einen neuen Nutzernamen ein. Bei Fragen, kontaktieren Sie uns bitte.'
|
||||
my_comments: 'Meine Kommentare'
|
||||
my_profile: 'Mein Profil'
|
||||
new_count: '{0} {1} mehr anzeigen'
|
||||
@@ -593,4 +592,3 @@ de:
|
||||
view_conversation: 'Diskussion ansehen'
|
||||
your_account_has_been_banned: 'Ihr Zugang wurde gesperrt.'
|
||||
your_account_has_been_suspended: 'Ihr Zugang wurde vorübergehend gesperrt.'
|
||||
your_username_has_been_rejected: 'Ihr Zugang wurde vorübergehend gesperrt, da Ihr Nutzername als unangemessen eingestuft wurde. Um Ihren Zugang wieder herzustellen, geben Sie bitte einen neuen Nutzernamen ein.'
|
||||
|
||||
+2
-2
@@ -337,7 +337,7 @@ en:
|
||||
button: Submit
|
||||
error: 'Usernames can contain letters numbers and _ only'
|
||||
label: 'New Username'
|
||||
msg: 'Your account is currently suspended because your username has been deemed inappropriate. To restore your account please enter a new username. Please contact us if you have any questions.'
|
||||
rejected: 'Your choice of username has been rejected because it is not in line with our username policies. Please submit another name for moderator approval.'
|
||||
my_comments: 'My Comments'
|
||||
my_profile: 'My profile'
|
||||
new_count: 'View {0} more {1}'
|
||||
@@ -593,4 +593,4 @@ en:
|
||||
view_conversation: 'View Conversation'
|
||||
your_account_has_been_banned: 'Your account has been banned.'
|
||||
your_account_has_been_suspended: 'Your account has been temporarily suspended.'
|
||||
your_username_has_been_rejected: 'Your account has been suspended because your username has been deemed inappropriate. To restore your account please enter a new username.'
|
||||
your_username_has_been_rejected_not_in_line: 'Your choice of username has been rejected because it is not in line with our username policies. Please submit another name for moderator approval.'
|
||||
|
||||
@@ -309,7 +309,6 @@ es:
|
||||
button: Enviar
|
||||
error: 'Nombres de usuarios pueden solamente incluir letras, números y _'
|
||||
label: 'Nuevo Nombre'
|
||||
msg: 'Tu cuenta está suspendida porque tu nombre de usuario ha sido considerado no apropiado para el espacio. Para recuperar la cuenta, por favor ingresar un nuevo nombre de usuario. Contáctanos si tienes alguna pregunta.'
|
||||
my_comments: 'Mis Comentarios'
|
||||
my_profile: 'Mi perfil'
|
||||
new_count: 'Ver {0} más {1} '
|
||||
@@ -542,4 +541,3 @@ es:
|
||||
view_conversation: 'Ver Conversación'
|
||||
your_account_has_been_banned: 'Su cuenta ha sido prohibida.'
|
||||
your_account_has_been_suspended: 'Su cuenta ha sido suspendida.'
|
||||
your_username_has_been_rejected: 'Su cuenta ha sido suspendida porque tu nombre de usuario ha sido considerado no apropiado para el espacio. Para recuperar la cuenta, por favor ingresar un nuevo nombre de usuario.'
|
||||
|
||||
@@ -269,7 +269,6 @@ fi_FI:
|
||||
button: Lähetä
|
||||
error: 'Käyttäjänimissä sallittuja merkkejä ovat ainoastaan kirjaimet, numerot, sekä alaviiva'
|
||||
label: 'Uusi käyttäjänimi'
|
||||
msg: 'Tilisi on suljettu väliaikaisesti, koska käyttäjänimi on todettu sopimattomaksi. Vaihda käyttäjänimi, jos haluat jatkaa tilin käyttöä. Ole meihin yhteydessä, jos sinulla on aiheesta kysyttävää.'
|
||||
my_comments: Kommenttini
|
||||
my_profile: Profiilini
|
||||
new_count: 'Näytä {0} lisää {1}'
|
||||
@@ -466,4 +465,3 @@ fi_FI:
|
||||
view_conversation: 'Näytä keskustelu'
|
||||
your_account_has_been_banned: 'Tilillesi on asetettu kirjoituskielto.'
|
||||
your_account_has_been_suspended: 'Tilisi on väliaikasesti suljettu.'
|
||||
your_username_has_been_rejected: 'Tilisi on suljettu, koska käyttäjänimesi on epäsopiva. Vaihda käyttäjänimeä jatkaaksesi tilin käyttöä.'
|
||||
|
||||
@@ -264,7 +264,6 @@ fr:
|
||||
button: Soumettre
|
||||
error: 'Les noms d''utilisateur ne peuvent contenir que des chiffres, des lettres et "_"'
|
||||
label: 'Nouveau nom d''utilisateur'
|
||||
msg: 'Votre compte est actuellement suspendu car votre nom d''utilisateur a été jugé inapproprié. Pour restaurer votre compte, entrez un nouveau nom d''utilisateur. Contactez-nous si vous avez des questions.'
|
||||
my_comments: 'Mes commentaires'
|
||||
my_profile: 'Mon profil'
|
||||
new_count: 'Voir {0} plus {1}'
|
||||
@@ -462,4 +461,3 @@ fr:
|
||||
view_conversation: 'Afficher la conversation'
|
||||
your_account_has_been_banned: 'Votre compte a été banni.'
|
||||
your_account_has_been_suspended: 'Votre compte a été temporairement suspendu.'
|
||||
your_username_has_been_rejected: 'Votre compte a été suspendu en raison de votre nom d’utilisateur jugé inapproprié. Veuillez saisir un nouveau nom d’utilisateur pour restaurer votre compte.'
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
he:
|
||||
your_account_has_been_suspended: החשבון שלך הושעה באופן זמני.
|
||||
your_account_has_been_banned: החשבון שלך הורחק.
|
||||
your_username_has_been_rejected: החשבון שלך הושעה מפני ששם המשתמש שלך נחשב לא הולם. כדי לשחזר את החשבון שלך, הזן שם משתמש חדש.
|
||||
embed_comments_tab: תגובות
|
||||
bandialog:
|
||||
are_you_sure: "האם אתה בטוח שאתה רוצה לאסור {0}?"
|
||||
@@ -260,7 +259,6 @@ he:
|
||||
button: שלח
|
||||
error: "שמות משתמש יכולים להכיל מספרי אותיות ו- _ בלבד"
|
||||
label: "שם משתמש חדש"
|
||||
msg: "החשבון שלך מושעה כרגע מפני ששם המשתמש שלך נחשב לא הולם. כדי לשחזר את החשבון שלך, הזן שם משתמש חדש. אנא צור איתנו קשר אם יש לך שאלות."
|
||||
changed_name:
|
||||
msg: "שינוי שם המשתמש שלך נמצא בבדיקה על ידי צוות הניהול שלנו."
|
||||
my_comments: "התגובות שלי"
|
||||
|
||||
@@ -321,7 +321,6 @@ it:
|
||||
button: Invia
|
||||
error: 'L''username può contenere solo lettere numeri o _'
|
||||
label: 'Nuovo username'
|
||||
msg: 'Il tuo account è attualmente sospeso perchè il tuo username è considerato inappropriato. Per ripristinare il tuo account inserisci un nuovo username. Contattaci se hai qualche domanda.'
|
||||
my_comments: 'I miei commenti'
|
||||
my_profile: 'Il mio profilo'
|
||||
new_count: 'Visualizza {0} e {1}'
|
||||
@@ -571,4 +570,3 @@ it:
|
||||
view_conversation: 'Visualizza conversazione'
|
||||
your_account_has_been_banned: 'Il tuo account è stato bloccato.'
|
||||
your_account_has_been_suspended: 'Il tuo account è stato temporaneamente sospeso.'
|
||||
your_username_has_been_rejected: 'Il tuo account è stato sospeso perchè il tuo username è ritenuto inappropriato. Per ripristinare il tuo account inserisci un nuovo username.'
|
||||
|
||||
@@ -324,7 +324,6 @@ nl_NL:
|
||||
button: Versturen
|
||||
error: "Gebruikersnamen kunnen alleen cijfers, letters en _ bevatten."
|
||||
label: "Nieuwe gebruikersnaam"
|
||||
msg: "Je account is momenteel geschorst omdat je gebruikersnaam ongepast is bevonden. Om je account te herstellen, moet je je gebruikersnaam herstellen. Neem contact met ons op wanneer je vragen hebt."
|
||||
my_comments: "Mijn reacties"
|
||||
my_profile: "Mijn profiel"
|
||||
new_count: "Bekijk {0} meer {1}"
|
||||
@@ -574,4 +573,3 @@ nl_NL:
|
||||
view_conversation: "Bekijk conversatie"
|
||||
your_account_has_been_banned: "Je account is verbannen."
|
||||
your_account_has_been_suspended: "Je account is tijdelijk geschorst."
|
||||
your_username_has_been_rejected: "Je account is geschorst omdat we je gebruikersnaam ongepast vinden. Verander je gebruikersnaam om hem weer te activeren."
|
||||
|
||||
@@ -285,7 +285,6 @@ pt_BR:
|
||||
button: Enviar
|
||||
error: 'Nomes de usuários podem conter números de letras e _ somente'
|
||||
label: 'Novo usuário'
|
||||
msg: 'Sua conta está suspensa porque seu nome de usuário foi considerado inapropriado. Para restaurar sua conta, insira um novo nome de usuário. Entre em contato conosco se você tiver alguma dúvida.'
|
||||
my_comments: 'Meus comentários'
|
||||
my_profile: 'Meu perfil'
|
||||
new_count: 'Ver {0} {1}'
|
||||
@@ -522,4 +521,3 @@ pt_BR:
|
||||
view_conversation: 'Ver conversa'
|
||||
your_account_has_been_banned: 'Sua conta foi banida.'
|
||||
your_account_has_been_suspended: 'Sua conta foi temporariamente suspensa.'
|
||||
your_username_has_been_rejected: 'Sua conta foi rejeitada porque seu nome de usuário foi considerado inapropriado. Para restaurar sua conta, insira um novo nome de usuário.'
|
||||
|
||||
@@ -323,7 +323,6 @@ sr:
|
||||
button: 'Podnesi'
|
||||
error: 'Došlo je do greške'
|
||||
label: 'Novo korisničko ime'
|
||||
msg: 'Izmjena vašeg korisničkog imena prolazi provjeru našeg tima moderatora'
|
||||
my_comments: 'Moji komentari'
|
||||
my_profile: 'Moj profil'
|
||||
new_count: 'Vidi još {0} / {1}'
|
||||
@@ -573,4 +572,3 @@ sr:
|
||||
view_conversation: 'Vidi razgovor'
|
||||
your_account_has_been_banned: 'Vaš nalog je banovan'
|
||||
your_account_has_been_suspended: 'Vaš nalog je privremeno suspendovan'
|
||||
your_username_has_been_rejected: 'Vaš nalog je suspendovan jer je korisničko ime označeno kao neprikladno. Da povratite nalog, unesite novo korisničko ime'
|
||||
|
||||
@@ -232,7 +232,6 @@ zh_CN:
|
||||
button: 提交
|
||||
error: 用户名只能包含字母、数字跟下划线
|
||||
label: 新用户名
|
||||
msg: 由于您的用户名不当,您的帐号目前被暂停使用。如要恢复您的帐户,请输入一个新的用户名。如有任何疑问,请与我们联系。
|
||||
my_comments: 我的评论
|
||||
my_profile: 我的资料
|
||||
new_count: '查看 {0} 更多 {1}'
|
||||
@@ -411,4 +410,3 @@ zh_CN:
|
||||
view_conversation: 查看对话
|
||||
your_account_has_been_banned: 您的帐户已被禁用。
|
||||
your_account_has_been_suspended: 您的帐户已被暂时停用。
|
||||
your_username_has_been_rejected: 由于您使用了不恰当的用户名,您的帐户已被暂停使用。若需恢复帐户,请输入一个新的用户名
|
||||
|
||||
@@ -228,7 +228,6 @@ zh_TW:
|
||||
button: 提交
|
||||
error: 用戶名只能包含字母、數字和下劃線。
|
||||
label: 新用戶名
|
||||
msg: 由於您的用戶名不當,您的帳號目前已被暫停使用。如要恢復您的帳戶,請輸入一個新的用戶名。如有任何疑問,請與我們聯繫。
|
||||
my_comments: 我的評論
|
||||
my_profile: 我的概況
|
||||
new_count: '查看{0}更多{1}'
|
||||
@@ -407,4 +406,3 @@ zh_TW:
|
||||
view_conversation: 查看對話
|
||||
your_account_has_been_banned: 您的賬戶已被禁用。
|
||||
your_account_has_been_suspended: 您的賬戶已被暫停使用。
|
||||
your_username_has_been_rejected: 由於您使用了不恰當的用戶名,您的帳戶已被暫停使用。若需恢復帳戶,請輸入一個新的用戶名。
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "talk",
|
||||
"version": "4.10.1",
|
||||
"description": "A better commenting experience from Mozilla, The New York Times, and the Washington Post. https://coralproject.net",
|
||||
"version": "4.10.3",
|
||||
"description": "A better commenting experience from Vox Media.",
|
||||
"main": "app.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -36,17 +36,32 @@
|
||||
}
|
||||
|
||||
.button {
|
||||
color: #787D80;
|
||||
background-color: #3498db;
|
||||
border-radius: 2px;
|
||||
background-color: transparent;
|
||||
height: 30px;
|
||||
font-size: 0.9em;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
font-size: 1em;
|
||||
background-color: #3498DB;
|
||||
border: 0;
|
||||
color: white;
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.cancel {
|
||||
background-color: #e0e0e0;
|
||||
border-radius: 2px;
|
||||
border: 0;
|
||||
color: #4f5c67;
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
height: 30px;
|
||||
margin-top: 5px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
|
||||
@@ -14,10 +14,10 @@ import {
|
||||
} from 'coral-framework/lib/validation';
|
||||
import { Form, Field } from 'react-final-form';
|
||||
|
||||
const AddEmailContent = ({ onSubmit }) => (
|
||||
const AddEmailContent = ({ onSubmit, onCancel }) => (
|
||||
<div>
|
||||
<h4 className={styles.title}>
|
||||
{t('talk-plugin-local-auth.add_email.content.title')}
|
||||
{t('talk-plugin-local-auth.add_email.title')}
|
||||
</h4>
|
||||
<p className={styles.description}>
|
||||
{t('talk-plugin-local-auth.add_email.content.description')}
|
||||
@@ -113,6 +113,14 @@ const AddEmailContent = ({ onSubmit }) => (
|
||||
<button className={styles.button} disabled={submitting}>
|
||||
{t('talk-plugin-local-auth.add_email.add_email_address')}
|
||||
</button>
|
||||
<button
|
||||
onClick={onCancel}
|
||||
className={styles.cancel}
|
||||
disabled={submitting}
|
||||
type="button"
|
||||
>
|
||||
{t('talk-plugin-local-auth.add_email.cancel')}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
)}
|
||||
@@ -122,6 +130,7 @@ const AddEmailContent = ({ onSubmit }) => (
|
||||
|
||||
AddEmailContent.propTypes = {
|
||||
onSubmit: PropTypes.func.isRequired,
|
||||
onCancel: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default AddEmailContent;
|
||||
|
||||
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
||||
import { compose, gql } from 'react-apollo';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect, withFragments, excludeIf } from 'plugin-api/beta/client/hocs';
|
||||
import { logout } from 'plugin-api/beta/client/actions/auth';
|
||||
import { notify } from 'coral-framework/actions/notification';
|
||||
import { withAttachLocalAuth } from '../hocs';
|
||||
import { startAttach, finishAttach } from '../actions';
|
||||
@@ -58,6 +59,10 @@ class AddEmailAddressDialog extends React.Component {
|
||||
}
|
||||
};
|
||||
|
||||
handleOnCancel = async () => {
|
||||
this.props.logout();
|
||||
};
|
||||
|
||||
goToNextStep = () => {
|
||||
this.setState(({ step }) => ({
|
||||
step: step + 1,
|
||||
@@ -79,7 +84,12 @@ class AddEmailAddressDialog extends React.Component {
|
||||
id="talk-plugin-local-auth-email-dialog"
|
||||
className={styles.dialog}
|
||||
>
|
||||
{step === 0 && <AddEmailForm onSubmit={this.handleSubmit} />}
|
||||
{step === 0 && (
|
||||
<AddEmailForm
|
||||
onSubmit={this.handleSubmit}
|
||||
onCancel={this.handleOnCancel}
|
||||
/>
|
||||
)}
|
||||
{step === 1 &&
|
||||
!requireEmailConfirmation && (
|
||||
<EmailAddressAdded onDone={this.handleDone} />
|
||||
@@ -98,6 +108,7 @@ AddEmailAddressDialog.propTypes = {
|
||||
notify: PropTypes.func.isRequired,
|
||||
startAttach: PropTypes.func.isRequired,
|
||||
finishAttach: PropTypes.func.isRequired,
|
||||
logout: PropTypes.func.isRequired,
|
||||
root: PropTypes.object,
|
||||
};
|
||||
|
||||
@@ -106,7 +117,7 @@ const mapStateToProps = ({ talkPluginLocalAuth: state }) => ({
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch =>
|
||||
bindActionCreators({ notify, startAttach, finishAttach }, dispatch);
|
||||
bindActionCreators({ notify, startAttach, finishAttach, logout }, dispatch);
|
||||
|
||||
const withData = withFragments({
|
||||
root: gql`
|
||||
|
||||
@@ -32,4 +32,18 @@ class ErrIncorrectPassword extends TalkError {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { ErrLocalProfile, ErrNoLocalProfile, ErrIncorrectPassword };
|
||||
class ErrDuplicateLocalProfile extends TalkError {
|
||||
constructor() {
|
||||
super('Duplicate local profile attachment', {
|
||||
translation_key: 'DUPLICATE_LOCAL_PROFILE',
|
||||
status: 400,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
ErrDuplicateLocalProfile,
|
||||
ErrLocalProfile,
|
||||
ErrNoLocalProfile,
|
||||
ErrIncorrectPassword,
|
||||
};
|
||||
|
||||
@@ -3,6 +3,7 @@ const {
|
||||
ErrNoLocalProfile,
|
||||
ErrLocalProfile,
|
||||
ErrIncorrectPassword,
|
||||
ErrDuplicateLocalProfile,
|
||||
} = require('./errors');
|
||||
const { get } = require('lodash');
|
||||
|
||||
@@ -115,6 +116,11 @@ async function attachUserLocalAuth(ctx, email, password) {
|
||||
// Validate the password.
|
||||
await Users.isValidPassword(password);
|
||||
|
||||
// See if this email address already has a local profile setup.
|
||||
if (await Users.findLocalUser(email)) {
|
||||
throw new ErrDuplicateLocalProfile();
|
||||
}
|
||||
|
||||
// Hash the new password.
|
||||
const hashedPassword = await Users.hashPassword(password);
|
||||
|
||||
@@ -160,7 +166,7 @@ async function attachUserLocalAuth(ctx, email, password) {
|
||||
await Users.sendEmailConfirmation(updatedUser, email, redirectUri);
|
||||
} catch (err) {
|
||||
if (err.code === 11000) {
|
||||
throw new ErrEmailTaken();
|
||||
throw new ErrDuplicateLocalProfile();
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ ar:
|
||||
required_field: "هذه الخانة مطلوبه"
|
||||
done: "تم"
|
||||
content:
|
||||
title: "أضف عنوان بريد إلكتروني"
|
||||
description: "لمزيد من الأمان ، نطلب من المستخدمين إضافة عنوان بريد إلكتروني إلى حساباتهم. سيتم استخدام عنوان بريدك الإلكتروني في:"
|
||||
item_1: "تلقي التحديثات المتعلقة بأي تغييرات في حسابك (عنوان البريد الإلكتروني ، اسم المستخدم ، كلمة المرور ، إلخ.)"
|
||||
item_2: "السماح لك بتنزيل تعليقاتك."
|
||||
@@ -83,6 +82,7 @@ en:
|
||||
NO_LOCAL_PROFILE: No existing email address is associated with this account.
|
||||
LOCAL_PROFILE: An email address is already associated with this account.
|
||||
INCORRECT_PASSWORD: Provided password was incorrect.
|
||||
DUPLICATE_LOCAL_PROFILE: An account already exists with this email address. Please cancel and login with your email address and password.
|
||||
talk-plugin-local-auth:
|
||||
change_password:
|
||||
change_password: "Change Password"
|
||||
@@ -125,7 +125,9 @@ en:
|
||||
cancel: "Cancel"
|
||||
change_email_msg: "Email Address Changed. This email address will now be used for signing in and email notifications."
|
||||
add_email:
|
||||
title: "Create New Account"
|
||||
add_email_address: "Add Email Address"
|
||||
cancel: "Cancel"
|
||||
enter_email_address: "Enter Email Address:"
|
||||
invalid_email_address: "Invalid Email address"
|
||||
confirm_email_address: "Confirm Email Address:"
|
||||
@@ -135,7 +137,6 @@ en:
|
||||
required_field: "This field is required"
|
||||
done: "Done"
|
||||
content:
|
||||
title: "Add an Email Address"
|
||||
description: "For your added security, we require users to add an email address to their accounts. Your email address will be used to:"
|
||||
item_1: "Receive updates regarding any changes to your account (email address, username, password, etc.)"
|
||||
item_2: "Allow you to download your comments."
|
||||
@@ -211,7 +212,6 @@ sr:
|
||||
required_field: "Ovo polje je obavezno"
|
||||
done: "Gotovo"
|
||||
content:
|
||||
title: "Dodaj e-mail adresu"
|
||||
description: "For your added security, we require users to add an email address to their accounts. Your email address will be used to:"
|
||||
item_1: "Receive updates regarding any changes to your account (email address, username, password, etc.)"
|
||||
item_2: "Omogućuje vam da preuzmete (download) svoje komentare."
|
||||
@@ -225,7 +225,7 @@ sr:
|
||||
subtitle: "Želite da promenite e-mail adresu?"
|
||||
description_2: "Možete urediti svoj nalog ovde:"
|
||||
path: "Moj profil > Podešavanja"
|
||||
alert: "E-mail dodat"
|
||||
alert: "E-mail dodat"
|
||||
pt_BR:
|
||||
email:
|
||||
email_change_original:
|
||||
@@ -287,7 +287,6 @@ pt_BR:
|
||||
required_field: "Esse campo é obrigatório"
|
||||
done: "Feito"
|
||||
content:
|
||||
title: "Adicione um endereço de email"
|
||||
description: "Para a sua segurança, exigimos que os usuários adicionem um endereço de email para suas contas. Seu email será usado para:"
|
||||
item_1: "Receba avisos de alterações na sua conta(endereço de email, usuário, senha, etc.)"
|
||||
item_2: "Permitir que você baixe seus comentários."
|
||||
@@ -362,7 +361,6 @@ de:
|
||||
required_field: "Dieses Feld ist erforderlich"
|
||||
done: "Fertig"
|
||||
content:
|
||||
title: "E-Mail-Adresse hinzufügen"
|
||||
description: "Aus Sicherheitsgründen benötigen wir eine E-Mail-Adresse zu jedem Benutzerkonto. Ihre E-Mail-Adresse wird für folgendes verwendet:"
|
||||
item_1: "Benachrichtigungen über Änderungen am Benutzerkonto (Nutzername, E-Mail-Adresse, Passwort)"
|
||||
item_2: "Ermöglicht den Download des eigenen Kommentar-Archivs"
|
||||
@@ -437,7 +435,6 @@ es:
|
||||
required_field: "Este campo es requerido"
|
||||
done: "Hecho"
|
||||
content:
|
||||
title: "Agregar una dirección de correo electrónico"
|
||||
description: "Para su seguridad adicional, solicitamos a los usuarios que agreguen una dirección de correo electrónico a sus cuentas. Su dirección de correo electrónico se usará para:"
|
||||
item_1: "Recibe actualizaciones sobre cualquier cambio en tu cuenta (dirección de correo electrónico, nombre de usuario, contraseña, etc.)"
|
||||
item_2: "Permitir que descargues tus comentarios."
|
||||
@@ -513,7 +510,6 @@ it:
|
||||
required_field: "Questo campo è obbligatorio"
|
||||
done: "Finito"
|
||||
content:
|
||||
title: "Aggiungi indirizzo email"
|
||||
description: "Per questioni di sicurezza, richiediamo agli utenti di aggiungere un indirizzo email associato ai loro account. Il tuo indirizzo email sarà usato per:"
|
||||
item_1: "Ricevere aggiornamenti riguardo modifiche relative al tuo account (indirizzo email, username, password, etc.)"
|
||||
item_2: "Permetterti di scaricare i tuoi commenti."
|
||||
@@ -589,7 +585,6 @@ nl_NL:
|
||||
required_field: "Dit veld is verplicht"
|
||||
done: "Klaar"
|
||||
content:
|
||||
title: "Voeg een e-mailadres toe"
|
||||
description: "Voor je veiligheid vragen we gebruikers om een e-mailadres toe te voegen aan hun account. Je e-mailadres zal worden gebruikt om:"
|
||||
item_1: "Updates te ontvangen omtrent wijzigingen in je account (e-mailadres, gebruikersnaam, wachtwoord, etc.)"
|
||||
item_2: "Je reacties te kunnen downloaden."
|
||||
|
||||
Reference in New Issue
Block a user