Overleg gebruiker:Conrad.Irwin/editor.js: verschil tussen versies

Pagina-inhoud wordt niet ondersteund in andere talen.
Uit WikiWoordenboek
Verwijderde inhoud Toegevoegde inhoud
GerardM (overleg | bijdragen)
→‎Some testing: new section
Regel 348: Regel 348:


:::::Plurality had to be kept, of course. Now it's all correct. Thanks! --[[User:Vahagn Petrosyan|Vahagn Petrosyan]] 07:52, 4 May 2009 (UTC)
:::::Plurality had to be kept, of course. Now it's all correct. Thanks! --[[User:Vahagn Petrosyan|Vahagn Petrosyan]] 07:52, 4 May 2009 (UTC)

== Some testing ==

Hoi, I added a few translations and found the following
* When there is whitespace in front and at the end of a new translation, the software fails.
* When you remove this whitespace manually, the "other" magic does not happen
Thanks, [[User:GerardM|GerardM]] 08:04, 4 May 2009 (UTC)

Versie van 4 mei 2009 09:04

Sjabloon:shortcut

You don't have the current version of the editor.

If you see the "You don't have the current version" above, please Sjabloon:clear your cache. For technical reasons, this button will disable editing for this web-browser not for your account. To disable it completely whenever you are logged into your account, please add the following to your personal javascript.

Preferences('EditorJs').set('enabled', 'false')

Information

This is an attempt to make Wiktionary easier. It will provide more friendly buttons to manipulate WikiText. At the moment there is facility for adding translations, and balancing translation tables. It should be reasonably easy to add new modules - look at the source if you are interested.

It works (at the moment) in IE 6-8, Firefox 3, Opera 9, Safari 3-4, Chrome 1.

Usage

General

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.

Balancing translations

There are two buttons in each translation 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.

Editing translations

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.
  • The second box is the translation to add.
  • Clicking Preview will try to make the edit, and display the Save page button in the top right.
  • 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=) self-explanatory.
    • Qualifier: This is used if the translation only applies in a certain specific context, or under specific conditions. Fox example: Sjabloon:italbrac and Sjabloon:italbrac.
    • Page name: (alt=) the name of the page when the word includes diacritics that are only normally found in a dictionary. NOTE: this box used to be the other way around, and will still appear that way until your cache clears. If you have an old version, the page name should be put in the top box, and the word with optional diacritics in the "Display form" box.
    • Script template: (sc=) this only needs to be specified if you want something different from what it suggests.

    • These things are all per-language. We need some per-language metadata that tools like this can reference: does the language have gender for nouns? Which genders? Is this language in a script other than latin? If so provide sc= and a transliteration field (or call an automated plugin!) Does this language need display forms? (Arabic, Hebrew, Latin, Old English). — hippietrail 02:59, 20 April 2009 (UTC)
      If we can find a source for this list, then we can use it to guide people. But the chances of being able to create an exhaustive list for all languages are very slim, so removing or disabling controls will irritate people. Conrad.Irwin 09:13, 20 April 2009 (UTC)

Coding

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

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
  • Fix matching glosses to trans-tables to take account of page ordering as well as gloss.
  • Fix context sensitive disabling of buttons (particularly save form, also trans-balancers, and preview)
  • Fix nested translation sections.
  • Handle API errors.
  • Check revision of page from API matches wgCurRevision
  • Load language metadata as a separate <script> with long cache settings
Features
  • Allow adding checktrans translations.
  • Add translation table button.
  • Edit existing translations.
  • (Add example sentence/quotations buttons) * (Change the trans-top color when there is none translations).

Discussion

language names

Can it be made to convert language names to language codes? Most users know the former better, I think.—msh210 23:02, 12 April 2009 (UTC)

I thought about this too, it could, though I'd rather not include the names of all the ISO languages in the script (there are almost a WT:BP-load of them :p). I think a reasonable compromise might be to include the names of the first 100 languages in WT:STATS - and while I might make the input box slightly wide, I'll still leave iso code in the instructions. Conrad.Irwin 23:15, 12 April 2009 (UTC)
It will now convert ISO 639-1 language names into the respective codes. Conrad.Irwin 11:49, 14 April 2009 (UTC)

default

There was a BP suggestion (but I'm responding here as I can't really open BP on this machine) that this be turned on by default for users. I might suggest that that would lead to vandalism; perhaps, if such a thing is possible, turn it on by default for autoconfirmed users only?—msh210 23:02, 12 April 2009 (UTC)

