From f83289d3b156a485112c12dd60b687892e88abde Mon Sep 17 00:00:00 2001 From: Elblinator Date: Wed, 2 Dec 2026 10:18:12 +0100 Subject: [PATCH 1/5] Update lang in meeting --- .../amendment-create-wizard.component.ts | 4 +++- .../site/pages/meetings/services/active-meeting.service.ts | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts index 56beb3ee5b..0235c610ed 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts @@ -183,9 +183,11 @@ export class AmendmentCreateWizardComponent extends BaseMeetingComponent impleme const submitterMeetingUserId = this.operator.isInMeeting(this.activeMeetingId) ? [this.operator.user.getMeetingUser(this.activeMeetingId)?.id] : []; + await this.activeMeetingService.switchToMeetingLang(); + const title = this.translate.instant('Amendment to', undefined, this.activeMeeting.language); const motionCreate = { ...this.contentForm.value, - title: this.translate.instant(`Amendment to`) + ` ` + this.motion.getNumberOrTitle(), + title: title + ` ` + this.motion.getNumberOrTitle(), parent_id: this.motion.id, category_id: this.operator.hasPerms(Permission.motionCanManage) ? this.motion.category_id : undefined, lead_motion_id: this.motion.id, diff --git a/client/src/app/site/pages/meetings/services/active-meeting.service.ts b/client/src/app/site/pages/meetings/services/active-meeting.service.ts index aadc5fb9e3..e6006b396c 100644 --- a/client/src/app/site/pages/meetings/services/active-meeting.service.ts +++ b/client/src/app/site/pages/meetings/services/active-meeting.service.ts @@ -89,6 +89,10 @@ export class ActiveMeetingService { } } + public async switchToMeetingLang(): Promise { + await firstValueFrom(this.translate.reloadLang(this.meeting.language)); + } + private setupActiveMeeting(meeting: ViewMeeting | null): void { this._meetingSubject.next(meeting); if (meeting?.isArchived && !!this.authService.authToken) { From 2bbc6f10bc631ecfbcb4d38e431b1c57c5e37bfd Mon Sep 17 00:00:00 2001 From: Elblinator Date: Wed, 2 Dec 2026 11:23:46 +0100 Subject: [PATCH 2/5] Switch to meeting changes place --- .../detail-view/components/detail-view/detail-view.component.ts | 2 ++ .../amendment-create-wizard.component.ts | 1 - .../app/site/pages/meetings/services/active-meeting.service.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts index 31757d3970..8b4b96f0e8 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts @@ -82,6 +82,8 @@ export class DetailViewComponent implements OnInit { } ); }); + + this.activeMeetingService.switchToMeetingLang().then(); } private parseSequentialNumber(params: { id?: string }): void { diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts index 0235c610ed..5428d63f32 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts @@ -183,7 +183,6 @@ export class AmendmentCreateWizardComponent extends BaseMeetingComponent impleme const submitterMeetingUserId = this.operator.isInMeeting(this.activeMeetingId) ? [this.operator.user.getMeetingUser(this.activeMeetingId)?.id] : []; - await this.activeMeetingService.switchToMeetingLang(); const title = this.translate.instant('Amendment to', undefined, this.activeMeeting.language); const motionCreate = { ...this.contentForm.value, diff --git a/client/src/app/site/pages/meetings/services/active-meeting.service.ts b/client/src/app/site/pages/meetings/services/active-meeting.service.ts index e6006b396c..c4f28ffe50 100644 --- a/client/src/app/site/pages/meetings/services/active-meeting.service.ts +++ b/client/src/app/site/pages/meetings/services/active-meeting.service.ts @@ -90,7 +90,7 @@ export class ActiveMeetingService { } public async switchToMeetingLang(): Promise { - await firstValueFrom(this.translate.reloadLang(this.meeting.language)); + await firstValueFrom(this.translate.reloadLang(this.meeting?.language)); } private setupActiveMeeting(meeting: ViewMeeting | null): void { From 4afc9defb5bc40e2a5ae6130db44d817d0084bbc Mon Sep 17 00:00:00 2001 From: Elblinator Date: Wed, 2 Dec 2026 12:53:37 +0100 Subject: [PATCH 3/5] linter --- .../amendment-create-wizard.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts index ad738d91b0..5428d63f32 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts @@ -9,7 +9,7 @@ import { ViewMotion } from '@app/site/pages/meetings/pages/motions'; import { OperatorService } from '@app/site/services/operator.service'; import { PromptService } from '@app/ui/modules/prompt-dialog'; import { TranslateService } from '@ngx-translate/core'; -import { firstValueFrom, Subscription } from 'rxjs'; +import { Subscription } from 'rxjs'; import { AmendmentParagraphs } from '../../../../../../../../../../../domain/models/motions/motion'; import { AmendmentControllerService } from '../../../../../../services/common/amendment-controller.service/amendment-controller.service'; From f274bf0cc03596cfd5d8e904b1cbfc8339937564 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Wed, 2 Dec 2026 14:43:19 +0100 Subject: [PATCH 4/5] Change placement of call --- .../components/detail-view/detail-view.component.ts | 2 -- .../app/site/pages/meetings/services/active-meeting.service.ts | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts index 8b4b96f0e8..31757d3970 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts @@ -82,8 +82,6 @@ export class DetailViewComponent implements OnInit { } ); }); - - this.activeMeetingService.switchToMeetingLang().then(); } private parseSequentialNumber(params: { id?: string }): void { diff --git a/client/src/app/site/pages/meetings/services/active-meeting.service.ts b/client/src/app/site/pages/meetings/services/active-meeting.service.ts index c4f28ffe50..69652b1083 100644 --- a/client/src/app/site/pages/meetings/services/active-meeting.service.ts +++ b/client/src/app/site/pages/meetings/services/active-meeting.service.ts @@ -64,6 +64,7 @@ export class ActiveMeetingService { public async ensureActiveMeetingIsAvailable(): Promise { if (this.meetingId) { + this.switchToMeetingLang(); return await firstValueFrom( this.meetingObservable.pipe(first(meeting => !!meeting && !!meeting.group_ids)) ); @@ -89,7 +90,7 @@ export class ActiveMeetingService { } } - public async switchToMeetingLang(): Promise { + private async switchToMeetingLang(): Promise { await firstValueFrom(this.translate.reloadLang(this.meeting?.language)); } From 95329c50859fea654dd2d5ffa4b3809ec5ed12e9 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Wed, 2 Dec 2026 15:25:27 +0100 Subject: [PATCH 5/5] Load meeting translations after meeting data is available --- .../site/pages/meetings/services/active-meeting.service.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/client/src/app/site/pages/meetings/services/active-meeting.service.ts b/client/src/app/site/pages/meetings/services/active-meeting.service.ts index 69652b1083..ab3ea71dc8 100644 --- a/client/src/app/site/pages/meetings/services/active-meeting.service.ts +++ b/client/src/app/site/pages/meetings/services/active-meeting.service.ts @@ -64,7 +64,6 @@ export class ActiveMeetingService { public async ensureActiveMeetingIsAvailable(): Promise { if (this.meetingId) { - this.switchToMeetingLang(); return await firstValueFrom( this.meetingObservable.pipe(first(meeting => !!meeting && !!meeting.group_ids)) ); @@ -83,6 +82,8 @@ export class ActiveMeetingService { error: this.translate.instant(`Meeting not found`) } }); + } else if (data[`meeting`][this.meetingId]?.language) { + this.translate.reloadLang(data[`meeting`][this.meetingId]?.language); } }); } else { @@ -90,10 +91,6 @@ export class ActiveMeetingService { } } - private async switchToMeetingLang(): Promise { - await firstValueFrom(this.translate.reloadLang(this.meeting?.language)); - } - private setupActiveMeeting(meeting: ViewMeeting | null): void { this._meetingSubject.next(meeting); if (meeting?.isArchived && !!this.authService.authToken) {