From cca1e2c04a816fa7ab6af0c0dc20c057c2111d2f Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Thu, 17 Oct 2019 09:44:26 +0200 Subject: [PATCH 01/10] remove change --- backend/src/schema/resolvers/registration.spec.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/schema/resolvers/registration.spec.js b/backend/src/schema/resolvers/registration.spec.js index 29116ef70..180950f94 100644 --- a/backend/src/schema/resolvers/registration.spec.js +++ b/backend/src/schema/resolvers/registration.spec.js @@ -290,8 +290,7 @@ describe('Signup', () => { it('throws AuthorizationError', async () => { await expect(mutate({ mutation, variables })).resolves.toMatchObject({ - // errors: [{ message: 'Not Authorised!' }], - errors: undefined, + errors: [{ message: 'Not Authorised!' }], }) }) From 18fe54e09535012bd4a95c815fef52abf2848982 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Fri, 18 Oct 2019 11:49:14 +0200 Subject: [PATCH 02/10] Update Registration.js change language to locale --- webapp/graphql/Registration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/graphql/Registration.js b/webapp/graphql/Registration.js index eab2b94be..30996e9ee 100644 --- a/webapp/graphql/Registration.js +++ b/webapp/graphql/Registration.js @@ -7,7 +7,7 @@ export const SignupVerificationMutation = gql` $password: String! $about: String $termsAndConditionsAgreedVersion: String! - $language: String + $locale: String ) { SignupVerification( nonce: $nonce @@ -16,7 +16,7 @@ export const SignupVerificationMutation = gql` password: $password about: $about termsAndConditionsAgreedVersion: $termsAndConditionsAgreedVersion - language: $language + language: $locale ) { id name From bfb392302303930dcada35cce98c1094c7d94d29 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Fri, 18 Oct 2019 11:50:42 +0200 Subject: [PATCH 03/10] locale change language to locale --- webapp/components/Registration/CreateUserAccount.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/components/Registration/CreateUserAccount.vue b/webapp/components/Registration/CreateUserAccount.vue index b8b20d146..00466a2d3 100644 --- a/webapp/components/Registration/CreateUserAccount.vue +++ b/webapp/components/Registration/CreateUserAccount.vue @@ -156,7 +156,7 @@ export default { const { name, password, about } = this.formData const { email, nonce } = this const termsAndConditionsAgreedVersion = VERSION - const language = this.$i18n.locale() + const locale = this.$i18n.locale() try { await this.$apollo.mutate({ mutation: SignupVerificationMutation, @@ -167,7 +167,7 @@ export default { email, nonce, termsAndConditionsAgreedVersion, - language, + locale, }, }) this.response = 'success' From 0b5c1f831df76f9626e464fa509f094ef19df279 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Fri, 18 Oct 2019 11:52:48 +0200 Subject: [PATCH 04/10] locale change language to locale --- webapp/components/Registration/CreateUserAccount.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/components/Registration/CreateUserAccount.spec.js b/webapp/components/Registration/CreateUserAccount.spec.js index 6f7abbca8..fb9bf00f8 100644 --- a/webapp/components/Registration/CreateUserAccount.spec.js +++ b/webapp/components/Registration/CreateUserAccount.spec.js @@ -82,7 +82,7 @@ describe('CreateUserAccount', () => { nonce: '666777', password: 'hellopassword', termsAndConditionsAgreedVersion: '0.0.2', - language: 'en', + locale: 'en', }, }) expect(mocks.$apollo.mutate).toHaveBeenCalledWith(expected) From 3346048e3eb64d796b90d6f6df61e51f9be27704 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Fri, 18 Oct 2019 11:53:29 +0200 Subject: [PATCH 05/10] locale change language to locale --- backend/src/seed/factories/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/seed/factories/users.js b/backend/src/seed/factories/users.js index 70d626c62..99e2681c9 100644 --- a/backend/src/seed/factories/users.js +++ b/backend/src/seed/factories/users.js @@ -17,7 +17,7 @@ export default function create() { termsAndConditionsAgreedVersion: '0.0.1', termsAndConditionsAgreedAt: '2019-08-01T10:47:19.212Z', allowEmbedIframes: false, - language: 'en', + locale: 'en', } defaults.slug = slugify(defaults.name, { lower: true }) args = { From 6d1bf2c3e8ec67036c3208c5f81dce8fa63018af Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Fri, 18 Oct 2019 12:10:44 +0200 Subject: [PATCH 06/10] locale change language to locale --- backend/src/schema/types/type/EmailAddress.gql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/schema/types/type/EmailAddress.gql b/backend/src/schema/types/type/EmailAddress.gql index f338e019f..99e309602 100644 --- a/backend/src/schema/types/type/EmailAddress.gql +++ b/backend/src/schema/types/type/EmailAddress.gql @@ -19,7 +19,7 @@ type Mutation { locationName: String about: String termsAndConditionsAgreedVersion: String! - language: String + locale: String ): User AddEmailAddress(email: String!): EmailAddress VerifyEmailAddress( From 713feb4347e2f2439006cf2f4b7dea986535f8a9 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Fri, 18 Oct 2019 12:13:01 +0200 Subject: [PATCH 07/10] locale change language to locale --- backend/src/schema/resolvers/registration.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/schema/resolvers/registration.spec.js b/backend/src/schema/resolvers/registration.spec.js index 180950f94..e79a107e8 100644 --- a/backend/src/schema/resolvers/registration.spec.js +++ b/backend/src/schema/resolvers/registration.spec.js @@ -381,7 +381,7 @@ describe('SignupVerification', () => { $nonce: String! $about: String $termsAndConditionsAgreedVersion: String! - $language: String + $locale: String ) { SignupVerification( name: $name @@ -390,7 +390,7 @@ describe('SignupVerification', () => { nonce: $nonce about: $about termsAndConditionsAgreedVersion: $termsAndConditionsAgreedVersion - language: $language + locale: $language ) { id termsAndConditionsAgreedVersion @@ -407,7 +407,7 @@ describe('SignupVerification', () => { password: '123', email: 'john@example.org', termsAndConditionsAgreedVersion: '0.1.0', - language: 'en', + locale: 'en', } }) From abaa9b775984e358d4867d848226656d3201e37c Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Fri, 18 Oct 2019 12:14:11 +0200 Subject: [PATCH 08/10] locale change language to locale --- backend/src/models/User.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/models/User.js b/backend/src/models/User.js index 3096e4b54..ece678a1f 100644 --- a/backend/src/models/User.js +++ b/backend/src/models/User.js @@ -109,7 +109,7 @@ module.exports = { type: 'boolean', default: false, }, - language: { + locale: { type: 'string', allow: [null], }, From a6108f6a002a5c6041da50114aacfa1e8d437253 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Fri, 18 Oct 2019 12:15:21 +0200 Subject: [PATCH 09/10] locale change language to locale --- backend/src/schema/types/type/User.gql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/schema/types/type/User.gql b/backend/src/schema/types/type/User.gql index 51a507670..1f46dc6cd 100644 --- a/backend/src/schema/types/type/User.gql +++ b/backend/src/schema/types/type/User.gql @@ -29,7 +29,7 @@ type User { allowEmbedIframes: Boolean - language: String + locale: String friends: [User]! @relation(name: "FRIENDS", direction: "BOTH") friendsCount: Int! @cypher(statement: "MATCH (this)<-[: FRIENDS]->(r: User) RETURN COUNT(DISTINCT r)") @@ -171,7 +171,7 @@ type Mutation { termsAndConditionsAgreedVersion: String termsAndConditionsAgreedAt: String allowEmbedIframes: Boolean - language: String + locale: String ): User DeleteUser(id: ID!, resource: [Deletable]): User From 1fce840efb69419999bfc1890f70c7a59c86d62c Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Fri, 18 Oct 2019 12:16:32 +0200 Subject: [PATCH 10/10] locale change language to locale --- webapp/graphql/Registration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/graphql/Registration.js b/webapp/graphql/Registration.js index 30996e9ee..873c855db 100644 --- a/webapp/graphql/Registration.js +++ b/webapp/graphql/Registration.js @@ -16,7 +16,7 @@ export const SignupVerificationMutation = gql` password: $password about: $about termsAndConditionsAgreedVersion: $termsAndConditionsAgreedVersion - language: $locale + locale: $locale ) { id name