Follow-up from "PipelineUsageApp: Add namespace usage overview"
The following discussion from !85917 (merged) should be addressed:
-
@jannik_lehmann started a discussion: (+3 comments) Question (non-blocking): Could we add a comment about what the replace function is doing here? Thank you!
This is caused by our limited
sprintf
implementation and should really be implemented there because the error is correct. Searching ourgitlab.pot
file we have 10 instances of%%
so this is bound to come up again if it hasn't already. So I highly recommend adding the following tosprintf.js
, adding a simple spec to test the output of%%
and removing the component implementation.
Implementation plan
- Add the following snippet to https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/javascripts/locale/sprintf.js:
let output = input.replace(/%%/g, '%')
-
Update the specs for sprintf.js
-
Remove the other instances of
.replace(/%+/g, '%')
.
Edited by Jiaan Louw