WordPress / wporg-theme-directory

12 stars 6 forks source link

Use %d instead of %s for count of search results in block-config.php #122

Closed tobifjellner closed 1 month ago

tobifjellner commented 1 month ago

In https://github.com/WordPress/wporg-theme-directory/blob/trunk/source/wp-content/themes/wporg-themes-2024/inc/block-config.php

The number of themes found for a search uses %s to inject the count of themes found into a heading.

Although this will work, it's cleaner to use %d. Then translators will more easily see that the variable, indeed, will just show a number.

ryelle commented 1 month ago

When the string is actually output, it uses number_format_i18n, so it's a string - if we switch to %d the int validation will break the display.

tobifjellner commented 1 month ago

Oh. Then we can close this ticket :)