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: universal
i18ncommentscode-reviewreadability
Add an English comment next to non-English UI strings
When hardcoded copy is in a language not all reviewers read, leave a short translation comment so reviewers can verify it without a translator.
PR: hegnar-web · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | onUpdate('Endringene er lagret!'); |
| 2 | onUpdate('Overvåkningslisten kunne ikke oppdateres!'); |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | onUpdate('Endringene er lagret!'); // The changes have been saved. |
| 2 | onUpdate('Overvåkningslisten kunne ikke oppdateres!'); // The watchlist could not be updated! |
Explanation (EN)
Objašnjenje (HR)