Skip to content
IvaSure add-ons and services for SureCart storesJoin the POD waitlist

Placeholder problems

1 min read
Published

Many interface strings carry placeholders: %s for a value, %d for a number, %1$s when the order has to change between languages. A translation whose placeholders disagree with its source does not fail at save time. It fails on a shopper’s screen.

What Check looks for

ProblemMeans
More placeholders than the sourceThe translation expects a value that will never be supplied.
Fewer placeholders than the sourceA value the source provides is dropped - the shopper never sees the number or name.
Placeholder type differsThe same slot is %s in one and %d in the other.
Possible syntax errorThe translation contains something that is not a valid placeholder at all.

Run it from the Check link beside a language on the Overview tab. It reports problems in the translations it checked, capped so a large dictionary produces a readable list rather than a wall.

It only checks strings that actually have placeholders
A source without any is skipped entirely, which is what stops “100% off” being treated as a format string and reported as broken. The narrow sniff is deliberate.
Missing placeholders are not reported for plurals
A plural form legitimately drops the count - “one item” has no number in it. Flagging those would bury the real problems.

Fixing one

  1. Find the string in the editor for that language.
  2. Compare its placeholders against the source, in order.
  3. Keep the same count, the same types, and use %1$s style numbering when the language needs a different word order.
Machine translation is a common source of these
A model asked to translate “Showing %d of %d products” may return prose with one number in it, or none. That is a good reason to run Check after a machine-translation pass rather than before.

Save to list