Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Add an English comment next to non-English UI strings
Make unfamiliar user-facing copy understandable to reviewers through localization resources or review context; add a brief translation comment only when it provides lasting value.
Bad example
| 1 | onUpdate('Endringene er lagret!'); |
| 2 | onUpdate('Overvåkningslisten kunne ikke oppdateres!'); |
Explanation (EN)
A reviewer cannot verify unfamiliar copy from spelling alone; share the meaning through the existing localization or review workflow.
Objašnjenje (HR)
Good example
| 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)
Notes (EN)
When reviewing untranslated hardcoded user-facing copy, use the localization catalog or review context to establish its meaning before adding a source comment.
Exceptions / Tradeoffs (EN)
A short translation comment is useful only when the meaning remains inaccessible and no established localization resource supplies it. Do not annotate every localized string.