ALL-WRIT1001 · comment_language
Keep source comments in one configured project language.
This is a contextual rule for all languages. Read its implementation.
Definition
Section titled “Definition”Classify each substantial comment as target, other, or uncertain. The configured target
is target_language, which defaults to American English. Judge only the natural-language text
supplied by the comment provider. A directive or commented-out source is not prose. Do not
guess from a short or ambiguous fragment, a proper name, an identifier, or a code term.
Evidence
Section titled “Evidence”Each finding cites the exact comment record, its source range, model confidence, and model
provenance. minimum_characters excludes fragments that language identification models cannot
distinguish reliably.
Exceptions
Section titled “Exceptions”Quoted user text, protocol tokens, names, and required foreign terms can remain when the surrounding explanation uses the project language. Configure another target for a repository whose readers use another language.
Examples
Section titled “Examples”With the default target, # Retry after the peer closes the socket is target. A substantial
Japanese explanation is other. # Tokio is excluded by the length floor.
References
Section titled “References”- Cites “GlotLID”, model guidance on confidence and short text. Open reference
- Cites “Lingua”, language detection for short and mixed-language text. Open reference