feat(GlSprintf): Allow start/end marker customization
What does this MR do?
This adds startMarker
and endMarker
props to GlSprintf
to make it less likely that a translatable string needs to be changed to work with GlSprintf
.
For instance, the string SourcegraphPreferences|Uses %{link_start}Sourcegraph.com%{link_end}.
, as used in a HAML template previously, needs to be changed to SourcegraphPreferences|Uses %{linkStart}Sourcegraph.com%{linkEnd}.
to be used with GlSprintf
, thus invalidating all existing translations for that (otherwise identical) string.
With this MR, the need to do so would be dramatically reduced, if not removed entirely.
Does this MR meet the acceptance criteria?
Conformity
-
Code review guidelines. -
GitLab UI's contributing guidlines. - [-] If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
- [-] If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
-
If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui
package can be upgraded quickly after the changes are released:-
GitLab: gitlab!48614 (closed) - [-] CustomersDot: mr_url
- [-] Status Page: mr_url
-
- [-] Added the
~"component:*"
label(s) if applicable.
Edited by Mark Florian