As an editor I want to be able to merge two Lexemes in order to eliminate duplicates.
Screenshots:
Before merge of two items:
After successful merge of two items:
BDD
GIVEN I have two Lexemes that I consider to represent the same word WHEN I go to Special:MergeLexemes AND enter their IDs AND I click "merge Lexemes" THEN the source Lexeme is emptied and replaced by a redirect to the target Lexeme AND the lemmas are merged - lemmas that exist both on the target and the source are kept on the target - lemmas that exist only on the source are added to the target AND the statements are merged - statements that exist both on the target and the source are kept on the target - statements that exist only on the source are added to the target - statements are merged when their main snak is identical (resulting in one statement with the qualifiers and references from both statements) AND the forms are merged - if there exists a form on the source that is identical to a form on the target (i.e. they have identical grammatical features, at least one common representation and no different representations for the same spelling variant) - their representations are merged in the same way lemmas are merged - their statements are merged in the same way they're merged on the lexeme level - forms that only exist on the source are added to the target AND I get a confirmation message saying "L123 was merged into L1234 and redirected."
Acceptance criteria:
- A new SpecialPage Special:MergeLexemes exists and can be used to merge two Lexemes.
- After a merge the source Lexeme contains a MediaWiki redirect to the target Lexeme (just like it is done for items).
- After the merge I can go to the URL of the source Lexeme and am redirected to the target Lexeme.
- If there are identical Forms (same representation and grammatical features) in each Lexeme then the statements for that Form get added to the existing Form.
Notes:
- Blocking of specific bad merges is not covered in this ticket.
- Redirecting on the Form level is not to be done at this point - only the Lexeme level
- Text and design on Special:MergeLexemes should be the same as on Special:MergeItems with s/Items/Lexemes. The text for the longer message should be "If you merge two Lexemes, all Lemmas, Statements, Forms and Senses will be moved from one Lexeme to the other."
- Item pages after merge show a dedicated view (do not try to show the emptied item); let's ensure this happens for lexeme likewise