diff --git a/backend/src/apis/gms/model/GmsUser.ts b/backend/src/apis/gms/model/GmsUser.ts index 0b16f00fb..db6826a2d 100644 --- a/backend/src/apis/gms/model/GmsUser.ts +++ b/backend/src/apis/gms/model/GmsUser.ts @@ -1,8 +1,8 @@ import { User as dbUser } from '@entity/User' import { GmsPublishLocationType } from '@/graphql/enum/GmsPublishLocationType' -import { GmsPublishNameType } from '@/graphql/enum/GmsPublishNameType' import { GmsPublishPhoneType } from '@/graphql/enum/GmsPublishPhoneType' +import { PublishNameType } from '@/graphql/enum/PublishNameType' export class GmsUser { constructor(user: dbUser) { @@ -44,7 +44,7 @@ export class GmsUser { if ( user.gmsAllowed && user.alias && - user.gmsPublishName === GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS + user.gmsPublishName === PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS ) { return user.alias } @@ -53,32 +53,30 @@ export class GmsUser { private getGmsFirstName(user: dbUser): string | undefined { if ( user.gmsAllowed && - (user.gmsPublishName === GmsPublishNameType.GMS_PUBLISH_NAME_FIRST || - user.gmsPublishName === GmsPublishNameType.GMS_PUBLISH_NAME_FIRST_INITIAL || - user.gmsPublishName === GmsPublishNameType.GMS_PUBLISH_NAME_FULL) + (user.gmsPublishName === PublishNameType.PUBLISH_NAME_FIRST || + user.gmsPublishName === PublishNameType.PUBLISH_NAME_FIRST_INITIAL || + user.gmsPublishName === PublishNameType.PUBLISH_NAME_FULL) ) { return user.firstName } if ( user.gmsAllowed && - ((!user.alias && - user.gmsPublishName === GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS) || - user.gmsPublishName === GmsPublishNameType.GMS_PUBLISH_NAME_INITIALS) + ((!user.alias && user.gmsPublishName === PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS) || + user.gmsPublishName === PublishNameType.PUBLISH_NAME_INITIALS) ) { return user.firstName.substring(0, 1) } } private getGmsLastName(user: dbUser): string | undefined { - if (user.gmsAllowed && user.gmsPublishName === GmsPublishNameType.GMS_PUBLISH_NAME_FULL) { + if (user.gmsAllowed && user.gmsPublishName === PublishNameType.PUBLISH_NAME_FULL) { return user.lastName } if ( user.gmsAllowed && - ((!user.alias && - user.gmsPublishName === GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS) || - user.gmsPublishName === GmsPublishNameType.GMS_PUBLISH_NAME_FIRST_INITIAL || - user.gmsPublishName === GmsPublishNameType.GMS_PUBLISH_NAME_INITIALS) + ((!user.alias && user.gmsPublishName === PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS) || + user.gmsPublishName === PublishNameType.PUBLISH_NAME_FIRST_INITIAL || + user.gmsPublishName === PublishNameType.PUBLISH_NAME_INITIALS) ) { return user.lastName.substring(0, 1) } diff --git a/backend/src/data/PublishName.logic.ts b/backend/src/data/PublishName.logic.ts index 831c27e0d..e307a74d0 100644 --- a/backend/src/data/PublishName.logic.ts +++ b/backend/src/data/PublishName.logic.ts @@ -21,13 +21,16 @@ export class PublishNameLogic { ) { return this.user.firstName } - if ( - [PublishNameType.PUBLISH_NAME_INITIALS, PublishNameType.PUBLISH_NAME_INITIAL_LAST].includes( - publishNameType, - ) - ) { + if (PublishNameType.PUBLISH_NAME_INITIALS === publishNameType) { return this.user.firstName.substring(0, 1) } + if (PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS === publishNameType) { + if (this.user.alias) { + return this.user.alias + } else { + return this.user.firstName.substring(0, 1) + } + } return '' } @@ -38,22 +41,21 @@ export class PublishNameLogic { * first initial from user.lastName for PUBLISH_NAME_FIRST_INITIAL, PUBLISH_NAME_INITIALS */ public getLastName(publishNameType: PublishNameType): string { - if ( - [ - PublishNameType.PUBLISH_NAME_LAST, - PublishNameType.PUBLISH_NAME_INITIAL_LAST, - PublishNameType.PUBLISH_NAME_FULL, - ].includes(publishNameType) - ) { + if (PublishNameType.PUBLISH_NAME_FULL === publishNameType) { return this.user.lastName - } - if ( + } else if ( [PublishNameType.PUBLISH_NAME_FIRST_INITIAL, PublishNameType.PUBLISH_NAME_INITIALS].includes( publishNameType, ) ) { return this.user.lastName.substring(0, 1) + } else if ( + PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS === publishNameType && + !this.user.alias + ) { + return this.user.lastName.substring(0, 1) } + return '' } } diff --git a/backend/src/graphql/arg/UpdateUserInfosArgs.ts b/backend/src/graphql/arg/UpdateUserInfosArgs.ts index b9617f6df..c368bbd8b 100644 --- a/backend/src/graphql/arg/UpdateUserInfosArgs.ts +++ b/backend/src/graphql/arg/UpdateUserInfosArgs.ts @@ -2,7 +2,6 @@ import { IsBoolean, IsEnum, IsInt, IsString } from 'class-validator' import { ArgsType, Field, InputType, Int } from 'type-graphql' import { GmsPublishLocationType } from '@enum/GmsPublishLocationType' -import { GmsPublishNameType } from '@enum/GmsPublishNameType' import { PublishNameType } from '@enum/PublishNameType' import { Location } from '@model/Location' @@ -55,9 +54,9 @@ export class UpdateUserInfosArgs { @IsBoolean() gmsAllowed?: boolean - @Field(() => GmsPublishNameType, { nullable: true }) - @IsEnum(GmsPublishNameType) - gmsPublishName?: GmsPublishNameType | null + @Field(() => PublishNameType, { nullable: true }) + @IsEnum(PublishNameType) + gmsPublishName?: PublishNameType | null @Field(() => PublishNameType, { nullable: true }) @IsEnum(PublishNameType) diff --git a/backend/src/graphql/enum/GmsPublishNameType.ts b/backend/src/graphql/enum/GmsPublishNameType.ts deleted file mode 100644 index 08aaaf8ef..000000000 --- a/backend/src/graphql/enum/GmsPublishNameType.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { registerEnumType } from 'type-graphql' - -export enum GmsPublishNameType { - GMS_PUBLISH_NAME_ALIAS_OR_INITALS = 0, - GMS_PUBLISH_NAME_INITIALS = 1, - GMS_PUBLISH_NAME_FIRST = 2, - GMS_PUBLISH_NAME_FIRST_INITIAL = 3, - GMS_PUBLISH_NAME_FULL = 4, -} - -registerEnumType(GmsPublishNameType, { - name: 'GmsPublishNameType', // this one is mandatory - description: 'Type of name publishing', // this one is optional -}) diff --git a/backend/src/graphql/enum/PublishNameType.ts b/backend/src/graphql/enum/PublishNameType.ts index 5fa86ee9f..a60be9f50 100644 --- a/backend/src/graphql/enum/PublishNameType.ts +++ b/backend/src/graphql/enum/PublishNameType.ts @@ -1,19 +1,14 @@ import { registerEnumType } from 'type-graphql' -/** - * Enum for decide which parts from first- and last-name are allowed to be published in an extern service - */ export enum PublishNameType { - PUBLISH_NAME_NONE = 0, + PUBLISH_NAME_ALIAS_OR_INITALS = 0, PUBLISH_NAME_INITIALS = 1, PUBLISH_NAME_FIRST = 2, PUBLISH_NAME_FIRST_INITIAL = 3, - PUBLISH_NAME_LAST = 4, - PUBLISH_NAME_INITIAL_LAST = 5, - PUBLISH_NAME_FULL = 6, + PUBLISH_NAME_FULL = 4, } registerEnumType(PublishNameType, { name: 'PublishNameType', // this one is mandatory - description: 'Type of first- and last-name publishing for extern service', // this one is optional + description: 'Type of name publishing', // this one is optional }) diff --git a/backend/src/graphql/model/User.ts b/backend/src/graphql/model/User.ts index aa4baaac0..328bec61b 100644 --- a/backend/src/graphql/model/User.ts +++ b/backend/src/graphql/model/User.ts @@ -2,7 +2,6 @@ import { User as dbUser } from '@entity/User' import { ObjectType, Field, Int } from 'type-graphql' import { GmsPublishLocationType } from '@enum/GmsPublishLocationType' -import { GmsPublishNameType } from '@enum/GmsPublishNameType' import { PublishNameType } from '@enum/PublishNameType' import { KlickTipp } from './KlickTipp' @@ -89,8 +88,8 @@ export class User { @Field(() => Boolean) gmsAllowed: boolean - @Field(() => GmsPublishNameType, { nullable: true }) - gmsPublishName: GmsPublishNameType | null + @Field(() => PublishNameType, { nullable: true }) + gmsPublishName: PublishNameType | null @Field(() => PublishNameType, { nullable: true }) humhubPublishName: PublishNameType | null diff --git a/backend/src/graphql/resolver/UserResolver.test.ts b/backend/src/graphql/resolver/UserResolver.test.ts index 4fdf387b7..630f65d59 100644 --- a/backend/src/graphql/resolver/UserResolver.test.ts +++ b/backend/src/graphql/resolver/UserResolver.test.ts @@ -17,7 +17,6 @@ import { GraphQLError } from 'graphql' import { v4 as uuidv4, validate as validateUUID, version as versionUUID } from 'uuid' import { GmsPublishLocationType } from '@enum/GmsPublishLocationType' -import { GmsPublishNameType } from '@enum/GmsPublishNameType' import { OptInType } from '@enum/OptInType' import { PasswordEncryptionType } from '@enum/PasswordEncryptionType' import { RoleNames } from '@enum/RoleNames' @@ -35,6 +34,7 @@ import { sendResetPasswordEmail, } from '@/emails/sendEmailVariants' import { EventType } from '@/event/Events' +import { PublishNameType } from '@/graphql/enum/PublishNameType' import { SecretKeyCryptographyCreateKey } from '@/password/EncryptorUtils' import { encryptPassword } from '@/password/PasswordEncryptor' import { writeHomeCommunityEntry } from '@/seeds/community' @@ -1232,7 +1232,7 @@ describe('UserResolver', () => { lastName: 'Blümchen', language: 'en', gmsAllowed: true, - gmsPublishName: GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS, + gmsPublishName: PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS, gmsPublishLocation: GmsPublishLocationType.GMS_LOCATION_TYPE_RANDOM, }), ]) @@ -1272,7 +1272,7 @@ describe('UserResolver', () => { expect.objectContaining({ alias: 'bibi_Bloxberg', gmsAllowed: true, - gmsPublishName: GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS, + gmsPublishName: PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS, gmsPublishLocation: GmsPublishLocationType.GMS_LOCATION_TYPE_RANDOM, }), ]) @@ -1294,7 +1294,7 @@ describe('UserResolver', () => { await expect(User.find()).resolves.toEqual([ expect.objectContaining({ gmsAllowed: true, - gmsPublishName: GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS, + gmsPublishName: PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS, gmsPublishLocation: GmsPublishLocationType.GMS_LOCATION_TYPE_RANDOM, }), ]) @@ -1307,8 +1307,7 @@ describe('UserResolver', () => { mutation: updateUserInfos, variables: { gmsAllowed: false, - gmsPublishName: - GmsPublishNameType[GmsPublishNameType.GMS_PUBLISH_NAME_FIRST_INITIAL], + gmsPublishName: PublishNameType[PublishNameType.PUBLISH_NAME_FIRST_INITIAL], gmsPublishLocation: GmsPublishLocationType[GmsPublishLocationType.GMS_LOCATION_TYPE_APPROXIMATE], }, @@ -1316,7 +1315,7 @@ describe('UserResolver', () => { await expect(User.find()).resolves.toEqual([ expect.objectContaining({ gmsAllowed: false, - gmsPublishName: GmsPublishNameType.GMS_PUBLISH_NAME_FIRST_INITIAL, + gmsPublishName: PublishNameType.PUBLISH_NAME_FIRST_INITIAL, gmsPublishLocation: GmsPublishLocationType.GMS_LOCATION_TYPE_APPROXIMATE, }), ]) @@ -1332,8 +1331,7 @@ describe('UserResolver', () => { mutation: updateUserInfos, variables: { gmsAllowed: true, - gmsPublishName: - GmsPublishNameType[GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS], + gmsPublishName: PublishNameType[PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS], gmsLocation: loc, gmsPublishLocation: GmsPublishLocationType[GmsPublishLocationType.GMS_LOCATION_TYPE_RANDOM], @@ -1342,7 +1340,7 @@ describe('UserResolver', () => { await expect(User.find()).resolves.toEqual([ expect.objectContaining({ gmsAllowed: true, - gmsPublishName: GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS, + gmsPublishName: PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS, location: Location2Point(loc), gmsPublishLocation: GmsPublishLocationType.GMS_LOCATION_TYPE_RANDOM, }), diff --git a/backend/src/graphql/resolver/util/compareGmsRelevantUserSettings.ts b/backend/src/graphql/resolver/util/compareGmsRelevantUserSettings.ts index e40cdcdfe..4c9e51462 100644 --- a/backend/src/graphql/resolver/util/compareGmsRelevantUserSettings.ts +++ b/backend/src/graphql/resolver/util/compareGmsRelevantUserSettings.ts @@ -2,7 +2,7 @@ import { Point } from '@dbTools/typeorm' import { User as DbUser } from '@entity/User' import { UpdateUserInfosArgs } from '@/graphql/arg/UpdateUserInfosArgs' -import { GmsPublishNameType } from '@/graphql/enum/GmsPublishNameType' +import { PublishNameType } from '@/graphql/enum/PublishNameType' import { LogError } from '@/server/LogError' import { backendLogger as logger } from '@/server/logger' @@ -22,11 +22,10 @@ export function compareGmsRelevantUserSettings( orgUser.alias !== updateUserInfosArgs.alias && ((updateUserInfosArgs.gmsPublishName && updateUserInfosArgs.gmsPublishName.valueOf === - GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS.valueOf) || + PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS.valueOf) || (!updateUserInfosArgs.gmsPublishName && orgUser.gmsPublishName && - orgUser.gmsPublishName.valueOf === - GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS.valueOf)) + orgUser.gmsPublishName.valueOf === PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS.valueOf)) ) { return true } diff --git a/backend/src/seeds/graphql/mutations.ts b/backend/src/seeds/graphql/mutations.ts index 22c402e65..d9618bd0c 100644 --- a/backend/src/seeds/graphql/mutations.ts +++ b/backend/src/seeds/graphql/mutations.ts @@ -35,7 +35,7 @@ export const updateUserInfos = gql` $hideAmountGDD: Boolean $hideAmountGDT: Boolean $gmsAllowed: Boolean - $gmsPublishName: GmsPublishNameType + $gmsPublishName: PublishNameType $gmsLocation: Location $gmsPublishLocation: GmsPublishLocationType ) { diff --git a/frontend/src/components/UserSettings/UserGMSNamingFormat.spec.js b/frontend/src/components/UserSettings/UserGMSNamingFormat.spec.js deleted file mode 100644 index e48f6baba..000000000 --- a/frontend/src/components/UserSettings/UserGMSNamingFormat.spec.js +++ /dev/null @@ -1,84 +0,0 @@ -import { mount } from '@vue/test-utils' -import UserGMSNamingFormat from './UserGMSNamingFormat.vue' -import { toastErrorSpy } from '@test/testSetup' - -const mockAPIcall = jest.fn() - -const storeCommitMock = jest.fn() - -const localVue = global.localVue - -describe('UserNamingFormat', () => { - let wrapper - beforeEach(() => { - wrapper = mount(UserGMSNamingFormat, { - mocks: { - $t: (key) => key, // Mocking the translation function - $store: { - state: { - gmsPublishName: null, - }, - commit: storeCommitMock, - }, - $apollo: { - mutate: mockAPIcall, - }, - }, - localVue, - propsData: { - selectedOption: 'GMS_PUBLISH_NAME_ALIAS_OR_INITALS', - initialValue: 'GMS_PUBLISH_NAME_ALIAS_OR_INITALS', - attrName: 'gmsPublishName', - successMessage: 'success message', - }, - }) - }) - - afterEach(() => { - wrapper.destroy() - }) - - it('renders the correct dropdown options', () => { - const dropdownItems = wrapper.findAll('.dropdown-item') - expect(dropdownItems.length).toBe(5) - - const labels = dropdownItems.wrappers.map((item) => item.text()) - expect(labels).toEqual([ - 'settings.GMS.publish-name.alias-or-initials', - 'settings.GMS.publish-name.initials', - 'settings.GMS.publish-name.first', - 'settings.GMS.publish-name.first-initial', - 'settings.GMS.publish-name.name-full', - ]) - }) - - it('updates selected option on click', async () => { - const dropdownItem = wrapper.findAll('.dropdown-item').at(3) // Click the fourth item - await dropdownItem.trigger('click') - - expect(wrapper.emitted().valueChanged).toBeTruthy() - expect(wrapper.emitted().valueChanged.length).toBe(1) - expect(wrapper.emitted().valueChanged[0]).toEqual(['GMS_PUBLISH_NAME_FIRST_INITIAL']) - }) - - it('does not update when clicking on already selected option', async () => { - const dropdownItem = wrapper.findAll('.dropdown-item').at(0) // Click the first item (which is already selected) - await dropdownItem.trigger('click') - - expect(wrapper.emitted().valueChanged).toBeFalsy() - }) - - describe('update with error', () => { - beforeEach(async () => { - mockAPIcall.mockRejectedValue({ - message: 'Ouch', - }) - const dropdownItem = wrapper.findAll('.dropdown-item').at(2) // Click the third item - await dropdownItem.trigger('click') - }) - - it('toasts an error message', () => { - expect(toastErrorSpy).toBeCalledWith('Ouch') - }) - }) -}) diff --git a/frontend/src/components/UserSettings/UserGMSNamingFormat.vue b/frontend/src/components/UserSettings/UserGMSNamingFormat.vue deleted file mode 100644 index 98e0911ed..000000000 --- a/frontend/src/components/UserSettings/UserGMSNamingFormat.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - diff --git a/frontend/src/components/UserSettings/UserNamingFormat.spec.js b/frontend/src/components/UserSettings/UserNamingFormat.spec.js index 8ded29ca7..c92cca138 100644 --- a/frontend/src/components/UserSettings/UserNamingFormat.spec.js +++ b/frontend/src/components/UserSettings/UserNamingFormat.spec.js @@ -26,9 +26,9 @@ describe('UserNamingFormat', () => { }, localVue, propsData: { - selectedOption: 'PUBLISH_NAME_NONE', - initialValue: 'PUBLISH_NAME_NONE', - attrName: 'publishName', + selectedOption: 'PUBLISH_NAME_ALIAS_OR_INITALS', + initialValue: 'PUBLISH_NAME_ALIAS_OR_INITALS', + attrName: 'gmsPublishName', successMessage: 'success message', }, }) @@ -40,17 +40,15 @@ describe('UserNamingFormat', () => { it('renders the correct dropdown options', () => { const dropdownItems = wrapper.findAll('.dropdown-item') - expect(dropdownItems.length).toBe(7) + expect(dropdownItems.length).toBe(5) const labels = dropdownItems.wrappers.map((item) => item.text()) expect(labels).toEqual([ - 'settings.publish-name.none', + 'settings.publish-name.alias-or-initials', 'settings.publish-name.initials', 'settings.publish-name.first', 'settings.publish-name.first-initial', - 'settings.publish-name.last', - 'settings.publish-name.last-initial', - 'settings.publish-name.full', + 'settings.publish-name.name-full', ]) }) diff --git a/frontend/src/components/UserSettings/UserNamingFormat.vue b/frontend/src/components/UserSettings/UserNamingFormat.vue index 658f276ca..2879e37e0 100644 --- a/frontend/src/components/UserSettings/UserNamingFormat.vue +++ b/frontend/src/components/UserSettings/UserNamingFormat.vue @@ -20,7 +20,7 @@ import { updateUserInfos } from '@/graphql/mutations' export default { name: 'UserNamingFormat', props: { - initialValue: { type: String, default: 'PUBLISH_NAME_NONE' }, + initialValue: { type: String, default: 'PUBLISH_NAME_ALIAS_OR_INITALS' }, attrName: { type: String }, successMessage: { type: String }, }, @@ -29,9 +29,9 @@ export default { selectedOption: this.initialValue, dropdownOptions: [ { - label: this.$t('settings.publish-name.none'), - title: this.$t('settings.publish-name.none-tooltip'), - value: 'PUBLISH_NAME_NONE', + label: this.$t('settings.publish-name.alias-or-initials'), + title: this.$t('settings.publish-name.alias-or-initials-tooltip'), + value: 'PUBLISH_NAME_ALIAS_OR_INITALS', }, { label: this.$t('settings.publish-name.initials'), @@ -49,18 +49,8 @@ export default { value: 'PUBLISH_NAME_FIRST_INITIAL', }, { - label: this.$t('settings.publish-name.last'), - title: this.$t('settings.publish-name.last-tooltip'), - value: 'PUBLISH_NAME_LAST', - }, - { - label: this.$t('settings.publish-name.last-initial'), - title: this.$t('settings.publish-name.last-initial-tooltip'), - value: 'PUBLISH_NAME_INITIAL_LAST', - }, - { - label: this.$t('settings.publish-name.full'), - title: this.$t('settings.publish-name.full-tooltip'), + label: this.$t('settings.publish-name.name-full'), + title: this.$t('settings.publish-name.name-full-tooltip'), value: 'PUBLISH_NAME_FULL', }, ], diff --git a/frontend/src/graphql/mutations.js b/frontend/src/graphql/mutations.js index efcbcffb3..dd812db4b 100644 --- a/frontend/src/graphql/mutations.js +++ b/frontend/src/graphql/mutations.js @@ -36,7 +36,7 @@ export const updateUserInfos = gql` $hideAmountGDT: Boolean $gmsAllowed: Boolean $humhubAllowed: Boolean - $gmsPublishName: GmsPublishNameType + $gmsPublishName: PublishNameType $humhubPublishName: PublishNameType $gmsLocation: Location $gmsPublishLocation: GmsPublishLocationType diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 0ea569735..ed55a0990 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -325,16 +325,6 @@ "updated": "Positionstyp für GMS aktualisiert" }, "publish-name": { - "alias-or-initials": "Benutzername oder Initialen", - "alias-or-initials-tooltip": "Benutzername, falls vorhanden, oder die Initialen von Vorname und Nachname", - "first": "Vorname", - "first-tooltip": "Nur der Vornamen", - "first-initial": "Vorname und Initiale", - "first-initial-tooltip": "Vornamen plus Anfangsbuchstabe des Nachnamens", - "initials": "Initialen", - "initials-tooltip": "Initialen von Vor- und Nachname unabhängig von der Existenz des Benutzernamens", - "name-full": "Ganzer Name", - "name-full-tooltip": "Vollständiger Name: Vorname plus Nachname", "updated": "Namensformat für GMS aktualisiert" }, "switch": "Erlaubnis Daten nach GMS zu exportieren." @@ -388,20 +378,16 @@ "subtitle": "Wenn du dein Passwort vergessen hast, kannst du es hier zurücksetzen." }, "publish-name": { - "none": "Keine", - "none-tooltip": "Vorname und Nachname bleiben leer", + "alias-or-initials": "Benutzername oder Initialen (Default)", + "alias-or-initials-tooltip": "Benutzername, falls vorhanden, oder die Initialen von Vorname und Nachname", "first": "Vorname", - "first-tooltip": "Nur der Vornamen, z.B. Max", - "first-initial": "Vorname und Initiale", - "first-initial-tooltip": "Vornamen plus Anfangsbuchstabe des Nachnamens, z.B. Max M.", - "last": "Nachname", - "last-tooltip": "Nur der Nachname, z.B. Mustermann", - "last-initial": "Initiale und Nachname", - "last-initial-tooltip": "Anfangsbuchstabe des Vornamen plus Nachname, z.B. M. Mustermann", + "first-tooltip": "Nur der Vornamen", + "first-initial": "Vorname und Initial", + "first-initial-tooltip": "Vornamen plus Anfangsbuchstabe des Nachnamens", "initials": "Initialen", - "initials-tooltip": "Nur die Initialen von Vor- und Nachname, z.B. M. M.", - "full": "Ganzer Name", - "full-tooltip": "Vollständiger Name: Vorname plus Nachname, z.B. Max Mustermann" + "initials-tooltip": "Initialen von Vor- und Nachname unabhängig von der Existenz des Benutzernamens", + "name-full": "Vorname und Nachname", + "name-full-tooltip": "Vollständiger Name: Vorname plus Nachname" }, "showAmountGDD": "Dein GDD Betrag ist sichtbar.", "showAmountGDT": "Dein GDT Betrag ist sichtbar.", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 4c90732fe..9bd79448a 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -325,16 +325,6 @@ "updated": "format of location for GMS updated" }, "publish-name": { - "alias-or-initials": "Username or initials", - "alias-or-initials-tooltip": "username if exists or Initials of firstname and lastname", - "first": "firstname", - "first-tooltip": "the firstname only", - "first-initial": "firstname and initial", - "first-initial-tooltip": "firstname plus initial of lastname", - "initials": "Initials of firstname and lastname independent if username exists", - "initials-tooltip": "Initials of firstname and lastname independent if username exists", - "name-full": "fullname", - "name-full-tooltip": "fullname: firstname plus lastname", "updated": "format of name for GMS updated" }, "switch": "Allow data export to GMS" @@ -388,20 +378,16 @@ "subtitle": "If you have forgotten your password, you can reset it here." }, "publish-name": { - "none": "None", - "none-tooltip": "first name and last name are empty", - "first": "first name", - "first-tooltip": "the first name only", - "first-initial": "first name and initial", - "first-initial-tooltip": "first name plus initial of last name", - "last": "last name", - "last-tooltip": "last name only", - "last-initial": "initial and last name", - "last-initial-tooltip": "First letter of the first name plus last name", - "initials": "initials", - "initials-tooltip": "Initials of first name and last name", - "full": "full name", - "full-tooltip": "full name: firstname plus lastname" + "alias-or-initials": "Username or initials (Default)", + "alias-or-initials-tooltip": "username if exists or Initials of firstname and lastname", + "first": "firstname", + "first-tooltip": "the firstname only", + "first-initial": "firstname and initial", + "first-initial-tooltip": "firstname plus initial of lastname", + "initials": "Initials", + "initials-tooltip": "Initials of firstname and lastname independent if username exists", + "name-full": "firstname and lastname", + "name-full-tooltip": "fullname: firstname plus lastname" }, "showAmountGDD": "Your GDD amount is visible.", "showAmountGDT": "Your GDT amount is visible.", diff --git a/frontend/src/pages/Settings.vue b/frontend/src/pages/Settings.vue index 94f10f018..14a1df920 100644 --- a/frontend/src/pages/Settings.vue +++ b/frontend/src/pages/Settings.vue @@ -108,7 +108,7 @@ {{ $t('settings.GMS.naming-format') }} - - + {{ $t('settings.humhub.naming-format') }} @@ -182,7 +182,6 @@