guardian / typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Apache License 2.0
276 stars 12 forks source link

Add LanguageTool default rules to persisted rules #288

Closed jonathonherbert closed 1 year ago

jonathonherbert commented 1 year ago

A reminder before merging: we need to ensure these rules are added to the PROD sheet as this PR is merged – but not before, as the new rules will cause parsing errors for older builds.

What does this change?

Add LanguageTool default rules to persisted rules. They can be added to the Google sheet as with other rules. The only two cells needed are 'Rule type', which should be lt_core, and ID.

Dev notes

There are a couple of decisions in this PR:

How to test

Rules |Rule type| ID | |--|--| | lt_core | COMMA_PARENTHESIS_WHITESPACE | | lt_core | DOUBLE_PUNCTUATION | | lt_core | UPPERCASE_SENTENCE_START | | lt_core | WHITESPACE_RULE | | lt_core | SENTENCE_WHITESPACE | | lt_core | PUNCTUATION_PARAGRAPH_END | | lt_core | NO_SPACE_CLOSING_QUOTE | | lt_core | PUBIC_X | | lt_core | IN_PRINCIPAL | | lt_core | CURRENCY_SPACE |
Copy COMMA_PARENTHESIS_WHITESPACE Use of whitespace before comma and before/after parentheses , DOUBLE_PUNCTUATION Use of two consecutive dots or commas .. ,, UPPERCASE_SENTENCE_START checks that a sentence starts with an uppercase letter WHITESPACE_RULE Whitespace repetition (bad formatting) SENTENCE_WHITESPACE Missing space.Between sentences. PUNCTUATION_PARAGRAPH_END No punctuation mark at the end of paragraph. It seems that another para is fine. NO_SPACE_CLOSING_QUOTE “An example of this”and another thing PUBIC_X Commonly Confused Words. Pubic education etc. IN_PRINCIPAL In principal, the principle was in his office. CURRENCY_SPACE Whitespace after currency symbols: ‘$ 100’ ($100)

Test article in CODE.

The result should look something like:

Screenshot 2023-03-28 at 13 38 45