Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrongly translated title in web browser and autopilot-title #4416

Closed
Elblinator opened this issue Nov 27, 2024 · 5 comments · Fixed by #4483
Closed

Fix wrongly translated title in web browser and autopilot-title #4416

Elblinator opened this issue Nov 27, 2024 · 5 comments · Fixed by #4483
Assignees
Labels
Milestone

Comments

@Elblinator
Copy link
Member

Elblinator commented Nov 27, 2024

Describe the bug

  1. For some pages The webbrowser title is getting translated (which additionally to just being not the correct behaviour throws an Error in the console)
  2. In the autopilot The title of the projected content is translated (

How to Reproduce

  1. Create a participant, a motion, an election, a topic with only the title/surname "Participants"
  2. Chagne the Openslides language to german
  3. Navigate to the detail pages of these contents
  4. The Webbrwoser title is "Teilnehmende"
  5. Project the motion, election or topic
  6. Navigate to the Autopilot
  7. The displayed title is "Teilnehmende"

Error for the detail pages

motion-view.component.ts:206 ERROR Error: Parameter "key" is required and cannot be empty
    at _TranslateService.instant (ngx-translate-core.mjs:696:13)
    at _MotionViewComponent.setTitle (base.component.ts:97:49)
    at _MotionViewComponent.onMotionUpdated (motion-view.component.ts:234:15)

Expected behavior

  1. The webbrowser title should not be translated on the named detail pages (participant, motion, election, topic)
  2. The Autopilot Title should not be translated
@Elblinator Elblinator added the bug label Nov 27, 2024
@Elblinator Elblinator added this to the 4.2 milestone Nov 27, 2024
@Elblinator Elblinator changed the title Fix Error in Console Fix Error in Console in motion-detail Nov 27, 2024
@reiterl reiterl self-assigned this Nov 28, 2024
@reiterl
Copy link
Member

reiterl commented Nov 28, 2024

I cannot reproduce the failure. Tested with German meeting, motion, motion w. amendments.

@reiterl reiterl assigned rrenkert and unassigned reiterl Nov 28, 2024
@reiterl
Copy link
Member

reiterl commented Dec 4, 2024

I cannot reproduce it.
So I looked at the code. I'm not sure why this happen: It seems like the ViewMotion.getTitle() delivers a undefined, null or perhaps empty string. That should not happen, as title is required. Perhaps broken data?

I still needs a way to reproduce this.

@reiterl
Copy link
Member

reiterl commented Dec 4, 2024

I have seen the error message few times with empty spaces in motion view, but not every time. So, I am not sure why this happens.

@reiterl reiterl added the needs investigation The cause for a bug is not clear enough, so it has to be investigated for some time label Dec 4, 2024
@rrenkert rrenkert modified the milestones: 4.2, 4.3 Dec 9, 2024
@reiterl
Copy link
Member

reiterl commented Dec 9, 2024

This could also be a problem with the "new" translate service.

@Elblinator Elblinator self-assigned this Dec 11, 2024
@Elblinator
Copy link
Member Author

The problem is not singularity in the motion-detail and a bit conceptual.

The same problem also occurs in topic-detail, assignment-detail, participant-detail. And there is a very similar problem in the autopilot.

I'll update the Issue according to the new findings

@Elblinator Elblinator changed the title Fix Error in Console in motion-detail Fix wrongly translated title in web browser and autopilot-title Dec 12, 2024
@Elblinator Elblinator removed the needs investigation The cause for a bug is not clear enough, so it has to be investigated for some time label Dec 12, 2024
@Elblinator Elblinator removed their assignment Dec 12, 2024
@reiterl reiterl self-assigned this Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants