JS implementation of `ngettext` is different from the backend
After https://gitlab.com/gitlab-org/gitlab-ce/issues/46096 we forbid combining %d style variables with %{other} style variables for internationalization.
However, the JS implementation of ngettext (n__ in our codebase) still tries to replace the %d with the number passed instead of just fetching the correct string for the current languang.
Should we keep that implementation, as it is some nice sugar not having to sprintf later, or change the implementation to match the backend?
The following discussion from !6183 (merged) should be addressed:
-
@filipa started a discussion: (+3 comments) This doesn't feel right. When
sprintfis used together withn__, it seems to defeat the purpose ofn__🤔 Is there an issue where this implementation was discussed or should we open one?