From 2b1590aae1b8cc4acc808b53be57d3fd6613ca10 Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Tue, 10 Sep 2019 10:30:17 +0200 Subject: [PATCH] Add German translation to email template, _ for unused variables --- .../src/middleware/email/templates/signup.js | 20 +++++++++++++++++++ backend/src/schema/resolvers/passwordReset.js | 4 ++-- backend/src/schema/resolvers/registration.js | 8 ++++---- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/backend/src/middleware/email/templates/signup.js b/backend/src/middleware/email/templates/signup.js index b7d2d4570..737d232ec 100644 --- a/backend/src/middleware/email/templates/signup.js +++ b/backend/src/middleware/email/templates/signup.js @@ -15,6 +15,26 @@ export const signupTemplate = options => { to: email, subject, text: ` +Willkommen bei Human Connection! Benutzen Sie diesen Link, um den Registrierungsprozess abzuschließen. +und erstellen Sie ein Benutzerkonto + +${actionUrl} + +Sie können diese Verifizierung auch kopieren und in Ihr Browserfenster einfügen: + +${nonce} + +Wenn du dich nicht bei Human Connection angemeldet hast, ignoriere bitte diese E-Mail oder +Kontaktieren Sie den Support, wenn Sie Fragen haben: + +${supportUrl} + +Danke, +Das Human Connection Team + +Übersetzt mit www.DeepL.com/Translator + + Welcome to Human Connection! Use this link to complete the registration process and create a user account: diff --git a/backend/src/schema/resolvers/passwordReset.js b/backend/src/schema/resolvers/passwordReset.js index 134c4e08e..3c5f4636c 100644 --- a/backend/src/schema/resolvers/passwordReset.js +++ b/backend/src/schema/resolvers/passwordReset.js @@ -32,11 +32,11 @@ export async function createPasswordReset(options) { export default { Mutation: { - requestPasswordReset: async (_, { email }, { driver }) => { + requestPasswordReset: async (_parent, { email }, { driver }) => { const nonce = uuid().substring(0, 6) return createPasswordReset({ driver, nonce, email }) }, - resetPassword: async (_, { email, nonce, newPassword }, { driver }) => { + resetPassword: async (_parent, { email, nonce, newPassword }, { driver }) => { const session = driver.session() const stillValid = new Date() stillValid.setDate(stillValid.getDate() - 1) diff --git a/backend/src/schema/resolvers/registration.js b/backend/src/schema/resolvers/registration.js index 6101309a7..552fb7b12 100644 --- a/backend/src/schema/resolvers/registration.js +++ b/backend/src/schema/resolvers/registration.js @@ -18,7 +18,7 @@ const checkEmailDoesNotExist = async ({ email }) => { export default { Mutation: { - CreateInvitationCode: async (parent, args, context, resolveInfo) => { + CreateInvitationCode: async (_parent, args, context, _resolveInfo) => { args.token = uuid().substring(0, 6) const { user: { id: userId }, @@ -37,7 +37,7 @@ export default { } return response }, - Signup: async (parent, args, context, resolveInfo) => { + Signup: async (_parent, args, _context, _resolveInfo) => { const nonce = uuid().substring(0, 6) args.nonce = nonce await checkEmailDoesNotExist({ email: args.email }) @@ -48,7 +48,7 @@ export default { throw new UserInputError(e.message) } }, - SignupByInvitation: async (parent, args, context, resolveInfo) => { + SignupByInvitation: async (_parent, args, _context, _resolveInfo) => { const { token } = args const nonce = uuid().substring(0, 6) args.nonce = nonce @@ -76,7 +76,7 @@ export default { throw new UserInputError(e) } }, - SignupVerification: async (object, args, context, resolveInfo) => { + SignupVerification: async (_parent, args, _context, _resolveInfo) => { const { termsAndConditionsAgreedVersion } = args const regEx = new RegExp(/^[0-9]+\.[0-9]+\.[0-9]+$/g) if (!regEx.test(termsAndConditionsAgreedVersion)) {