Overleg gebruiker:Conrad.Irwin/editor.js

Nota:

Op het WikiWoordenboek is een tool aanwezig om op een snelle en intuïtieve wijze vertalingen toe te voegen. Dit hulpmiddel werd oorspronkelijk door Conrad.Irwin geschreven voor het Engelse WikiWoordenboek en werd aangepast naar de standaarden van het Nederlandstalige WikiWoordenboek. Hieronder vind u de oorspronkelijke documentatie afkomstige van het en.wiktionary.org. Met vragen of bugmeldingen kan je terecht op de overlegpagina van Annabel.

<br./><br./><br./>

If you are a programmer, you may find things of interest at User:Conrad.Irwin/editor_docs

General bewerken

After you have made an edit with one of the installed tools (instructions for which are listed below) a blue box appears in the top left corner containing:

  • Save page
  • Undo
  • Redo

No changes made to the page are recorded until you press Save.

Editing translations bewerken

You should see a line at the end of the table something like

  • Help         :                       Preview translation More
    ◻ masc. ◻ fem. ◻ neuter ◻ common gender ◻ plural
  • The first box is the ISO 639-1 or ISO 639-3 language code (for common languages you can put in the language name, and it will give you the code).
  • The second box is the translation to add. This should normally be one word, if you attempt to add many separated by commas you will get a warning. If you want to request a translation set the word to {{trreq}}.
  • The gender tick-boxes are normally only needed for nouns, "common gender" tends to be used for languages where male and female have combined into one class, whereas "neuter" is a separate gender that is neither male or female.
  • Clicking Preview will try to make the edit, and display the Save page button in the top left.
  • Clicking more opens the extra options (really intended only for advanced users)
  • The second line contains gender check boxes, normally only one should be ticked. Though occasionally more are needed.
    • Transliteration: (tr=) The word as it might be transliterated into the Latin alphabet.
    • Qualifier: This is used if the translation only applies in a certain specific context, or under specific conditions. Fox example: informally and literally.
    • Page name: (alt=) the name of the page when the word includes diacritics that are only normally found in a dictionary. This box may be automatically filled in for some languages (even when it is hidden).
    • Script template: (sc=) this only needs to be specified if you want something different from what it suggests.
    • Nesting: For languages that aren't already present in the translation table, the new language line may be nested under a language family heading. Or you may add translations with orthographic nesting. The syntax for this box is either: "Family Heading", "Family Heading/Language name" or "/Alphabet name".

Balancing translations bewerken

After adding a translation, two buttons will appear in the middle of the table:

  • Clicking "←" moves the first translation on the right to the end of the left list.
  • Clicking "→" moves the last translation on the left to the start of the right list.


Table Labelling bewerken

If you enable this feature, each translation table has a ± in the corner.

  • Clicking on this brings up an edit box for the table's header.
  • Type what you want in, normally the first few words in the definition (without linking or formatting)
  • Click "Preview" - if you are not happy with the result, click ± again - otherwise click "Save" in the top corner

WARNING: This feature has not been well tested in all browsers yet. Please notify me on this talk page if you have any problems.

You don't have the current version of the translation table gloss editor.


Disabling bewerken

Logged in users
Go to Special:Preferences and the Gadgets tab, then check "Disable translation table editor buttons"
Logged out users
You don't have the current version of the editor.
NB. Logged in users can disable it here temporarily, using the first method is recommended.

I can't do an entire project like this on my own, and so I've tried to make the architecture reasonably well-interfaced so that new modules can be added without having to know what else is going on; while none of this is trivial, the complexity is in trying to maintain a correspondence between the HTML on the page and the WikiText.

At the basic level, edits can be made by passing an edit object to the editor. Edit objects consist of a "redo" function which modifies the page HTML to reflect the edit, an "undo" function which does exactly the opposite of "redo", an "edit" function which performs the edit, and a "summary" string to be added to the edit summary. There is another framework for creating edit-forms, which is slightly more complicated - but should be easy enough to copy.

TODO bewerken

This is a list of things that need to be done. I will get round to them as and when I have the chance. If you want to add to this list, just a brief sentence describing the exact change; if you want something complicated add a section in discussion. If you want to implement these changes, please, please, please do.

Bugs/Enhancements
  • Enable context sensitive disabling of buttons (particularly save form, also trans-balancers, and preview)
  • Work out nested translation sections.
  • Handle API errors.
  • Check revision of page from API matches wgCurRevision
  • A field for additional edit summary
Features
  • Allow adding checktrans translations.
  • Add translation table button.
  • Edit existing translations.
  • (Add example sentence/quotations buttons)
  • (Change the trans-top color when there are no translations).
  • Add translation gloss.
  • Add error checking or warnings for nonexistant language codes.
Terugkeren naar de gebruikerspagina van "Conrad.Irwin/editor.js".