[[User:Yair rand/rhymesedit.js|rhymesedit]] on German Wiktionary?

Jump to: navigation, search

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)

18:12, 3 January 2013

I'm not sure I understand completely. Does the German Wiktionary have rhymes pages already?

17:15, 6 January 2013

Not yet. We are planning to create them, but it's only an example/a try on my userpage by now. Best regards --Yoursmile (talk) 10:19, 7 January 2013 (UTC)

10:19, 7 January 2013

So, there's a number of issues that need to be worked out:

  1. 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')[0].href.match(/\d*$/), to var findNumberOfHeaders = +qq.lastChild.getElementsByTagName('a')[0].href.match(/\d*$/),.
  2. 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.
  3. The script is heavily dependent on WT:EDIT. That stuff will need to be imported, along with the newNode function in Mediawiki:Common.js.
  4. 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?
  5. 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?
  6. 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.
  7. Besides that, the actual script will need to be translated.

(Did I miss anything?)

18:49, 7 January 2013

Now we have the Rhymes namespace in the German Wiktionary and with a few minor changes your script works very well. We had to copy two more functions setCookie and getCookie from Common.js. Thank you.

09:46, 18 January 2013