This example should generate a warning:
A named references defined in RTL direction<ref name=x dir=rtl>right-to-left.</ref> and reused in LTR direction<ref name=x dir=ltr />
But this should not:
A named references defined in LTR direction<ref name=x dir=rtl>right-to-left.</ref> and reused in LTR direction<ref name=x />
even if the wiki's content language is LTR; i.e. when no dir is provided in short form ref tags, it should imply the content language's directionality, except if the full ref tag specifies a directionality in which case that should be used.
Implementation
- add a new error message (similar to cite_error_references_duplicate_key) that shows up when the dir of the same reference (aka same name) are not matching
- adapt existing test https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Cite/+/893013/ to reflect new behaviour
Open questions for UX
- wording of error message - suggestion: "There are two conflicting dir values in this reference"