Such a thing is possible, and that might be a better first-step. I still think it would be an interesting experiment to see whether a more structured input field leads to higher quality editing - though whether we want to even try is a question for the community at large. Conrad.Irwin 23:17, 12 April 2009 (UTC)

enabling ttbc

Is it possible to add an option around the editing translation boxes to allow adding in a translation to be checked format, maybe inside the More section ?? Serpicozaure(talk) 13:21, 14 April 2009 (UTC)

We'd first need to fix Sjabloon:temp to accept language codes. Conrad.Irwin 13:42, 14 April 2009 (UTC)
That's easy, and a fine idea. Done. Robert Ullmann 16:31, 14 April 2009 (UTC)

Handling of wikisyntax for the {{trans-top}} header

The script can not find the translation table in the wikitext if the translation table header contains some wikisyntax. For example, when someone write

{{trans-top|(''biology'') frog}}

instead of expected

{{trans-top|(biology) frog}}

See abort (as a verb) where such a trans-top is used.

Relevant code

When util.getTransGloss is called on the header "(<i>biology</i>) frog", then it returns "() frog" because <i> is not a text node.

for (var j=0; j< head.length; j++)
{
  if (head[j].nodeType == 3)
    ret += head[j].nodeValue;
}

Then, in util.matchGloss the "() frog" is splitted by spaces, which results in a "()" word. That word is not found in the wikiline provided by util.getTransTable so the script reports Could not find translation table...

Solution

It seems that it can be fixed by changing util.getTransGloss to get the text recursively. There are probably some nested tags in the translation headers somewhere (like '''''bold and italic'''''), so recursion would be the most error proof solution:

getTransGlossText: function (node) {
  var ret = '';
  var children = node.childNodes;
  for (var i=0; i<children.length; i++)
  {
    if (children[i].nodeType == 3)
      ret += children[i].nodeValue;
    else if (children[i].tagName.match(/^(i|b)$/i)) // recurse into I and B tags
      ret += util.getTransGlossText(children[i]);
  }
  // All characters except a-zA-Z0-9 are changed to spaces.
  // Handles differences between the HTML output and the corresponding wiki text.
  return ret.replace(/\W/g, ' '); 
},

getTransGloss: function (ul) {
  ...
  if(children[i].className && children[i].className.indexOf('NavHead') > -1)
    return util.getTransGlossText(children[i]);
  ...
}

Maybe I missed the real cause, since I don't know Javascript, how to debug the code and run the modified version.
Karelklic 19:17, 14 April 2009 (UTC)

Hi, thanks for the suggestion. Somethings just come up here, but I'll look in more detail later. My hope was to be as simple as possible and ignore all wikitext - even if I get "(biology)" it won't match the wikitext which will look like (biology) or (biology) or Sjabloon:italbrac. I think I will get the text recursively and then replace out all ascii chars. Or I could just use .innerText (or .textContent, or both...). If you want to get your own local copy for debugging, just create User:Karelklic/editor.js and modify your monobook.js like User:Conrad.Irwin/monobook.js. Conrad.Irwin 19:57, 14 April 2009 (UTC)
Thanks. You are right about the "(biology)" problem.
I updated the proposed solution. Now it works with abort, stick, and it should work even with Template:legal as we do not recurse into SPANs.
Karelklic 23:52, 14 April 2009 (UTC)
Cool, I'll do a quick test, and then upload it. Thank you very much! Conrad.Irwin 00:06, 15 April 2009 (UTC)
Committed changes. Conrad.Irwin 00:15, 15 April 2009 (UTC)

Problem

I tried to add a Korean word, but it kept blanking itself and would not enter anything. Now all of the boxes on every page are expanded and have a "ko" in them, and when I shrink them and remove the "ko", they ignore me and revert. How can I get it to shrink again? —Stephen 14:44, 15 April 2009 (UTC)

