shipglot

glossary

Approved glossary translation not used.

Default severity: error

What it checks

When the source contains a glossary term, the translation must use the approved translation for that locale. Matching ignores case and allows common inflections (up to three extra letters, e.g. dossier → dossiers); for Chinese, Japanese, Korean and Thai the translation only has to appear as a substring.

Example

The glossary says "workspace" is "espace de travail" in French. Config used for both runs:

{
  "sourceLocale": "en",
  "files": [
    {
      "format": "next-intl-json",
      "path": "messages/{locale}.json"
    }
  ],
  "glossary": {
    "terms": [
      {
        "source": "workspace",
        "translations": {
          "fr": "espace de travail"
        }
      }
    ]
  }
}

Fails

messages/en.json

{
  "invite": "Invite people to your workspace"
}

messages/fr.json

{
  "invite": "Invitez des personnes dans votre bureau"
}

Gate output

  • errorglossaryfr
    invite
    glossary term "workspace" should be translated as "espace de travail"
    messages/fr.json:2

Passes

messages/en.json

{
  "invite": "Invite people to your workspace"
}

messages/fr.json

{
  "invite": "Invitez des personnes dans votre espace de travail"
}

Gate output

No glossary finding.

Change its severity

{
  "checks": {
    "glossary": "warning"
  }
}

Use "off" to disable it. To hide one finding, add "suppress": ["glossary:invite"]; a suppress rule that stops matching is reported so it can be removed.

All checks