[[User:Yair rand/rhymesedit.js|rhymesedit]] on German Wiktionary?
Hi Yair rand,
Would it be possible to add your rhymesedit-script to the German Wiktionary? We think about to add rhymes at our Wiktionary. You can see a first try here. It would be really nice, if you could help us. Best regards and a happy New Year --Yoursmile (talk) 18:12, 3 January 2013 (UTC)
I'm not sure I understand completely. Does the German Wiktionary have rhymes pages already?
So, there's a number of issues that need to be worked out:
- German Wiktionary seems to have a script that moves the edit button after the header text in the HTML, which the script doesn't react well to. This can be fixed pretty easily by changing the line
var findNumberOfHeaders = +qq.firstChild.getElementsByTagName('a').href.match(/\d*$/),to
var findNumberOfHeaders = +qq.lastChild.getElementsByTagName('a').href.match(/\d*$/),.
- The script ordinarily only activates if the viewed page is in the Rhymes namespace, (#106 on ENWT), which the German Wiktionary does not have at the moment.
- The script is heavily dependent on WT:EDIT. That stuff will need to be imported, along with the newNode function in Mediawiki:Common.js.
- The script looks for headers with the text "syllable" in it to identify sections. Does German have some extra complexities in this regard, or would a simple translation work?
- On the English Wiktionary, the script adds the rhyme template to the relevant entry to link to the rhymes page. Does the German Wiktionary community intend to have these links? If so, how will they be formatted?
- On ENWT, the script looks for language sections by taking the name of the rhymes page, removing the ":" and everything after it, and looking for a section header that contains only that content. If I understand correctly, DEWT's headers are slightly more complex than that, so the script will need to be modified to fit it.
- Besides that, the actual script will need to be translated.
(Did I miss anything?)