Skip to content

Commit 4083936

Browse files
committed
docs(i18n): state the shipped severity for an unresolvable translation key
`content/docs/protocol/kernel/i18n-standard.mdx` promised that an unresolvable translation-bundle key "is a **warning**, not an error: nothing crashes". Both halves are false against the shipped linter: `translation-target-unknown` has carried `severity: 'error'` since #16310, so `os validate`, `os lint` and `os compile` each exit non-zero on one. An author who read the page and then wrote a locale key against a target the linter cannot resolve got a failed run, having been told in writing it would be a nag. The whole claim is repaired, not just the severity word: - the severity now reads `error`, names the rule id so it can be grepped, and names the three commands that exit non-zero on it; - the runtime half ("nothing crashes ... renders in its source locale") is kept, because it is still true and is precisely the reason the rule gates: the orphan key stays a confident-looking grep hit for a surface that was deleted; - the sibling rule is separated out, since the very next paragraph is about it: `translation-option-key-unknown` is still a warning. The linter is untouched by design. #16310 was a deliberate promotion, so the page is what drifted. Claude-Session: https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk Co-authored-by: Claude <noreply@anthropic.com>
1 parent f1c9bb3 commit 4083936

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎content/docs/protocol/kernel/i18n-standard.mdx‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,9 +1024,16 @@ every bundle against the stack it ships with:
10241024
| `dashboards.{dash}` / `.widgets.{id}` / `.actions.{actionUrl}` | the dashboard's `name` / a widget `id` / a header `actionUrl` |
10251025
| `globalActions.{action}` | an action with **no** `objectName` |
10261026

1027-
An unresolvable key is a **warning**, not an error: nothing crashes, the string
1028-
simply renders in its source locale while every neighbouring label resolves — so
1029-
the app looks translated and one field does not.
1027+
An unresolvable key is an **error**, not a warning: `os validate`, `os lint` and
1028+
`os compile` each report it as `translation-target-unknown` and exit non-zero, so
1029+
a bundle key naming a surface the metadata no longer declares fails the run (it
1030+
was a warning until #16310). Nothing *crashes* — the string simply renders in its
1031+
source locale while every neighbouring label resolves, so the app looks translated
1032+
and one field does not — but that is what earns the error rather than excusing it:
1033+
the orphan key stays a confident-looking grep hit, in every locale, for a surface
1034+
that was deleted. The mis-keyed **option** below is the deliberate exception and
1035+
stays a warning (`translation-option-key-unknown`): it names something real, so
1036+
its remedy is a rename rather than a deletion.
10301037

10311038
The option case is worth spelling out. Option maps are keyed by the option's
10321039
stored `value`, never by its display label:

0 commit comments

Comments
 (0)