Security findings not displayed in merge request widget when UI is not in english
Summary
Security report widget in MR is not displayed when the interface language is french. Licence Compliance report does not show up either
Steps to reproduce
Set up an MR that is blocked by a Security-related approval rule. Change the language to french.
Example Project
What is the current bug behavior?
What is the expected correct behavior?
Same information displayed as in the english version.
Relevant logs and/or screenshots
ee/app/views/projects/merge_requests/show.html.haml#L33
is causing this when language is set to French.
The '
at "n'a" is causing the string to escape and that causes a SyntaxError:
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: \`sudo gitlab-rake gitlab:env:info\`) (For installations from source run and paste the output of: \`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:check SANITIZE=true`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`) (we will only investigate if the tests are passing)
Possible fixes
Verification steps
- Go to https://gitlab.com/-/profile/preferences and set your Language to French, click Save changes
- Go to gitlab-examples/security/security-reports!118
- Verify the license compliance and security report widget both load in the MR (should look like screenshot below).
- Verify there is no error in the console.
Edited by Lorenz van Herwaarden