If a hard refresh and clicking "less" doesn't fix it. Then remove your cookies for wiktionary. 86.170.66.66 19:29, 15 April 2009 (UTC)
I managed to get it to work for Portuguese (Nazism), which resulted in the box shrinking back. But when I tried to do Yiddish, it blanked the entry and returned "Could not find translation entry for 'yi:נאציזם'. Please reformat". I had to enter the Yiddish manually. —Stephen 03:34, 16 April 2009 (UTC)
Attempting to enter the Yiddish caused the same problems as the Korean. Now the box is expanded again and won’t contract. I tried refreshing and clicking "less", but it makes no difference. So far I haven’t found anything that looks like a Wiktionary cookie. —Stephen 03:43, 16 April 2009 (UTC)
Nazism was an unfortunate choice of page, as the code to handle Sjabloon:temp had not yet been written. This should now be fixed. Sorry. (Are there any other templates I'm likely to come across, modulo Sjabloon:temp) Conrad.Irwin 11:21, 16 April 2009 (UTC)

language codes

noted you added support for language codes with - in them, but you haven't (yet) got the general case. You want something like:

[a-z]{2,3}(-[a-z-]{1,7}|) or [a-z][a-z][a-z-]{0,8} would be okay

it is 2 or 3 letters, optionally followed by - and 6-7 more, that may contain -. Limit is 10. I usually just use [a-z-]{2,10}, although that allows "--abc" and other such nonsense (;-). We have zh-min-nan for example. (Although in that case we want to use cmn.) And, e.g., be-x-old (which, perhaps fortunately, has no wikt ;-) Robert Ullmann 14:43, 15 April 2009 (UTC)

Thanks. Will do. 86.170.66.66 19:29, 15 April 2009 (UTC)

Undo stack problems

If I enter and preview an addition, then undo, then enter and preview again, all three page editing buttons are disabled, and I'm stuck until I reload the page. Enter and preview, [x] in the page controls to cancel, enter and preview again, and the buttons are disabled also.

Just a heads-up. I can do some more testing and produce a more detailed report if it would help. Tested in Safari 4 public beta (for Mac). Michael Z. 2009-04-15 19:23 z

I had timing problems in firefox. Maybe it's a similar issue. I've got a windows Safari 4 to play with, so I'll have a play now. 86.170.66.66 19:27, 15 April 2009 (UTC)
I've set them to always be enabled, which while not ideal, is the only solution I've found. .disabled is being correctly set to "false" but the browser doesn't seem to notice. Conrad.Irwin 19:52, 15 April 2009 (UTC)

Problem remaining with IE7

The add translation tool now works for IE7 but a problem remains: it does not add the entry in alphabetical order. For example, I added the Dutch translation to "hyperbolic" and it appended it to the end of the list, on the right side, whereas on Firefox it would (in the preview) show up in the correct place, between Czech and French, on the left side. —AugPi 02:18, 16 April 2009 (UTC)

Another problem: when I tried adding a second Dutch translation ("oudheidkunde") to "archaeology" in IE7, it would also append it to the end of the list, on the right side, ignoring the pre-existing Dutch translation on the left side. Then I tried Firefox which merged the new term with the old one, separated by comma: correctly. Also, the superscripted link to nl.wiktionary should not be positive (blue) but negative (red) because there is no "oudheidkunde" entry in nl.wiktionary. —AugPi 02:45, 16 April 2009 (UTC)

Now, I noticed that the AutoFormat bot corrected my "hyperbolic" edit. —AugPi 02:53, 16 April 2009 (UTC)

Now fixed. Yes, the sorting isn't perfect precisely because only AutoFormat knows what the real order is :D. Should now be a good enough guess that it looks right, and appends new translations to existing language sections. Conrad.Irwin 10:23, 16 April 2009 (UTC)

Disabling

Does the permanent disable code assume that one has WT:PREFS enabled? I don't, and adding the code above hasn't done what it says it would, tho the disable button above did work. — Carolina wren discussió 04:04, 16 April 2009 (UTC)

No, the "Preferences" referenced there is specific to editor.js, that's really bizarre because the button just runs that code once. (The advantage of putting it in your javascript is that it runs it every time you log in). Conrad.Irwin 10:10, 16 April 2009 (UTC)

Importing script to other Wiktionaries

First, thanks a lot for a great great script ... I've never added this many translations before! Just wondering, how much work is it to import this script to other Wiktionaries? Would one have to do heaps of changes to it? --Eivind (t) 08:17, 16 April 2009 (UTC)

The first few hundred lines are boilerplate code that you can copy straight off. The hard bit is creating the plugins, at the moment there are two plugins one which adds translations (it's awfully in need of repair already ;D), and one which balances them (which is pretty nice still). If you were to transfer it to another Wiktionary (I have no time to do that currently, as my wiki-time is devoted to getting it working better here), you would need to write new plugins. Writing plugins isn't that hard in principle, you just need to create objects with three properties (redo, undo, edit and summary) and call "new Editor().addEdit()" with it. The "redo" and "undo" function modify the HTML page to provide a preview to the user, and the "edit" function edits the wikitext to provide the change; the complicated bit is ensuring that the HTML modifications accurately reflect the change - though "new Editor().page.parse()" will use the API to parse wikitext which can help. It would take a day or two of competent javascripting from someone who knows the formats used on the Wiktionary intimately. Conrad.Irwin 10:09, 16 April 2009 (UTC)
If I find a time for it, I plan to add it to the French Wiktionary... It's a matter of time. :( --AglarEdain 06:33, 17 April 2009 (UTC)
Cool. If you want to ask questions about it, I'm normally in irc://irc.freenode.net/#wiktionary as cirwin. Conrad.Irwin 09:00, 17 April 2009 (UTC)

Error message

When trying to add "benzoile" as the Italian translation of benzoyl I get error message "Could not find translation table for 'it:benzoile'. Please improve glosses". SemperBlotto 22:01, 16 April 2009 (UTC)

Fixed, though I need to do more work on this. Conrad.Irwin 09:15, 17 April 2009 (UTC)

Reporting working for Safari 3

Hello.

Firstly, I want to report the jscript works fine with my Safari Version 3.2.1 (5525.27.1) running on Mac OS X 10.5.6 (9G55).

Secondly, I work to add French translations everywhere they're lacking (supposing I'm able to understand the definition) AND I WANT TO THANK YOU!

Until now, adding translations was hard work... Since then, with the great help of your awesome script, it's still work but it's easier. I think I will be able to work twice faster, maybe three times.

I can only find one criticism: The blue window is not so much easy to target on its top-left corner for new users. And it's only a small detail.

Really, thank you. May I say I love you. No, it's exagerated. But I really appreciate your concern about translation adders.

Best regards.

--AglarEdain 06:29, 17 April 2009 (UTC)

I've tried getting the window to flash bright green briefly, maybe this will make it easier to spot without hurting the eyes of other people too much. Conrad.Irwin 09:16, 17 April 2009 (UTC)
On my computer (XP running Internet explorer, the save buttons and greenbox appear underneath the stuff at the top of the page. These buttons should be included with the preview buttons and stuff, not shunted aquardly somewhere else.
If you Sjabloon:clear your cache they should now appear above stuff in the top-left of your window, it's still not close to the preview stuff because I wanted to emphasise that you can make many changes and then one save. Conrad.Irwin 14:20, 17 April 2009 (UTC)

It has stopped working

I now get the left/right balancing arrows, but not the option to add a translation. SemperBlotto 08:31, 20 April 2009 (UTC)

Now fixed. Sorry. Conrad.Irwin 09:38, 20 April 2009 (UTC)
Thanks - now OK - and can confirm it works with IE8. SemperBlotto 09:45, 20 April 2009 (UTC)

Language metadata thoughts

As we've discussed to keep the GUI sharp we really want to store facts about many languages in the Wiktionary: namespace just as we now store full English names for language codes. These facts I shall call "metadata".

There are a few basic differences in the major languages that will affect the GUI, and a whole bunch of exceptions we will have to put off until later.

  • Does this language use a script other than Latin?
  • If so which script?
  • If so provide a transliteration field in the GUI.
  • (exception: multiple scripts)
  • Does this language have grammatical gender for nouns?
  • If so which genders?
  • Provide these gender options in the GUI.
  • (exception: genders for other parts of speech)
  • Does this language have plurality of nouns? (Chinese and Japanese don't)
  • If so provide a field for the plural.
  • (exception: what about countable/uncountable)
  • Does this language have optional diacritics or vowels? (Hebrew, Latin)
  • If so provide a field for the full spelling and the basic spelling.

Any thoughts? — hippietrail 12:52, 20 April 2009 (UTC)

In the near future I'd like to store these in the script itself, there is already some metadata there, the two further options are either to store them in some custom storage on the toolserver, or to store them in Template space so that other on-wiki can use them. It's not high priority for me at the moment, I'd rather support nesting and editing first, but if you want to implement this, I'll be happy to merge the changes. Conrad.Irwin 13:01, 20 April 2009 (UTC)
Have a look at my metadata version of editor.js at User:Hippietrail/editor.js - it checks when you change the language code whether the new language has certain features and it automagically shows/hides the more/less section depending on whether the language uses either transliterations or optional vowels or diacritics. The text of the more/less button is not yet synched or I would be bold. The step after that is to make individual fields such as gender and plural hide/show. — hippietrail 01:17, 23 April 2009 (UTC)
Looks nice, though I wonder whether, if the user has explicitly opened the "More" box, it should stay open; and whether clicking More explicitly should show all the hidden components - just in case we have an error in our metadata. Conrad.Irwin 09:01, 23 April 2009 (UTC)

feature request

(Low priority.) If the only change is rebalancing, can it refuse to save (since AF will do the same, and also make other fixes, so don't waste the edit)? (I guess I should say, "Can the Save box only appear if a translation is added, not on rebalancing", but I'm not sure.)—msh210 17:37, 21 April 2009 (UTC)

I was going to tinker with not showing the balance buttons until a translation had been added - yes, I think that's a good idea. Conrad.Irwin 17:44, 21 April 2009 (UTC)
How about a third button that automatically balances? And how about a standard balancing algorithm so that AF and editor.js do it the same way perhaps? — hippietrail 03:56, 22 April 2009 (UTC)
As it will (normally) require just one ← or → I don't see too much problem with the user doing it and it makes my life much simpler. I'm not saying I won't do this, but at the moment there are many more pressing things to resolve; if you want to implement it, please feel free. Conrad.Irwin 09:14, 22 April 2009 (UTC)

Bug reports and feature requests for JavaScript extensions should be on Bugzilla

Hey guys it's really too hard to track bugs and features on talk pages. That's why I fought for our right to use the Wikipedia Bugzilla for stuff exactly like this. Please make use of it, it's very handy and it's being neglected:

hippietrail 01:10, 23 April 2009 (UTC)

The main problem with bugzilla is that you don't instantly get to see all previous related discussion; and if you couple that with the need to create an account to use it, the techy-orientated interface, and the effort involved in getting CCs on a subset of bugs; my net feeling is that talk pages are much more suited to this kind of discussion. Yes, if we had a dedicated development team, that would be better - but as we don't, and bug reports come solely from people who can edit wiktionary, I feel that such discussion should be on the talk pages. Conrad.Irwin 08:58, 23 April 2009 (UTC)

Your metadata improvements

Awesome! The GUI upating on change of language is lovely.

But there are bugs. When I try to "preview" additions I get a bunch of alerts with source code which I guess are exceptions being thrown for some errors.

This is fun to hack with you! — hippietrail 08:31, 24 April 2009 (UTC)

Ach, no those were there for debugging - sorry. You can remove them if you want, there does seem to be a problem when gender for a language is undefined though. Conrad.Irwin 09:21, 24 April 2009 (UTC)
Aha. Undefined gender, undefined language, or both? Examples? — hippietrail 09:58, 24 April 2009 (UTC)
I've been thinking about your reservations with having all the metadata in one data structure. To keep it centralized and make it possible for consumers to get just what they want I might be able to make a data server on the ToolServer. I'll keep the full set of data there and you can call it for which languages and fields you want. Then you can from time to time cut and paste that into your code. Seems like a bit of trouble but it's the only way I can think to keep it centralized and minimal for more than one application. Now to reenable my toolserver account... — hippietrail 07:55, 25 April 2009 (UTC)
That would make sense, it would also be useful if languages were divided into a few (largish) chunks, so that you can request lots of meta-data at a time. One chunk could be ISO 639-1, and then perhaps by letter for ISO 639-3. Conrad.Irwin 09:18, 25 April 2009 (UTC)
You mean request all languages which have ISO 639-1 codes? I could set it up as an actual database in which case it could be queried by any field really. It would be a pretty small and straightforward database so should be pretty fast and it would be read-only. But I think I'll do it as a Perl program first since I don't like databases until I really need their functionality (-: — hippietrail 12:19, 25 April 2009 (UTC)

Edittools for editor.js

I guess it would probably not be too easy to implement but Connel did hack Edittools to work with the search box once.

It's especially needed for languages that use non-Latin script and need rare diacritics for transliterations. Keyboard layouts don't have both )-: — hippietrail 11:08, 24 April 2009 (UTC)

Doesn't your operating system offer something that works everywhere? It seems a waste of resources to duplicate OS functions which are not specific to Wiktionary, like international text entry.
If you use a Mac, you can enable multiple keyboard layouts in System Preferences > International > Input Menu, and switch between them with the keyboard menu. Also enable the Keyboard Viewer to help learn the layouts, and the Character Palette for access to all of Unicode. If you're determined, you can make custom keyboard layouts with Ukelele (I have made two that I use all the time). Michael Z. 2009-04-24 14:23 z
I have four keyboard layouts installed. I am not aware of any keyboard layout which includes for example both Devanagari and the Latin letters with the diacritics needed for the IAST transliteration. Many of these diacritics are not available on any keyboard layout at all.
Rare character input as such is not an operating system function but a function of EditTools, which has filled this need and has been expanding for several years now on the English Wiktionary and has spread to many other wikis besides. But it does not allow entering rare characters into the editor.js fields, just the main text editing area. — hippietrail 15:53, 24 April 2009 (UTC)
There's no reason to restrict specialized text entry to wiki sites. It could certainly be useful on other websites, in your word processor, email program, etc. This is properly a function of the OS.
If you're using a Mac, then I can help create a keyboard layout for Devanagari + IAST. Perhaps the caps lock key can toggle between two modes. If IAST transliteration is deterministic, then another option is to create a text filter which converts any selected text to IAST, prompted by a Services menu item or keyboard shortcut. I'd have to do a bit of research, but I'm sure this is possible. Michael Z. 2009-04-24 16:20 z
Edittools exists precisely because people don't want to/don't know how to reconfigure their computer just to (in practice) use wiktionary. Yes, it would be great if everyone had all the keyboard layouts they need to hand; no it's not practical to assume them will [including people who use Wiktionary all the time, not just the one-timers or newbies]. Similar functionality to what you describe exists under Windows and Linux, but people are generally reluctant to tweak configuration (bizarre, I know). I don't have the time to put edittools there myself, but it shouldn't be too hard to steal User:Connel MacKenzie/keypad.js and modify it. (Though a much better {for everything} solution would be to move all of edittools into a javascript file that is include on edit pages and when the user clicks some button to show it). Conrad.Irwin 09:25, 25 April 2009 (UTC)
I planned to write that I'm not complaining about Edittools. But the more I think about it, the more I feel that this kind of work could be problematic in principle. I did go to some trouble to hide this and reduce other interfering page clutter in my Wikipedia user style. A developer spends energy duplicating OS functions for the project, and then I have to spend further energy hiding his work because it is obtrusive. We are working against each other. Edittools is unfinished or inadequate unless it works in every single text-entry field in Wiktionary, for both readers to search and editors to edit, but if it were completed, then it would sorely interfere with the site.
I do sympathize with the nightmare that changing even minor settings can become for Windows users. But the more specialized a computer user's needs, the more they need to use technical solutions to fulfil them. If they need to type Devanagari, then it may just make sense for them to learn how to bring up the Character Palette or Devanagari keyboard layout. Our resources are better spent helping them use their computers, then making a half-baked copy of software that they already have (great respect to our developers, but we don't have the resources and software framework of Apple or Microsoft).
I'm not able to help Windows users, but I am willing to help create a Mac keyboard layout if it will make a big difference for a Mac editor here. Michael Z. 2009-04-25 18:33 z
You are more than welcome to develop and announce on Wiktionary all the keyboard layouts you like. I can't afford a Mac. I don't know which OS our major Devanagari contributor, Dijan, uses or how he currently enters his scripts and transliterations. If you look through the edittools list you will see which alphabets, scripts, and sets of diacritics are used here. We use scripts including Arabic, Armenian, Bengali, Cyrillic, Devanagari, Ethiopian, Georgian, Glagoitic, Greek, Gujarati, Han, Hebrew, Hiragana, Kannada, Katakana, Khmer, Lao, Latin, Malayalam, Oriya, Punjabi, Sinhala, Tamil, Telugu, Thai, Tibetan. I've probably forgotten a couple. Some are used for more than one language and sometimes need different transliteration diacritics in different languages. And of course there are the pronunciation systems too. Others are not in great use here yet and might not have evolved one standard set of transliteration diacritics. Maybe if you ask on the Beer Parlour which of those would be most appreciated for our Mac-owning contributors you would know where to start first. Good luck. — hippietrail 00:08, 26 April 2009 (UTC)
As I've mentioned before (a while ago now), edittools should be moved into Javascript and there should be a way to enable it for all text boxes. Whether or not it is useful to you is irrelevant, the fact that almost every Wikimedia project uses it should convince you that it is, if totally "incorrect" from a technical point of view, a necessity for users. The chances are, if it were well written javascript, it could be a standalone library that any site could easily include to provide highly multilingual input. It is on my todo list, but it's a long way down. Conrad.Irwin 00:35, 26 April 2009 (UTC)
  • Edittools is actually part of MediaWiki rather than part of Wiktionary but it is customized by each site. There are a number of bugs and feature requests on BugZilla to address its inadequacies. Perhaps it would be more constructive to comment there where you will reach a much larger audience: https://bugzilla.wikimedia.org/buglist.cgi?quicksearch=edittoolshippietrail 05:28, 26 April 2009 (UTC)
Well, I'm in favour of Conrad's plans, where do I vote? When I edit a page, EditTools bloats the requested HTML from 24 kB to 245 kB – that's one thousand percentMichael Z. 2009-04-26 16:21 z

Found in the wild...

See the recent history of cyclical.—msh210 17:27, 27 April 2009 (UTC)

Meh. You any good at user-interface design? - because apparently I'm not :(. Conrad.Irwin 23:17, 27 April 2009 (UTC)

"Please reformat" error

Hi. Am I doing something wrong? I get an error saying "Could not find translation entry for '...'. Please reformat" every time I try to add a translation not to the first table. In eat, for example. It's the same in Opera 9, Firefox 3, IE8. Hard refresh doesn't help. --Vahagn Petrosyan 08:57, 28 April 2009 (UTC)

My apologies, I broke it a few days ago without noticing. (Why the function for searching for strings behaves differently from the function for searching for regular expressions only the language "designers" know). It should now be fixed if you Sjabloon:clear your cache. Conrad.Irwin 09:21, 28 April 2009 (UTC)
Thanks! --Vahagn Petrosyan 10:03, 28 April 2009 (UTC)


CHINESE

How do I add a translation under "Chinese"? You're excellent translation adding device will only let me add "Mandarin", but Chinese is the name that most people add translations under.

Fix Sjabloon:temp or make a new language template, Sjabloon:temp that will return Chinese. Please be patient, there are many other things I need to fix, and I have little time to fix them. (If you know javascript, you can probably help) Conrad.Irwin 09:14, 29 April 2009 (UTC)

Script guessing for several languages

Hi. For Sjabloon:temp, Sjabloon:temp, Sjabloon:temp, Sjabloon:temp, Sjabloon:temp, Sjabloon:temp, Sjabloon:temp, Sjabloon:temp languages Sjabloon:temp script should be automatically guessed. Can you add that?
And another small thing: I think it would be nice if the "Undo" button would fill back the boxes with the translation which is being undone. I, for example, almost always use Undo when I notice a typo after pressing "Preview translation". This way one wouldn't have to repeat the content. --Vahagn Petrosyan 08:33, 3 May 2009 (UTC)

Aha! Language metadata is my territory now. I'll add them right away. — hippietrail 10:12, 3 May 2009 (UTC)
Mongolian was already there but I've added the others too. Did you notice we can now also display just the appropriate fields for gender, plural, transliteration, and alt forms too? If you let me know those traits of the languages I'll add that as well. — hippietrail 12:10, 3 May 2009 (UTC)
Nice! Here are some traits I know:
Sjabloon:temp - leave nothing
Sjabloon:temp - leave nothing
Sjabloon:temp - leave only transliteration
Sjabloon:temp - leave only transliteration
Sjabloon:temp - leave only transliteration
Sjabloon:temp - leave only transliteration
Sjabloon:temp - leave only transliteration
Sjabloon:temp - leave nothing
Sjabloon:temp - leave only transliteration
Sjabloon:temp - leave nothing --Vahagn Petrosyan 16:02, 3 May 2009 (UTC)
Just to be sure I haven't misunderstood are you saying that noun of these languages have plurality for nouns? I thought that was rare outside East Asia. — hippietrail 22:49, 3 May 2009 (UTC)
OK done except for plurality until I hear some more. — hippietrail 23:28, 3 May 2009 (UTC)
Plurality had to be kept, of course. Now it's all correct. Thanks! --Vahagn Petrosyan 07:52, 4 May 2009 (UTC)

Some testing

Hoi, I added a few translations and found the following

  • When there is whitespace in front and at the end of a new translation, the software fails.
  • When you remove this whitespace manually, the "other" magic does not happen

Thanks, GerardM 08:04, 4 May 2009 (UTC)