Several URLs can be added to each LanguageTool rule. But it seems that there is no way to choose one of the different URLs. In fact, only the last URL is added to the rule and shown to the users.
I have a proposal to enable the selection. We could use a parameter in a configuration file like:
If the URL doesn’t contain any of these strings, the URL is ignored. On the other hand, if the URL contains one of these strings, the URL is selected as the info link of the rule.
I am writing sometimes two <url></url>, one after another, and I don’t get any error. But according to rules.xsd, I probably should get one. Is it possible that some tests are disabled for Catalan? I don’t get any testrules error when I mistype <exmaple> instead of <example>.
The JSON API is prepared to return several URLs, but it is never used:
"urls": [
{
"value": "https://..."
}
],
The purpose is to be able to have different LanguageTool installations for different users with different needs (i.e. different and sometimes incompatible style guides).
Some users want only links to certain sources (e.g. its own style guide). Up to now I have been able to do this filtering out the undesired links. But now I need to add more than one URL to some rules.
Can we think of a solution that is general enough for all current and future needs?
I run ./build.sh ca test. There is an error if I mistype only one tag (<exmaple>....</example>):
Caused by: org.xml.sax.SAXParseException; lineNumber: 156; columnNumber: 36; The element type "exmaple" must be terminated by the matching end-tag "</exmaple>".
But I don’t get any error if I mistype both in the same way, because of autocompletion in my text editor (<exmaple>....</exmaple>).
If the XSD doesn’t allow that, yes. There’s indeed a bug in the test:
Running XML validation for ca/ca-ES/grammar.xml...
No rule file found at /org/languagetool/rules/ca/ca-ES/grammar.xml in classpath
So it’s trying to test ca-ES/grammar.xml, which doesn’t exist, thus ca/grammar.xml isn’t considered at all. If anybody has time to look for a fix, that would be great. I’ll open a bug report and link it here.