sprintf ESLint rule does not check for numbered placeholders #20554
Labels
Internationalization (i18n)
Issues or PRs related to internationalization efforts
[Status] In Progress
Tracking issues with work in progress
[Tool] ESLint plugin
/packages/eslint-plugin
[Type] Bug
An existing feature does not function as intended
Describe the bug
While working on #19777 I noticed that the
@wordpress/valid-sprintf
rule does not catch the following issue:As you can see, there are two occurrences of
%d
in each string, which makes it impossible for translators to change the order of placeholders in the sentence.Expected behavior
It should warn about multiple placeholders being found, and should suggest using numbered placeholders instead:
The text was updated successfully, but these errors were encountered: