Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP2universalStack: TypeScript
i18ntranslationsnamingmaintainability
Break long copy into meaningful translation keys instead of one sentence-as-key
Prefer short semantic keys mapping to message fragments (ACCOUNT_SUSPENDED, CONTACT_ADMIN_MESSAGE) over using whole sentences as the key.
PR: hegnar-zephr-components · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | { 'Din konto er suspendert, kontakt administrator ved spørsmål': '...' } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | { |
| 2 | ACCOUNT_SUSPENDED: 'Din konto er suspendert', |
| 3 | CONTACT_ADMIN_MESSAGE: 'Vennligst kontakt en administrator eller', |
| 4 | QUESTIONS_SUFFIX: 'ved spørsmål', |
| 5 | } |
Explanation (EN)
Objašnjenje (HR)