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], }, 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', } }) 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( 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 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 = { 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) 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' diff --git a/webapp/graphql/Registration.js b/webapp/graphql/Registration.js index eab2b94be..873c855db 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 + locale: $locale ) { id name