Skip to content

empty-source ​

Warning · A text of the source is empty.

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

Why it matters ​

A translator has nothing to translate, and every language gets an empty text.

Invalid ​

locales/en/common.json

json
{
  "title": ""
}

locales/fr/common.json

json
{
  "title": "Bonjour"
}
text
$ git8n check --source en
locales/en/common.json
  warning  common:title is empty in the source.  empty-source

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

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

Valid ​

locales/en/common.json

json
{
  "title": "Hello"
}

locales/fr/common.json

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

What to do ​

Write the text of the source, or delete the key.

All the rules · The command check