Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read and write core LT rules #483

Merged
merged 5 commits into from
Nov 11, 2024
Merged

Conversation

jonathonherbert
Copy link
Contributor

@jonathonherbert jonathonherbert commented Nov 5, 2024

What does this change?

Adds proper support for reading and writing languageToolCore rules — rules which come bundled with LanguageTool. They are enabled by adding a rule with a LanguageTool ID. The total list of rules is available in a reference spreadsheet — many (most?) are also available in the LanguageTool XML for en and en-GB, although I think some rules are also defined exclusively in code, too.

Support for reading and writing rules means:

  • Listing the ruleType property in the table, with filtering/sorting
  • Copying the 'ID' property into the 'description' for existing rules (there are only a dozen or so in production), making them identifiable (at the moment, there are blank rows for these rules, which makes them impossible to identify without selecting them.)

built-in rules

  • Permitting create and update operations for these rules in the relevant form. Note that I've autopopulated the ID field with 'CHANGE_ME' to avoid a UUID appearing when the rule is first created on the server. (We could also leave it blank?)

create

How to test

  • The automated tests should pass. I've added tests for create and update ops.
  • Try working through the list of features above. Everything should work as expected.

How can we measure success?

More editorial control over these sorts of rules.

@jonathonherbert jonathonherbert marked this pull request as ready for review November 5, 2024 21:18
@jonathonherbert jonathonherbert requested a review from a team as a code owner November 5, 2024 21:18
Copy link

@KaliedaRik KaliedaRik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have smoke tested the branch in my local environment, and also replicated the user journeys offered as examples in the PR discussion. Have also run the tests locally and seen all pass.

Happy to approve.

@jonathonherbert jonathonherbert merged commit 4ab23a8 into main Nov 11, 2024
4 checks passed
@jonathonherbert jonathonherbert deleted the jsh/read-and-write-lt-core-rules branch November 11, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants