File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,15 @@ need to include keys that differ from English.
168168}
169169```
170170
171- Missing keys fall back to ` en.json ` at build time.
171+ ** Key-level fallback rule:** if a key present in ` en.json ` is absent from a
172+ locale file, the generator uses the English value and emits a build-time warning:
173+
174+ ```
175+ [WARN] strings/pt-BR.json: missing key "footer.builtWith" — using English fallback
176+ ```
177+
178+ The page is always rendered completely; no key is ever silently blank. The warning
179+ is purely informational and does ** not** abort the build.
172180
173181---
174182
@@ -229,6 +237,9 @@ For each pattern and locale the generator:
229237 - ** No** → use the English file and inject an "untranslated" banner
230238 (see next section).
2312393 . Loads ` translations/strings/<locale>.json ` deep-merged over ` en.json ` .
240+ Any key present in ` en.json ` but absent from the locale file falls back to
241+ the English value; the generator logs a ` [WARN] ` for each missing key and
242+ continues without aborting.
2322434 . Renders the template, substituting content tokens (` {{title}} ` , …) and
233244 UI-string tokens (` {{nav.allPatterns}} ` , …).
2342455 . Writes output to ` site/<locale>/<cat>/<slug>.html `
You can’t perform that action at this time.
0 commit comments