Hello, you have come here looking for the meaning of the word MediaWiki talk:Gadget-TranslationAdder.js/Archive1. In DICTIOUS you will not only get to know all the dictionary meanings for the word MediaWiki talk:Gadget-TranslationAdder.js/Archive1, but we will also tell you about its etymology, its characteristics and you will know how to say MediaWiki talk:Gadget-TranslationAdder.js/Archive1 in singular and plural. Everything you need to know about the word MediaWiki talk:Gadget-TranslationAdder.js/Archive1 you have here. The definition of the word MediaWiki talk:Gadget-TranslationAdder.js/Archive1 will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofMediaWiki talk:Gadget-TranslationAdder.js/Archive1, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
language names
Latest comment: 15 years ago3 comments2 people in discussion
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.Irwin23:15, 12 April 2009 (UTC)Reply
Latest comment: 15 years ago2 comments2 people in discussion
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)Reply
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.Irwin23:17, 12 April 2009 (UTC)Reply
enabling ttbc
Latest comment: 15 years ago3 comments3 people in discussion
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)Reply
Handling of wikisyntax for the {{trans-top}} header
Latest comment: 15 years ago5 comments2 people in discussion
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.nodeType == 3)
ret += head.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.nodeType == 3)
ret += children.nodeValue;
else if (children.tagName.match(/^(i|b)$/i)) // recurse into I and B tags
ret += util.getTransGlossText(children);
}
// 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.className && children.className.indexOf('NavHead') > -1)
return util.getTransGlossText(children);
...
}
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 (biology). 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.Irwin19:57, 14 April 2009 (UTC)Reply
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.
Latest comment: 15 years ago5 comments3 people in discussion
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? —Stephen14:44, 15 April 2009 (UTC)Reply
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. —Stephen03:34, 16 April 2009 (UTC)Reply
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. —Stephen03:43, 16 April 2009 (UTC)Reply
Nazism was an unfortunate choice of page, as the code to handle {{trreq}} had not yet been written. This should now be fixed. Sorry. (Are there any other templates I'm likely to come across, modulo {{ttbc}}) Conrad.Irwin11:21, 16 April 2009 (UTC)Reply
language codes
Latest comment: 15 years ago2 comments2 people in discussion
noted you added support for language codes with - in them, but you haven't (yet) got the general case. You want something like:
{2,3}(-{1,7}|) or {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 {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 Ullmann14:43, 15 April 2009 (UTC)Reply
Latest comment: 15 years ago2 comments2 people in discussion
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, 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). —MichaelZ. 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.6619:27, 15 April 2009 (UTC)Reply
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.Irwin19:52, 15 April 2009 (UTC)Reply
Problem remaining with IE7
Latest comment: 15 years ago4 comments2 people in discussion
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. —AugPi02:18, 16 April 2009 (UTC)Reply
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. —AugPi02:45, 16 April 2009 (UTC)Reply
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.Irwin10:23, 16 April 2009 (UTC)Reply
Disabling
Latest comment: 15 years ago2 comments2 people in discussion
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.Irwin10:10, 16 April 2009 (UTC)Reply
Importing script to other Wiktionaries
Latest comment: 15 years ago7 comments4 people in discussion
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)Reply
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.Irwin10:09, 16 April 2009 (UTC)Reply
In Lithuanian Wiktionary are use translation line (in exampl for english translation of word run:
{{env1}} {{t+|en|run}}
)
for this reason was needed to change line parsing code and new translation line formating code, include Lithuanian names of languages and its changing to 2-3 simbol codes. And was needed translate messages and interface to Lithuanian language. You can see this code lt:Naudotojas:Vpovilaitis/editor.js. --Vpovilaitis14:05, 24 May 2009 (UTC)Reply
Error message
Latest comment: 15 years ago2 comments2 people in discussion
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". SemperBlotto22:01, 16 April 2009 (UTC)Reply
Latest comment: 15 years ago3 comments2 people in discussion
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.
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.Irwin09:16, 17 April 2009 (UTC)Reply
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 clear your cache (ctrl+shift+F5) 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.Irwin14:20, 17 April 2009 (UTC)Reply
It has stopped working
Latest comment: 15 years ago3 comments2 people in discussion
Latest comment: 15 years ago4 comments2 people in discussion
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.
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.Irwin13:01, 20 April 2009 (UTC)Reply
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. — hippietrail01:17, 23 April 2009 (UTC)Reply
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.Irwin09:01, 23 April 2009 (UTC)Reply
feature request
Latest comment: 15 years ago4 comments3 people in discussion
(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)Reply
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.Irwin17:44, 21 April 2009 (UTC)Reply
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? — hippietrail03:56, 22 April 2009 (UTC)Reply
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.Irwin09:14, 22 April 2009 (UTC)Reply
Bug reports and feature requests for JavaScript extensions should be on Bugzilla
Latest comment: 15 years ago2 comments2 people in discussion
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:
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.Irwin08:58, 23 April 2009 (UTC)Reply
Your metadata improvements
Latest comment: 15 years ago6 comments2 people in discussion
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.
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.Irwin09:21, 24 April 2009 (UTC)Reply
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... — hippietrail07:55, 25 April 2009 (UTC)Reply
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.Irwin09:18, 25 April 2009 (UTC)Reply
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 (-: — hippietrail12:19, 25 April 2009 (UTC)Reply
Edittools for editor.js
Latest comment: 15 years ago6 comments2 people in discussion
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 )-: — hippietrail11:08, 24 April 2009 (UTC)Reply
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). —MichaelZ. 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. — hippietrail15:53, 24 April 2009 (UTC)Reply
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. —MichaelZ. 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 . 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.Irwin09:25, 25 April 2009 (UTC)Reply
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. —MichaelZ. 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. — hippietrail00:08, 26 April 2009 (UTC)Reply
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.Irwin00:35, 26 April 2009 (UTC)Reply
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 percent. —MichaelZ. 2009-04-26 16:21 z
Found in the wild...
Latest comment: 15 years ago2 comments2 people in discussion
Latest comment: 15 years ago3 comments2 people in discussion
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 Petrosyan08:57, 28 April 2009 (UTC)Reply
Latest comment: 15 years ago2 comments2 people in discussion
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 {{zh}} or make a new language template, {{zh-real}} 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.Irwin09:14, 29 April 2009 (UTC)Reply
Latest comment: 15 years ago7 comments2 people in discussion
Hi. For {{cv}}, {{kk}}, {{ky}}, {{lez}}, {{mn}}, {{os}}, {{tg}}, {{tt}} languages {{Cyrl}} 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 Petrosyan08:33, 3 May 2009 (UTC)Reply
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. — hippietrail12:10, 3 May 2009 (UTC)Reply
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. — hippietrail22:49, 3 May 2009 (UTC)Reply
Hi, I will fix this by just stripping the whitespace from front and back, but I am confused by what you mean by "other magic"? Conrad.Irwin09:13, 4 May 2009 (UTC)Reply
Feature request: add translation requests via the GUI
Latest comment: 15 years ago4 comments2 people in discussion
It would be really nice if there were a way to request translations with editor.js adding {{trreq}}.
I'm not sure how to add it elegantly to the current GUI though. It would be better if the GUI wasn't there all the time but just had a couple of buttons that would bring up the rest of the GUI. — hippietrail06:21, 7 May 2009 (UTC)Reply
I'd put it under "More" as a seperate button, probably alongside a "TTBC" checkbox (as requested at the top of the page). If we decide to do anything other than translations, then we will need some way of turning the buttons on and off - the good thing about the translations is that the editing form is hidden.Conrad.Irwin09:39, 7 May 2009 (UTC)Reply
I just had an idea. How about keeping the edit form hidden until a big shiny new edit button between the arrow buttons on the table is clicked? The pages looks incredibly cluttered on a small screen with several small translation sections and a huge edit box in each one. — hippietrail22:01, 7 May 2009 (UTC)Reply
One of the aims of having the translation interface was to encourage people to add translations - already one of our strongest areas, but still very very incomplete. While this is possible, I think it would defeat part of the purpose; I envisage (at a later stage) having some kind of interface at WT:EDIT where people can choose which interfaces are visible by default. Conrad.Irwin22:57, 7 May 2009 (UTC)Reply
log issue
Latest comment: 15 years ago2 comments2 people in discussion
If you already saved the page, and try to save another edit on the same page, the log at the top left disappears. Thus you don't know what the script is actually doing. -- Prince Kassad14:39, 8 May 2009 (UTC)Reply
Latest comment: 15 years ago3 comments2 people in discussion
editor.js currently just adds the edit comment "Assisted" with notes on which languages were added. But it should have in the "More" GUI a place to add a specific comment as well. For instance I just added several translations to alphabet from Wikipedia and I wanted to note that's where I got them from. — hippietrail23:45, 8 May 2009 (UTC)Reply
This can be added, I was waiting for you to commit your changes to alt-form generation before I played around too much. Conrad.Irwin17:50, 9 May 2009 (UTC)Reply
Latest comment: 15 years ago5 comments2 people in discussion
Hi, Conrad. I see you’ve added automatic transliteration to your TODO list. I don’t know how you’re planning to do it, but is it conceivable that some day the same functionality could also be used in inflection templates like {{ru-noun}} or {{hy-verb}} and everywhere else? --Vahagn Petrosyan11:58, 10 May 2009 (UTC)Reply
Well, in theory, yes. In practicality, not unless someone writes an extension (not that hard) and it then gets implemented on Wiktionary (very much harder, thanks to politics). It would also be possible to create some kind of Javascript that could create a button that when you clicked it, could transliterate some text in the edit box. In the general case, complete transliteration may not be possible automatically, but I think in a majority of cases a very good guess can be made. Are there any common problems that you can for-see an attempt like this running into? My current plan is to do something like User:Conrad.Irwin/ipa2sampa.js with a few hacks for specific problems in specific languages. Conrad.Irwin12:53, 10 May 2009 (UTC)Reply
At first, I thought it was better to rigidly bound transliteration feature to inflection templates like {{ru-noun}}, so that there was no way of changing the automatic transliteration result. That way we would be consistent with our transliteration standards because right now there are as many de-facto transliteration schemes, as there are editors. But now I see Javascript button is the way to go. With such button it’ll be possible to transliterate not only the inflection lines, but also Synonyms, Related terms, declension tables, etc., like in շեն. As to the problems that could arise, I don’t know Javscript, so can’t answer.
By the way, is User:Conrad.Irwin/ipa2sampa.js working? I've imported it, but I don’t see new buttons. I think I can use it for transcribing Armenian letters into IPA in pronunciation sections. The correspondence in armn2ipa.js will be regular 95% of the time. --Vahagn Petrosyan14:36, 13 May 2009 (UTC)Reply
No, it doesn't do anything, sorry - just proof-of-concept code. You say armn2ipa is 95% regular, how regular is Armenian -> transliterated Armenian? Conrad.Irwin15:02, 13 May 2009 (UTC)Reply
It’s 100% regular. But only if it is possible to take into accout this hack: the letter ու consists of two Unicode characters and should be transliterated as u. But whenever it’s constituent characters (independent letters themselves) are encountered separately, they should be transliterated as: ո - o, and ւ - w. Also, Georgian transliteration is 100% regular. So are Ukrainian, Belarusian, Bulgarian, Russian (no matter what Wiktionary:Russian transliteration says right now) and a dozen of other Cyrillic alphabets. --Vahagn Petrosyan15:31, 13 May 2009 (UTC)Reply
Sort order broken for accented character
Latest comment: 15 years ago4 comments3 people in discussion
I'm just entering a couple of words from my Guatuso grammar. It turns out the Ethnologue/ISO/Wiktionary name for Guatuso is "Maléku Jaíka". editor.js just put "Maléku Jaíka" after "Maltese" which is wrong but it would be a bit of a pain to do either localised or accent-stripped sorting of language names in JavaScript. — hippietrail07:20, 13 June 2009 (UTC)Reply
The order is the same for AutoFormat, so it's "correct" in a way. By this order, Maléku Jaíka sorts after Malto and before Mam, and Ömie sorts all the way after Záparo, but still before ǃXóõ. If you try to change the order, AutoFormat will fix it anyway. -- Prince Kassad08:25, 13 June 2009 (UTC)Reply
I know it's a minor issue depending on your perspective but it's correct only in a "sorting by binary value" way which is meaningless to dictionaries and dictionary users. On which platform does AutoFormat run? If on *nix at least it shouldn't be hard to fix. And which programming language is it in? My next/previous extension sorts correctly using Perl running on Linux. It uses the underlying *nix UTF-8 locale which I think uses some official Unicode collation algorithm. This is not easy to achieve for editor.js but should be pretty easty to achieve for AutoFormat. I can help if need be. — hippietrail08:41, 13 June 2009 (UTC)Reply
I won't fix this. If you want the order to be correct, fix AutoFormat which will re-sort the entry after a few minutes if it is wrong on save. (Solution two, change the language name to Guatuso :p) Conrad.Irwin09:35, 13 June 2009 (UTC)Reply
Latest comment: 15 years ago4 comments3 people in discussion
Hi! First, thank you for this wonderful tool. Here is what brings me here: in the molt entry, when I push the <-- button in one of the translation tables, editor.js tells me that it can't find {{trans-mid}}. However, I fail to see anything wrong in the wikicode. Is this a bug? — Xavier, 15:20, 21 June 2009 (UTC)Reply
Indeed, I can confirm this bug. It's not high priority since AutoFormat corrects any such translation tables, but it should be fixed. -- Prince Kassad15:31, 21 June 2009 (UTC)Reply
Should now be fixed, I'd forgotten that number points to the start of the line, while the other points to the new-line character just before it. Conrad.Irwin17:11, 21 June 2009 (UTC)Reply
Latest comment: 15 years ago2 comments2 people in discussion
Thanks for this great tool. One problem however: The gender check boxes disappear when I enter "nb" (Norwegian Bokmål) as language! (Should have the same genders as Norwegian.) Håkon07:30, 23 June 2009 (UTC)Reply
That's my fault. editor.js gets its data about which genders a language has from my language metadata server on the Toolserver. I probably wasn't sure whether Bokmål had 2 genders like Danish or 3 genders like Nynorsk. I'm on holiday and behind a firewall right now but I'll try to fix it as soon as I can. — hippietrail01:44, 24 June 2009 (UTC)Reply
Printable version
Latest comment: 15 years ago2 comments2 people in discussion
Fixed if you clear your cache (ctrl+shift+F5). (I think I introduced that regression when adding warnings about commas). As to the section above, I had hoped to have fixed that error shortly before you made that report - but I struggle to replicate it; if it is a persistent problem I can have another look - but otherwise I'll just shuffle it under the carpet for the moment (though if someone with more patience than me wants to replicate the conditions necessary for it, please let me know). Conrad.Irwin22:36, 3 August 2009 (UTC)Reply
autostripping accents for pagenames
Latest comment: 15 years ago8 comments3 people in discussion
Slovene could use this... replacing the accented characters manually is a bit of a drag. I'm not sure of all the possible combinations, but Slovene has five (or six) vowels (a, e, i, o, r (yeah), u) and 3 accents, acute á grave à and circumflex â. So theoretically 36 possible changes, counting lowercase and capitals and assuming each vowel can take each accent (which they probably can't, but just to be safe, you know).
Don't forget <ẹ> and <ọ>, and combining diacritics as accents on them! Also, combining diacritic would be used for <r̀> and <r̂>. Also, sometimes inverted breve is used instead of circumflex, so adding those as alternative cases would be advised.. --Ivan Štambuk01:57, 4 August 2009 (UTC)Reply
Should I remove the under-dot from ẹ and it's other accented forms? I'm not sure if an error (like the inverted breve) should be ignored as that will presumably make occurrences of it harder to find in addition to providing a reason to perceive it as correct instead of an error. Conrad.Irwin22:49, 4 August 2009 (UTC)Reply
Ok, I've partly answered my own queries by looking at w:Slovene_language#Prosody. I am taking it on faith, and using the following:
And also removing: u'\u0301\u0300\u0302\u0311\u030f\u0323' (COMBINING ACUTE ACCENT, COMBINING GRAVE ACCENT, COMBINING CIRCUMFLEX ACCENT, COMBINING INVERTED BREVE, COMBINING DOUBLE GRAVE ACCENT, COMBINING DOT BELOW). Let me know if this is problematic or overkill. Conrad.Irwin23:15, 4 August 2009 (UTC)Reply
Yessir... the only characters that have non-optional accents are č, š, ž and their majuscule forms.
All of them might be overkill, I don't think I've ever seen the ones with double acute/grave used, but it's probably possible in some dialects, so... better to have it than not, I guess. — opiaterein — 23:17, 4 August 2009 (UTC)Reply
Latest comment: 15 years ago5 comments2 people in discussion
There appears to be a pretty serious bug when you want to add multiple translations at the same time, and the new translations happen to be in a row of three (say, there's a Finnish and a Slovak translation, and you want to add German, Greek and Serbian, and the midpoint is not in this group). Then the following two things can happen when trying to add the third translation:
1. The third translation would end up in-between the first two. In this case you simply get an error.
2. The third translation would end up at the beginning or at the end of the group. In this case the translation will be shown correctly in the table, but it will not be saved when you click Save.
I tried adding Swahili Swedish and Tajik to WT:SAND in a few orders, and I got no error message, and it saved correctly. Can you be more specific with where you found problems? Conrad.Irwin23:37, 23 August 2009 (UTC)Reply
Indeed it doesn't work with that combination. Try the following combination for the first bug (where it breaks with an error): kum, lez, lbe (in that order). This always seems to work for me. (Also, try adding lez first and then all the others, which seems to not work at all for me either) -- Prince Kassad03:54, 24 August 2009 (UTC)Reply
Latest comment: 15 years ago2 comments2 people in discussion
Adding the trreqs doesn't work if the language is one of the ones that can have stripped accents and stuff. LT, SL, HE... etc. The error given is the "don't use wiki markup" one. Enjoy :) — opiaterein — 20:05, 2 September 2009 (UTC)Reply
Latest comment: 15 years ago3 comments3 people in discussion
The editor's stopped working for me. I've cleared my cache, I've cleared all my temporary files and cookies, I've purged, and I still can't get it to appear. It works on Safari but not on IE8. —Internoob (Talk•Cont.) 17:42, 5 September 2009 (UTC)Reply
Maybe I'm having this same problem. The error I'm getting is "Could not find translation entry for 'ca:parkour'. Please reformat". It worked immediately before, on this edit, but stopped after that. — opiaterein — 22:19, 5 September 2009 (UTC)Reply
Your problems are now sloved if you clear your cache (ctrl+shift+F5). (Internoob: I forgot to test in Internet Explorer recently, and as a result was using osome techniques that fail to work there). (Opiaterein: When it detects there is a trreq in the HTML it looks for the trreq in the wikitext, but on parkour the trreq was nested under the heading and so it tried to look for {{trreq |Chinese}}, which of course does not exist in the wikitext). Conrad.Irwin23:45, 6 September 2009 (UTC)Reply
closing the page editing box
Latest comment: 15 years ago3 comments2 people in discussion
The editor does not allow any more translations to be added after the X in the small box that appears in the top-left corner is clicked until the page is reloaded. Could you fix this please? BTW, the editor works in chrome 3. --Yair rand05:35, 21 September 2009 (UTC)Reply
Latest comment: 15 years ago2 comments2 people in discussion
If I request a translation with {{trreq}} then accidentally close the "presence" window without committing my change, then once more attempt to request a translation for the same language I get an error telling me I can't request a translation twice for the same language. — hippietrail04:33, 5 October 2009 (UTC)Reply
Latest comment: 15 years ago2 comments2 people in discussion
I just used this tool for the first time, and stumbled over the lack of a link to help for the gender checkboxes. A precisely targetted page would be great, but failing that it would be at least useful to link to Wikipedia:Grammatical gender. (I was adding a Dutch translation, but needed to look up what "common gender" meant before I could be sure that "neuter" was really what I wanted.) Hv11:55, 30 October 2009 (UTC)Reply
Hi, I've added a sentence to the instructions above (which you can get to by clicking the "Add Translation" link on every page). I don't know enough about it to make any authoritative assertions - perhaps someone could create Appendix:Gender or similar (though perhaps the definitions on common and neuter are good enough?). Conrad.Irwin13:27, 30 October 2009 (UTC)Reply
Great, IMO
Latest comment: 15 years ago2 comments2 people in discussion
Hello. Your tool is just great. It helps a lot. I wish we could have this on the French Wiktionnaire (we want it, but we would probably have to adapt the code to our syntax, and nobody has done that - I for example don’t know much about javascript, even less about AJAX and interaction with Mediawiki…). Keep developping such magical things ! --Eiku (t) 22:49, 5 November 2009 (UTC)Reply
Hi, I think two other users so far have shown interest in porting it to fr.wikt - I `think` you'd be able to get away with just changing a bit of code in the "Util" object, and a lot of code in the TranslationAdders block - but I don't have the time to fully support this on any other Wiktionaries myself (I believe it's being used on lithuanian wiktionary, but they forked the code much earlier, when the code was arguably easier to understand and contained less very en.wikt specific features, and I think their template syntax is closer to ours than yours is). I'm very happy to lend a hand to anyone who wants to port it, I'm often to be found in #wiktionary on freenode, or this talk page, or by email. Conrad.Irwin00:08, 6 November 2009 (UTC)Reply
t-balance gone??
Latest comment: 15 years ago4 comments3 people in discussion
Yes, there were several instances where people would just click the arrows for no benefit - if you want to use them without adding a translation, then add a translation and click undo, the buttons will still be available. Conrad.Irwin12:00, 17 November 2009 (UTC)Reply
Latest comment: 15 years ago2 comments2 people in discussion
There seems to be a small bug with the new table labelling feature. Whenever I click on the "±" icon, it brings me straight to the top of the page. --Yair rand04:09, 17 November 2009 (UTC)Reply
Latest comment: 15 years ago1 comment1 person in discussion
When the table top contains a vertical bar without gloss such as {trans-top|}, clicking the +/- sign opens the field in the gray bar but the field is not blank, it contains the first translation. This situation is immediately visible on the web page because the gray translation bar contains only the +/- sign but does not contain the word "Translations". --Panda1022:46, 22 November 2009 (UTC)Reply
Old/Middle French
Latest comment: 14 years ago2 comments2 people in discussion
It cannot be fixed, {{trans-see}} is a better way of dealing with this. One or the other should be converted to an {{alternative spelling of}} entry. (And in a perfect world, we should consistently chose one form of English for all words in this category). Conrad.Irwin11:15, 4 March 2010 (UTC)Reply
legal/policy issues
Latest comment: 14 years ago3 comments3 people in discussion
Is there a legal problem with this in that it doesn't tell people that their edits are licensed? (In particular, are, in fact, their edits therefore not licensed?)
Also, it doesn't warn anonymous people that their IP addresses are going to be publicized. While this is probably not illegal, I wonder whether it's against WMF policy, considering that edit pages always so warn.—msh210℠18:20, 19 March 2010 (UTC)Reply
The terms of use are linked to at the bottom of every page, and it clearly explains the licensing stuff, so it's probably not a problem. --Yair rand02:30, 26 March 2010 (UTC)Reply
#wikimedia on freenode, 21 Apr 2010 (times are off by several minutes from U.S. CDT):
<msh210> Hi, all. Is there a WMF-wide policy for its projects that they warn an anon that his edit will reveal his IP address?
<killiondude> Not that I've heard of.
<bastique> It's in the MediaWiki software messages.
<msh210> bastique, well, yes, except that enwikt has a JS-based way of editing pages that bypasses the action=edit page.
<bastique> well, they should probably adjust that.
<msh210> No, the point is that it makes it easy for peopel to edit. That is, the whole point is to bypass the edit page.
<bastique> No, there's no policy. It's good practice.
== derp has changed nick to derp|brb
<msh210> Oh, okay, thanks.
<msh210> May I please copy-paste this conversation to enwikt, Cary, Killiondude?
<bastique> only if you change my name
<bastique> to...
<killiondude> I don't mind.
<bastique> Guest183832
<msh210> Meaning, I can't quote you by name? That sorta defeats the purpose... :-/ (I.e., I trust what you say largely because of who you are.)
<msh210> thx killiondude
<bastique> :) Of course you can quote me
* msh210 confused
<killiondude> bastique likes to joke. :-p
<msh210> ah, ok. got it.
<bastique> :-ð
If you think it is necessary, I am happy for this to display a notice if you can show me how it should look - probably best to show it on the save dialog, there's nothing trackable at the "preview" stage, and that way all kinds of edit get the warning. Conrad.Irwin22:57, 21 April 2010 (UTC)Reply
Anglo-Norman
Latest comment: 14 years ago4 comments2 people in discussion
It's a bug I thought I fixed a few months ago... Thanks for sharing. (I'll see whether I have permissions to edit the meta-data stuff for anglo-norman). Conrad.Irwin17:33, 27 April 2010 (UTC)Reply
Language code 'nb' needs a fix
Latest comment: 14 years ago2 comments2 people in discussion
When adding translations for Norwegian Bokmål, the interwiki code used is 'nb'. There is no 'nb' dictionary, however, so the code 'no' should be used with the 't' template in stead, which is a dictionary for both Norwegian Bokmål and Norwegian Nynorsk. --Harald KhanՃ17:01, 28 April 2010 (UTC)Reply
Done. The problem was that it misread the Mandarin translation as having a language code of "zh-Hani", I've now fixed it. (And the Chinese under Chinese problem you noticed before). Thanks. (you may need to clear your cache (ctrl+shift+F5)) Conrad.Irwin09:55, 8 June 2010 (UTC)Reply
Latest comment: 14 years ago1 comment1 person in discussion
Added 3 translations for Arabic, which had trreq and a nested Egyptian Arabic trreq underneath. Pretty neat, what happened Enjoy :) — opiaterein — 13:07, 8 June 2010 (UTC)Reply
multiple nested translations bug
Latest comment: 14 years ago7 comments2 people in discussion
Hi Conrad,
I noticed a bug (happened several times to me). When I add more than one translation using nesting (Serbo-Croatian/Cyrillic, Serbo-Croatian/Roman), the 2nd translation doesn't nest any more (the feminine forms appeared on the same line as "Serbo-Croatian"). The preview looked allright, though, which was confusing (you need to refresh to see the problem). Here's an example edit: I'm a Muslim into sh, which I fixed later. --Anatoli05:14, 17 June 2010 (UTC)Reply
I tried to replicate the behaviour but the preview didn't show nesting and only one translation was nested, see above. --Anatoli05:21, 17 June 2010 (UTC)Reply
I've fixed part of the problem - I'll see if I can still get it to misbehave now. Would it be useful to guess /Cyrillic or /Roman (you can miss out the language name to save time) based on whether the text contains a letter A-Š or А-Ш ? Conrad.Irwin16:32, 17 June 2010 (UTC)Reply
Thanks for addressing this problem. I haven't tested but it sounds good what you suggest (both suggestions). Please include lower and upper case letters. --Anatoli07:38, 19 June 2010 (UTC)Reply
It looks betters but works well if I finish Cyrillic, then move to Roman - back and forth is not very good:
Perhaps this could be a sample for Serbo-Croatian translations, which covers both scripts and both major dialects:
translations of president into sh:
I have some experimental code for 1., it needs work before it is stable enough to use on Wiktionary. 2. is an advanced feature, maybe better to define a keyboard shortcut for the save button. 3. Not much point, it's deliberately out-of-the-way. 4. Hadn't thought of that, good idea. 5. Yes — I keep meaning to do that, is it safe to remove them from everything except Nouns and Adjectives?. 6. Most of the code is extractable, but it will never work as a drop-in replacement for anything - it has loads of English Wiktionary specific stuff. See User:Conrad.Irwin/editor_docs for how to adapt this to other wiki's - please feel free to publicise that page. And encourage anyone who is interested to get in touch. Conrad.Irwin23:41, 23 September 2010 (UTC)Reply
Latest comment: 14 years ago7 comments3 people in discussion
(The code of the editor is incomprehensible to me, so I figure I should just ask here...) Is there any way to attach functions to be called after "Save Changes" is clicked, or any way to have it modify pages other than the page that the user is currently on? --Yair rand (talk) 19:39, 7 October 2010 (UTC)Reply
Do you mean that editor.js should modify (I think firstly create) the added translation page? To add some characters (like for the category system), or to get and modify another page (in JavaScript or like Commonhelper)? JackPotte00:13, 8 October 2010 (UTC)Reply
At the moment, no, such a callback would be easy to add — why do you want it? If you want to modify other pages just use JsMwApi directly — the complexity of the editor stuff comes from trying very hard to maintain consistency between the DOM and the wikitext. (See: User_talk:Conrad.Irwin/Api.js#.edit()) Conrad.Irwin10:12, 8 October 2010 (UTC)Reply
For a rhymes editor or an etymology editor one would need to have the DOM consistent with the newly changed wikitext of the page being viewed at the same time as having another page (the entry for the rhyme while at the rhymes list or vice-versa, or the descendants/derived terms section of the entry for the word being added to an etymology) modified at the time of saving. A callback at the save could have a function using JsMwApi to modify the other page, while making sure the page isn't modified if the user doesn't end up clicking save. --Yair rand (talk) 20:14, 8 October 2010 (UTC)Reply
You should now be able to have an after_save: parameter on the edit object you pass into addEdit. let me know how you get on. 22:29, 19 October 2010 (UTC)
There appears to be a typo in the code: "thiz.withCurrentText(cleaup_callbacks);". (I'd rather not fix it myself as I don't have a clue how the script works or what fixing this will do...) --Yair rand (talk) 00:27, 26 October 2010 (UTC)Reply
I've fixed the typo, thanks for taking the time to debug it. Please go ahead and make changes in future — assuming you are watching this talk page you get to know quickly enough when things break :). Conrad.Irwin13:27, 26 October 2010 (UTC)Reply
new bug?
Latest comment: 14 years ago3 comments2 people in discussion
Latest comment: 14 years ago3 comments2 people in discussion
Might just be me, I'm on Firefox 3.5.2, but nothing at all is happening when I hit 'save'. I've tried it on several entries, but nothing works. — opiaterein — 13:45, 20 June 2010 (UTC)Reply
Newly noticed development - After I add one translation (which displays in the little dotted green box) no subsequent translations added will be displayed. — opiaterein — 15:18, 20 June 2010 (UTC)Reply
Latest comment: 14 years ago2 comments2 people in discussion
It should be possible to remove existing translations in some way. When you have entries that are not nested, but should be; and you also want to add new translations, you have to edit manually. --Harald KhanՃ17:00, 21 June 2010 (UTC)Reply
Latest comment: 13 years ago5 comments3 people in discussion
I see in recentchanges a bunch of translations added using this script which start with a capital letter even though, it seems (not that I know the languages in question, usually), they should not. Is there a way for the script to test for this and either issue a warning to the editor or tag the translation (with some to-be-devised tag specific for this purpose or with {{ttbc}})? I'm thinking specifically of a test for: Is the word a proper noun or capitalized in English, or both a translation into German and a noun? (Any languages besides German capitalize all nouns, or any other part of speech?)—msh210℠ (talk) 17:55, 15 February 2011 (UTC)Reply
Ok. So "iff the page title starts with a lowercase letter, and the language is not german, and the translation starts with an uppercase letter" warn the user. It's hard to tell which part of speech is currently being edited (though I want to add that at some point so I can hide the genders and numbers). This is obviously not a very precise check, but I think it covers the majority of cases, albeit slightly conservatively. Conrad.Irwin08:40, 2 April 2011 (UTC)Reply
To Msh210 (Any languages besides German capitalize all nouns, or any other part of speech?) - no, only German (and Luxembourgish). Worth noting that capitalisation rules from language to language, like pronouns can be capitalised in a polite writing, etc. Conrad, I see have you covered Cyrillic based languages, Greek and Armenian as well. Thanks for that! Sometimes words are obviously copied from Wikipedia where articles titles are capitalised. --Anatoli11:44, 2 April 2011 (UTC)Reply
Thanks. I've added lb to the list of languages exempt from the check. As it's possible to override the warning (though maybe scary) I hope people will still be able to add pronouns correctly. Conrad.Irwin19:27, 2 April 2011 (UTC)Reply
Accelerated adding of usage examples
Latest comment: 13 years ago2 comments1 person in discussion
What do think about employing the {{usex}} template for adding of usage examples? Using a template to tag and standardize syntactic elements of the data-base might IMHO greatly help future bot-operated maintenance of the project. Matthias Buchmeier12:04, 1 April 2011 (UTC)Reply
Latest comment: 13 years ago2 comments2 people in discussion
I am unable to add Norwegian translations to the second meaning of sniper. Get the error message Could not find translation entry for 'nn:asdasd'. Please reformat. The other meanings give no such error. Njardarlogar12:49, 9 April 2011 (UTC)Reply
When playing around, I seem to be able to replicate the error consistently when the languages already in the list are *not* in alphabetical order, and I try to add a new language. Editing the entry and rearranging the translations seem to make the error go away. \Mike01:59, 18 June 2011 (UTC)Reply
Red outline for AdderWrapper errors?
Latest comment: 13 years ago1 comment1 person in discussion
Language names support for all languages, autocompleting language
Latest comment: 13 years ago1 comment1 person in discussion
Inputting language names instead of ISO codes is only supported for languages in ISO 639-1, but I think it would be helpful to allow users to give just the language name for all languages, making use of the {{langrev}} subtemplates. Having the form autocomplete the language names would probably also be helpful, so what do you think of adding this above the bit above where langInput.onchange is set:
var langNameToCode={}
function langAutoFill(e){
e = (e || event).keyCode;if((e >= 33 && e <= 40) || e == 8 || e == 46 || e == 27 || e == 16){
return;
}
var t = this, v = t.value;
if(v.substr(0,1) != v.substr(0,1).toUpperCase()){
return;
}
JsMwApi()({action:'query',generator:'allpages',gapnamespace:10,gapprefix:'langrev/'+v,gaplimit:3,prop:'revisions',rvprop:'content'},function(r){
if(r.query && r.query.pages && t.value == v){
var l={}, ll={}
for(var i in r.query.pages){
var rqp = r.query.pages;ll = rqp.title < ll.title?ll:rqp;l = rqp.title > l.title?l:rqp;
}
if(!r && ll.title.indexOf(l.title) == 0){
langNameToCode=l.revisions;
if(l.title != "Template:langrev/"+v){
if (t.setSelectionRange){
t.setSelectionRange(, t.value.length);
} else if (t.createTextRange) {
var z = t.createTextRange();
z.moveEnd('character', 0 - z.move('character', ) + t.value.length);
z.select()
}
}
}
}
})
}
langInput.onkeyup = langAutoFill;
The problem was that Old French doesn't have an ISO 639-1 code, so the script couldn't just grab the language code from the list of codes built in to editor.js. I've changed the script so that it pulls the language code out of the {{langrev}} subtemplates when the language doesn't have an easily available code. --Yair rand20:32, 8 September 2011 (UTC)Reply
trreq problem
Latest comment: 12 years ago1 comment1 person in discussion
It seems the sorting mechanism bugs out when it would sort a language right before a {{trreq}}, and will refuse to add the translation. Cf. machete, where I had to remove the Latvian trreq before I could add the translation. -- Liliana•16:24, 23 December 2011 (UTC)Reply
Latest comment: 12 years ago1 comment1 person in discussion
I thought the editor barred stuff with parentheses and whatnot? I see too many of these with qualifiers in the damned page names. — — 01:06, 16 January 2012 (UTC)Reply
Problem when adding Cyrillic and Latin variants of sh terms
Latest comment: 12 years ago1 comment1 person in discussion
Latest comment: 12 years ago2 comments1 person in discussion
Hi Conrad, I have noticed that the recent behavior of accelerated translations is not to add spaces between the , and the {{t}}-template anymore, when new translation are appended. Is this change intentional? Matthias Buchmeier (talk) 16:52, 14 March 2012 (UTC)Reply
Latest comment: 12 years ago1 comment1 person in discussion
The tooltip for the "Page name" input box is "The word with all of the dictionary-only diacritics". Isn't that box supposed to be the translation with all of the diacritics and such removed? --Yair rand (talk) 11:48, 4 September 2012 (UTC)Reply
Macedonian
Latest comment: 12 years ago3 comments2 people in discussion
Latest comment: 11 years ago1 comment1 person in discussion
Hello. I'm trying to adapt this great script to Catalan Wiktionary and I've come up with a possible useless code that could bring a bug in future:
for (var i=0; i < cb.length; i++)
{
thiz.elements].checked = values];
}
As I'm using 1 less input fields than checkbox fields, I've found a undefined error when looping last check field (I think that values] never has any meaningful content for thiz.elements].checked). Do you think those 4 lines can be deleted? -Aleator (talk) 00:18, 11 January 2013 (UTC)Reply
Latest comment: 11 years ago2 comments2 people in discussion
In the http://nds.wiktionary.org we want also to have, that the users can input a translation without using the edit- (ännern-) button, like it is in the englisch Wiktionary possible. I have copy all translate templates, but it does not run. I think, it has something to do with the editor.js, that I could not found in the English wiktionary. Can you help me please?
I have renamed the templates: Översetten-Start (trans-top), Ö-Afstand (trans-mid), Översetten-Enn (trans-bottom) and Ö... (t...), but the changes are only translations of the name of templates, categories etc., but not in the codes itself. Can you please give me your answer on my userdiscussion page in the nds.wiktionary (: --Joachim Mos (talk) 14:00, 23 March 2013 (UTC)Reply
I've made the change, but will explicitly note that I do not intend it to prejudice any decision by the community to combine the Norwegian lects at some later time back into no. - -sche(discuss)01:36, 30 May 2013 (UTC)Reply
Minor edits?
Latest comment: 11 years ago2 comments2 people in discussion
I noticed that when I use the editor, my changes are marked as minor edits. That is probably because I have it set to default to minor in my preferences. But I don't think it's very desirable, adding a translation should always count as a major edit. Could this be changed? —CodeCat23:18, 12 May 2013 (UTC)Reply
Latest comment: 11 years ago6 comments3 people in discussion
I noticed that the editor adds {{trreq}} with the language name instead of the language code. While both are officially valid, language codes are normally preferred. Can this be changed? —CodeCat14:26, 23 May 2013 (UTC)Reply
I've been irked by this a few times lately too. Often when I'm requesting translations I get an error message that it can't find the entry but it's very random and when I edit manually and find the mix of codes and language names for other trreq's I wonder if that's the cause. I wish I could read this callback spaghetti magic code and I would fix it myself (-; — hippietrail (talk) 05:30, 24 May 2013 (UTC)Reply
Hopefully the autosorting bot won't muck it up again and won't sort by the code, rather than by the name (lower case language code names appearing at the end of the table, obviously "fa" precedes "he", etc.). I think that was the reason why the code was changed for the name. --Anatoli(обсудить/вклад)05:38, 24 May 2013 (UTC)Reply
I've reported a bug a long time ago. The problem exists with adding a translation where a neighboring language (alphabetically) has {{trreq}}, e.g. adding Macedonian (mk) when there is a Malayalam {{trreq}} (ml). I had to edit manually in such a case. --Anatoli(обсудить/вклад)05:41, 24 May 2013 (UTC)Reply
Latest comment: 11 years ago5 comments3 people in discussion
Can we give warnings to contributors using a wrong script (like Hindi in Roman letters, etc.), similar to the way when translations are capitalised (exception: German, Luxembourgian and proper nouns)? --Anatoli(обсудить/вклад)00:56, 3 June 2013 (UTC)Reply
This is a great idea. It will be handy for the quite common mixing of Cyrillic and Latin letters in exotic languages such as Avar, Chechen, and Ossetian. The first two often have I, l, or 1 for the palochka and the latter often has the Latin æ for the Cyrillic letter of identical appearance. I believe some Latin letters are used amongst Cyrillic for a few Bosnian or Montenegrin words too. — hippietrail (talk) 07:05, 3 June 2013 (UTC)Reply
It's just a feature request. Not sure about the implementation. We need a working script detection modules/template and language-specific rules. As Hippietrail suggested, the script could probably suggest to use "better" letters when some letters don't seem appropriate for a given language like it suggests to replace language code "no" for "nb" or "nn". --Anatoli(обсудить/вклад)13:23, 3 June 2013 (UTC)Reply
I've written code to do this before in JavaScript though I've sadly lost it. First you need to split up the term into characters, being sure not to break surrogate pairs in two. Then you need an array with the start and end of each run of the same script for the entirety of Unicode. It sounds big but it's really not. Then to find the script for a character you do a binary search on this array. Binary search is very easy to program and very very fast. To create the array you need to process the Scripts.txt file provided on the Unicode site.
There are two script types that should be ignored, "Common" and "Inherited" though possibly you might be able to use even those when there are no other scripts in the term - this would indicate the term is not a word but some kind of symbol.
editor.js already includes a mapping of scripts to languages so given the language of the term and the scripts valid for it (sometimes more than one) you can find any mismatch. As a bonus it's also trivial to find any term using more than one script. I once had some Perl code that found all such terms in the dump file and I used to put them in a category.
It can be done, but I think the way genders are specified might need some more thorough changes. It doesn't really make sense to use checkboxes because what you really want is to select individual genders, not any random combination of genders, numbers, imperfectivity and so on. So a radio button or a dropdown box would probably be better so that it's clear that the options are mutually exclusive. —CodeCat01:01, 25 June 2013 (UTC)Reply
Well, one can mess up genders as well or put a wrong gender or two many genders, add gender to genderless languages or PoS's using the tool. One can add transliteration where it's not needed or write a translation in a wrong script. That's why we check and correct other people's translations. Or will it cause an error to a module, if there are errors? By putting impf/pf on a separate line with a short note (or better to wikilink to perfective/imperfective description) would probably notify the user that this is for verbs in some languages only. Adding validations is important but there are many more possible invalid possibilities the tool doesn't check for. (BTW, my edit toolbar has disappeared, signing manually). --Anatoli(обсудить/вклад)01:27, 25 June 2013 (UTC)Reply
Of course, but that doesn't mean it isn't useful for the user interface to be logical. Using checkboxes when there is really only a limited number of sensible possibilities isn't good practice. What I would suggest is to have text boxes to enter the gender in "advanced" mode, but dropdown boxes or radio buttons that show only the genders that are valid for the language in "simple" mode. —CodeCat01:31, 25 June 2013 (UTC)Reply
If you could make it happen, it would be great. Script validation and warnings (a topic above) would be another great enhancement to this tool, admittedly harder. --Anatoli(обсудить/вклад)02:06, 25 June 2013 (UTC)Reply
Can these options be added, if there are no objections? E.g. Verb aspect (Slavic and Georgian verbs). imperfective (tick) perfective (tick). (According to Dixtosa (talk • contribs)'s categorisation, Georgian verbs also have this distinction, I'm not sure myself.) --Anatoli(обсудить/вклад)00:08, 25 October 2013 (UTC)Reply
A while ago I tried to make some changes to the way genders are specified, but I ended up breaking the script a few times before I got it sort-of right. I'd rather avoid doing that again. I think Ruakh is a bit more comfortable editing it, but I think we also need to look at better ways to specify the genders. Radio buttons and checkboxes are inconvenient when a huge number of genders is involved, like say for Slovene (where there are over 10 possibilities). Maybe we should switch to using dropdown boxes? —CodeCat00:13, 25 October 2013 (UTC)Reply
For me it's better than nothing but I prefer tickboxes, whatever is agreeable - better than having to add manually, especially if I want to add multiple translations into Slavic languages with both aspects. There are more/less buttons, so it shouldn't be a problem for those who hate too many options. Do the current options cover all Slovene possibilities? (Animate/inanimate are not really genders). BTW, what are Noun class:/ Plural class: options? --Anatoli(обсудить/вклад)00:26, 25 October 2013 (UTC)Reply
The noun class is for languages that have numbered or named "genders" like the Bantu languages. Animacy isn't a gender, but it's specified as part of one and triggers agreement the same way, so I do think we should include it among the translations. —CodeCat00:32, 25 October 2013 (UTC)Reply
As a design suggestion, we could use expandable sections, which could be hidden if not required. Like hiding verb aspects for non-Slavic translations and by default. No idea how hard it is.
With animacy, all Slavic gender possibilities would be big, not only Slovene. I'm neutral on adding this option to translations but I suspect there could be strong objections from others. Simply animate/inanimate tickboxes would allow multiple combinations, though. --Anatoli(обсудить/вклад)00:43, 25 October 2013 (UTC)Reply
A tickbox wouldn't always work right. In Slovene, for example, only masculine nouns have animacy, so ticking it for a feminine or neuter noun wouldn't make sense. A dropdown box could just list all possibilities as mutually exclusive: m-an, m-in, f, n, m-d, f-d, n-d, m-p, f-p, n-p, pf, impf. —CodeCat00:50, 25 October 2013 (UTC)Reply
Marking of Esperanto verbs as transitive or intransitive or both
Latest comment: 11 years ago2 comments2 people in discussion
All verbs in Esperanto should be marked as either transitive (tr) or intransitive (ntr) or both (ussualy marked with "X"). Could you add the possibility of specifying this to the script?
Also, if the user is unable to provide with such a marking this should be considered an error in my view and followed up accordingly.--Liberumia (talk) 07:34, 23 August 2013 (UTC)Reply
When this script asked the MediaWiki API to parse {{#invoke:links|remove_diacritics|лесовик|ru}} {{#invoke:links|remove_diacritics|лесови́к|ru}}, it got back a script error (because Module:links no longer has a remove_diacritics function; see this edit). So this script couldn't verify that лесовик and лесови́к were equivalent, so it erred in the direction of assuming they're different (since that's the safer assumption). —RuakhTALK07:17, 12 January 2014 (UTC)Reply
I've reverted the above-linked edit for now, though we probably don't want to keep that function there permanently if this is the only thing using it. —RuakhTALK07:24, 12 January 2014 (UTC)Reply
I've put a note in Module:links that this script is using it so it won't be removed. Could someone make an inventory of all the module functions and templates that our scripts use, and add notes to each of them? Scripts don't create transclusions, so there's no way to find out when they use something. —CodeCat14:00, 12 January 2014 (UTC)Reply
Performance with some languages
Latest comment: 10 years ago1 comment1 person in discussion
Latest comment: 10 years ago1 comment1 person in discussion
I can't add translations into Old East Slavic (orv). Is anything wrong with orv:{g:,sc:"Cyrl"},? It's identical to other languages with the same structure, e.g. Rusyn (rue). --Anatoli(обсудить/вклад)01:13, 18 March 2014 (UTC)Reply
Missing space
Latest comment: 10 years ago1 comment1 person in discussion
A very minor complaint, but "(e.g. Cyrl for Cyrillic, Latn for Latin)" should be " (e.g. Cyrl for Cyrillic, Latn for Latin)" like the other examples. Otherwise it gets squished up against the text input. Kaldari (talk) 07:49, 14 June 2014 (UTC)Reply
Wrong order Icelandic/Catalan
Latest comment: 10 years ago3 comments2 people in discussion
Everything else works? Also, have you got the "Enable legacy global scripts on by default, disable at your own risk" gadget enabled? — Keφr18:46, 30 July 2014 (UTC)Reply
Yes, I have that gadget enabled. Orange links and green links are working. Targeted translations and this tool are not working. Sometimes, when I refresh a page, they appear. Here is the JavaScript Console for when they worked and this is for when they didn't. --Vahag (talk) 19:24, 30 July 2014 (UTC)Reply
I think I know the nature the error, but its location reported in your screenshot does not make sense. Try again now. — Keφr19:40, 30 July 2014 (UTC)Reply
Some platforms (iOS) automatically capitalize text-field entry. So if I enter “uk” it turns to “Uk”, and the script returns a not-too-helpful, and technically inaccurate, “invalid language code” error message. This could confuse users, and requires extra steps. It would be better if the script automatically neutered all caps in the entry. Thanks. —MichaelZ. 2014-06-30 15:01 z
ERROR:TypeError: undefined is not a function
Latest comment: 10 years ago2 comments2 people in discussion
I tried to add a translation to board up. I used 'nl' as language code and 'dichttimmeren' as translation. I pressed the 'preview translation' button. I saw briefly a green dialog in the top left corner that changed to blue with the error message 'ERROR:TypeError: undefined is not a function'. Difool (talk) 21:49, 8 October 2014 (UTC)Reply
Feature request: Add a warning akin to "You are editing while not logged in. Are you sure?"
Latest comment: 10 years ago1 comment1 person in discussion
Because I accidentally contributed a translation while I was not logged in and now that edit will forever belong to an IP instead of me. If I manually edited the page I'd have seen this reminder at the top of the page: You are not logged in. If you save your edits to this page, your IP address will be recorded in the page's history. For that and other reasons, you should create an account. But as I was using the Add translation tool, I saw no such warning. (Also; After I logged in, the Add translation tool disappeared from the page. It only returned just now, after what must have been more than a couple refreshes.) 3ICE (talk) 09:22, 8 November 2014 (UTC)Reply
Malay (ms) need to install this feature
Latest comment: 9 years ago1 comment1 person in discussion
Latest comment: 9 years ago4 comments3 people in discussion
Can we disable the automatic addition of the sc= template, as in this? They are not needed anymore. User:Benwing removed all redundant sc=Armn, sc=Geor, sc=polytonic's, but they are being readded by this tool. --Vahag (talk) 11:50, 20 July 2015 (UTC)Reply
I can't edit this file, but you can remove the addition of sc= for particular languages by editing the metadata starting on line 2213 and e.g. removing sc:"Grek" from el, sc:"Armn" from hy, sc:"Arab" from ar, etc. Looks like this was already done by User:ObsequiousNewt for sc=polytonic. Alternatively, if you think it's safe to never add sc= for any language, remove the code (values.sc ? '|sc=' + values.sc : '') + from line 1548. Benwing (talk) 11:15, 21 July 2015 (UTC)Reply
Thanks. I am almost sure it is safe to never add sc= for any language, but I will let more technically-experienced users decide that. PS You should be able to edit protected pages. @Atitarev, please nominate Benwing for adminship, if he agrees. I would do it myself, but my brand is toxic :) --Vahag (talk) 14:21, 21 July 2015 (UTC)Reply
Could not find translation table for ' '. Glosses should be unique
Latest comment: 8 years ago1 comment1 person in discussion
Hi, is it possible to use this gadget on other wikis? I try to use this in hywiktionary but it always says "Could not find translation table for 'es:hola'. Glosses should be unique". Please help us --ԱշոտՏՆՂ (talk) 11:53, 8 December 2015 (UTC)Reply
\
Rhyme editor bug
Latest comment: 8 years ago1 comment1 person in discussion
Hello. I found a small bug with the rhyme editor: when adding multiple rhymes and some of them fail, the failed rhymes will still be listed in the edit summary. Example edit: diff. Redboywild (talk) 17:09, 27 February 2016 (UTC)Reply
Feature request for rhyme editor
Latest comment: 8 years ago3 comments2 people in discussion
I would like to make the rhyme editor use {{l}} instead of plain wikilinks. I have already been using {{l}} in Icelandic rhyme pages (e.g. Rhymes:Icelandic/œht) for a long time, and the current rhyme editor will not order new words on these pages correctly. This will mean that {{l}} would be standard in rhyme pages, at least for languages other than English; I suppose we'll have to discuss whether we want it on English rhyme pages as well. – Krun (talk) 12:13, 14 March 2016 (UTC)Reply
Consistency is pretty important here. If there's going to be a switchover from plain links to {{l}}, a bot should fix all the pages in the namespace before the script is modified, in my opinion. --Yair rand (talk) 22:04, 14 March 2016 (UTC)Reply
Latest comment: 8 years ago2 comments2 people in discussion
Hi,
Your translation editor has a bug: every time a user types "hr" into the language field, your software changes it to "sh". The languages may be similar in a lot of respects, but are essentially different. Please see that you correct that. Thanks! Ivi104 (talk) 13:38, 16 July 2016 (UTC)Reply
Bug when adding a translation after editing table header
Latest comment: 7 years ago1 comment1 person in discussion
Hello, in case someone is able to struggle with this script, I noticed that, if you try to add a translation after editing a table header, it will raise an error (ERROR:TypeError: children.className is undefined). You can test in the sandbox. — Automatik (talk) 00:48, 24 January 2017 (UTC)Reply
Wiki markup in the translation
Latest comment: 7 years ago2 comments2 people in discussion
Could we allow using the | character so that I can add sum-of-parts translations using inflected forms?
Latest comment: 7 years ago1 comment1 person in discussion
Hi, I'd ask some programmer to add a standard displaying of "masculine/feminine" choices after inserting the code vec (Venetian language), the same as when inserting Italian translations. It's very useful when working with this language. Thank you --Tn4196 (talk) 20:19, 26 March 2017 (UTC)Reply
This hasn't been Conrad's personal project for many years, so we should give it a name that reflects its full status on Wiktionary. I don't know what name should be used, or if there is a naming scheme for these kinds of things. I know very little of our JS infrastructure overall. But I do think this should be renamed. —CodeCat16:07, 13 April 2016 (UTC)Reply
First off, editor.js actually contains two different chunks of code: translation-related stuff and the actual Editor class. I think we should
make an opt-in gadget out of the former replacing this and
move Editor in a separate file and let it be imported always because other scripts may depend on them (I know my scripts do).
We should definitely move the codes from editor.js and User:Conrad.Irwin/creation.js and User:Conrad.Irwin/iwiki.js to their corresponding gadget pages as soon as possible because scripts that are in users' namespace load unminimized. I have tested this and minimizing editor.js alone saves us 40kb (~half of it). If my instructions above are not clear let me know. -Dixtosa (talk) 19:40, 5 November 2016 (UTC)Reply
Latest comment: 6 years ago9 comments2 people in discussion
There is a display bug in the rhyme editor that messes up the page when entering the first rhyme in an empty section (try adding a four syllable rhyme at Rhymes:English/ɒtəbəl).
I’ve also found another bug that causes new rhymes to be saved at the end of a section rather than at the correct alphabetical position, even though the entire section is apparently correctly sorted for display purposes after adding a word; i.e., when adding a word, it seems to have worked correctly, but when the page is reloaded or the code examined, one can see the incorrect ordering. – Krun (talk) 16:33, 9 November 2017 (UTC)Reply
Thanks for your help, @Yair rand. I have now, however, encountered more errors. It seems that {{rhyme list begin}}/{{rhyme list end}} are causing words to be saved after the {{rhyme list end}} line. Also, alphabetization is not working correctly. It seems that numerical character-based sorting is being done. We should ideally be using language-specific alphabetization but, failing that, defaulting to the Unicode Collation Algorithm. (I tested the gadget with words starting with accented letters). – Krun (talk) 14:13, 29 November 2017 (UTC)Reply
Latest comment: 6 years ago1 comment1 person in discussion
I adopt TranslationAdder to run on Thai Wiktionary. Everything works well except language sorting. Here's environment is just sorting by A-Z but another language needs different sorting method. Could anyone point me out how to add customized sortkey function for language names. (I suggest to have this function by default for other wiki's sake.) --Octahedron80 (talk) 07:44, 8 October 2018 (UTC)Reply
Edit conflicts
Latest comment: 6 years ago1 comment1 person in discussion
Latest comment: 5 years ago1 comment1 person in discussion
Editors adding cmn translations may find it troublesome to input tonal diacritics. If it gives "hànyǔ" by inputting "han4yu3", it will be of a great help. -- Huhu9001 (talk) 07:31, 12 February 2019 (UTC)Reply