Skip to content

stale-empty ​

Warning · A key is empty on purpose, but its source changed since.

git8n check reports this rule as a warning. It fails only past --max-warnings.

Why it matters ​

The mark says that the text is empty for one source text. The source changed, so the empty text can now be wrong.

Invalid ​

locales/manifest.json

json
{
  "empty": {
    "fr": {
      "common:suffix": {
        "source": "0e6cd0ce0450"
      }
    }
  }
}

locales/en/common.json

json
{
  "suffix": "Inc."
}

locales/fr/common.json

json
{
  "suffix": ""
}
text
$ git8n check --source en
locales/fr/common.json
  warning  common:suffix is empty on purpose in fr, but its en text changed since.  stale-empty

Read more:
  stale-empty  https://git8n.sakuga.dev/docs/reference/rules/stale-empty.html

0 errors, 1 warning in 2 files (en → fr, 1 key).

Valid ​

locales/manifest.json

json
{
  "empty": {
    "fr": {
      "common:suffix": {
        "source": "57d4cdfb579e"
      }
    }
  }
}

locales/en/common.json

json
{
  "suffix": "Inc."
}

locales/fr/common.json

json
{
  "suffix": ""
}
text
$ git8n check --source en
0 errors, 0 warnings in 2 files (en → fr, 1 key).

What to do ​

Read the new source. Translate the key, or mark it empty again in the editor: the mark then records the new source text.

All the rules · The command check