# polyglots rules for # # Every section is optional. A section left out keeps the built-in behaviour. # The built-in values are shown commented out; uncomment a section to change it. # Any change re-reviews files of this locale from scratch on their next run. # Check the file with: polyglots rules check # The rules format version. polyglots refuses a file newer than it reads. schema: 2 # Rules that always run unless disabled: placeholder, html, plural-count, whitespace, untranslated, escaping, line-breaks, punctuation, glossary, inconsistent, tm-conflict, control, date-format, name-order # rules: # enable: [] # disable: [] # How much of a glossary term must match an inflected form, between 0 and 1. # glossaryStemRatio: 0.7 # Names capitalized everywhere (always), and only inside a specific date (dateOnly). # properNouns: # always: [] # dateOnly: [] # Common mistakes: found anywhere in a translation, case-insensitive. # The AI review weighs each match with your note. mistakes: [] # - wrong: a wording your team rejects # right: the wording it uses instead # note: Why, for the reviewer # Patterns: "text" (a literal) or "find" (a regular expression). # level: hint (the AI judges), error (always wrong, the AI must fix) or fix (replaced automatically). # "when: { source: ... }" applies a pattern only when the English source contains that text, # and "when: { notSource: ... }" only when it does not. patterns: [] # - find: ' {2,}' # replace: ' ' # level: fix # note: One space between words # Guidance added to the AI review prompts, at most 1500 characters. # guidance: | # Button labels are verbs in the imperative. # How the language capitalizes, told to the AI review when title-case runs, at most 2500 characters. # {language} is replaced with the language name. # capitalization: | # - {language} uses sentence case ... # The register the AI prompts ask for, at most 500 characters. # One line for both prompts, or { audit: ..., translate: ... } for each. # register: '- Address the reader as ...' # formal or informal: how a draft addresses the reader, in DeepL and the AI engines. # formality: informal # How a sentence ends in the language, for the punctuation check. # unmarked: the language writes no final mark. Also answers and notEnding. # sentenceEnd: # unmarked: true # The two below need schema: 3 in the line at the top, which polyglots 1.2 and later read. # How the language writes dates and times, for the date-format check and the AI prompts. # clock: 24h or 12h. order: dmy, mdy or ymd. formats: what common English PHP formats become. # dateTime: # clock: 24h # order: dmy # formats: # 'F j, Y': 'j F Y' # Which name the language writes first: given-first, as English does, or family-first. # family-first checks full names such as "%1$s %2$s" and adds a line to the AI prompts. # names: # order: family-first