Wrong decoding of double % in internationalized strings

Summary

Using % in internationalized strings should be escaped with another percentage. Unfortunately by doing so both percentage signs are displayed in the frontend.
Deleting the second sign, it works on the frontend, but rake gettext:lint errors with contains unescaped '%', escape it using '%%'.
Example could be https://gitlab.com/schwedenmut/gitlab-ce/-/jobs/258504562, I wanted to change this but fails during lint process.

Steps to reproduce

Go to user preferences and take a look on the layout description.
Also you can use a new localization with a percentage sign in it. It will be displayed incorrectly.

Example Project

Not a project specific problem.

What is the current bug behavior?

Erroneous escaping of percentage results in twice displayed sign.

What is the expected correct behavior?

I expect only one percentage sign.

Relevant logs and/or screenshots

The string with unescaped % results in this error:

*** Running rake task: gettext:lint ***
Errors in `/builds/schwedenmut/gitlab-ce/locale/gitlab.pot`:
  Preferences|Choose between fixed (max. 1280px) and fluid (100%) application layout.
    contains unescaped `%`, escape it using `%%`

but with escaped % the frontend displays both of them: frontend

Output of checks

This bug happens on GitLab.com

Possible fixes

Either escaping is not needed anymore, then rake gettext:lint needs to be adjusted, or decoding the string is "buggy".

Assignee Loading
Time tracking Loading