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

Fragment of a discussion from User talk:Yair rand
Jump to: navigation, search

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)

Yoursmile (talk)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?)

Yair rand (talk)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.

Formatierer (talk)09:46, 18 January 2013