Skip to main content
shipi18n logo|Documentation

placeholder-added: placeholder invented by a translation

warning — advisory, exit 0

The translation contains a placeholder that the source string does not have. Usually a hallucination by whatever produced the translation; occasionally deliberate. Because the renderer will have no value to substitute, the literal token typically reaches the user.

What triggers it

// en.json
{ "saved": "Your changes were saved" }

// fr.json
{ "saved": "Vos modifications ont été enregistrées, {{user}}" }

Fixed

// fr.json
{ "saved": "Vos modifications ont été enregistrées" }

Why it matters

An invented placeholder is a different, weirder defect than a dropped one — which is why it is a warning rather than an error: once in a while it is intentional.

How to fix it

Remove the extra placeholder from the translation, or add it to the source if it belongs there.

How to silence it

It is a warning by default. --ignore-keys for the specific key if intentional.

Check for this in CI

npx @shipi18n/cli check ./locales -s en
# SARIF for inline PR annotations:
npx @shipi18n/cli check ./locales -s en -r sarif -o shipi18n.sarif

The structural checks need no API key. Findings of this rule link back to this page from the SARIF helpUri.

Related rules