Skip to content

empty-value ​

Warning · A translation is empty, and the manifest does not mark it.

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

Why it matters ​

An empty text shows nothing. It is often a key that somebody forgot, but some texts are empty on purpose in a language.

Invalid ​

locales/en/common.json

json
{
  "suffix": "Ltd"
}

locales/fr/common.json

json
{
  "suffix": ""
}
text
$ git8n check --source en
locales/fr/common.json
  warning  common:suffix is empty in fr.  empty-value

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

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

Valid ​

locales/manifest.json

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

locales/en/common.json

json
{
  "suffix": "Ltd"
}

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 ​

Translate the key. If the text must stay empty, mark it in the editor (« vide voulu »): the manifest then records the source text it was empty for.

All the rules · The command check