[go: up one dir, main page]

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 our gitlab.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 to sprintf.js, adding a simple spec to test the output of %% and removing the component implementation.

Implementation plan

  1. Add the following snippet to https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/javascripts/locale/sprintf.js:
let output = input.replace(/%%/g, '%')
  1. Update the specs for sprintf.js

  2. Remove the other instances of .replace(/%+/g, '%').

Edited by Jiaan Louw