Also, it may be translated and uploaded to GitHub as a JSON, so that it can be downloaded by users. WOuld require manual translation, or a GitHub action to do so, to translate everything everytime a new rule is added.
Would require:
A global file to use as a translations registry. It would be a Rule set -> Available languages map
For each rule+language, a file with the full translation, deserializable and convertible to the Rule object
A script to translate new rules to a set of languages. Would be run by a GitHub action. It would:
Detect changed or new rules
Parse them
Translate them to all the target languages
Make a PR with the updated files
Add the UI to choose between available languages (To be downloaded from GitHub, maybe to a cache)
Optionally, add something to fetch for language updates (Could add checksums per translation to the registry file)
It could use existing translations, or it could be an automatic translation
Maybe, use the translate service client: https://cloud.google.com/translate/docs/apis Or the ML offline one: https://developers.google.com/ml-kit/language/translation?hl=en
Also, it may be translated and uploaded to GitHub as a JSON, so that it can be downloaded by users. WOuld require manual translation, or a GitHub action to do so, to translate everything everytime a new rule is added. Would require:
Rule set -> Available languages
map