menu
Tatoeba
language
Register Log in
language English
menu
Tatoeba

chevron_right Register

chevron_right Log in

Browse

chevron_right Show random sentence

chevron_right Browse by language

chevron_right Browse by list

chevron_right Browse by tag

chevron_right Browse audio

Community

chevron_right Wall

chevron_right List of all members

chevron_right Languages of members

chevron_right Native speakers

search
clear
swap_horiz
search
jakov jakov May 3, 2011 May 3, 2011 at 9:20:40 PM UTC flag Report link Permalink

For all present and future greasemonkey-users, i've again coded a userscript:

This script is based on the idea by slomox "Tatoeba Edit Insert Links" http://userscripts.org/scripts/show/101067
he mentioned it on the tatoeba wall here: http://tatoeba.org/deu/wall/sho...3#message_5693

It adds links for easily adding special characters into the translation box, just below each translation box, just as slomox script does.

My enhancments are, that you can now choose from a dropdown list of which languages' symbols or symbol-set you need right now, because a chinese user might need other symbols than a german one etc.

Also, if you change the translation language in the dropdown from "Auto detect" to your language, this will add the respective symbol set.

As my other script also does, the script fetches the last line (or any other you specify) of your profile and adds the symbol sets of the list defined there.

You can also dynamically remove symbol sets (by clicking on the minus-symbol).

In the symbol set some symbols are listed as e.g. "x...y", meaning that clicking on "x" prepends "x" and clicking "y" appends "y" to the currently active selection respectively. If you click on the "..." link then both "x" is added before and "y" is added after the current selection.

I have also added some speacial features like "toUpperCase" or "toLowerCase" or "toTitleCase", that i guess could be of use in certain situations.

Although the script should work pretty good by now, it still lacks good sets of symbols, but as i am not native in all languages i cannot know what symbols are needed in each of them. I have for the moment copied and adapted a list of symbols from the german wikipedia symbol insert helping script, and some examples. I would need you to tell me, which ones you need and which ones not, and which ones are the proper symbols (for instance the quote-symbols are often used wrongly in some languages) or even symbol-conbinations.

I hope you enjoy using my script, waiting for feedback,

jakov

{{vm.hiddenReplies[6028] ? 'expand_more' : 'expand_less'}} hide replies show replies
slomox slomox May 3, 2011 May 3, 2011 at 9:57:11 PM UTC flag Report link Permalink

Did you forget the link? I don't see it in your post.

The script is situated here: http://userscripts.org/scripts/show/102000

I recommend switching to this script if you installed my greasemonkey script.

{{vm.hiddenReplies[6029] ? 'expand_more' : 'expand_less'}} hide replies show replies
jakov jakov May 4, 2011 May 4, 2011 at 8:55:20 AM UTC flag Report link Permalink

Oops, yes. Thank you. I irritated myself with the link to your script ;)

slomox slomox May 3, 2011 May 3, 2011 at 10:09:21 PM UTC flag Report link Permalink

>As my other script also does, the script fetches the last
>line (or any other you specify) of your profile and adds
>the symbol sets of the list defined there.

I tried that and the scripts fails if I do it. It works, if the last line does not contain a list of languages.

The error is:

Fehler: uncaught exception: [Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: jar:file:/[...]/components/greasemonkey.js :: <TOP_LEVEL> :: line 415" data: no]

{{vm.hiddenReplies[6030] ? 'expand_more' : 'expand_less'}} hide replies show replies
jakov jakov May 4, 2011 May 4, 2011 at 9:33:30 AM UTC flag Report link Permalink

Do i remember it right, that you are using chrome? Because if so, it didnt work for me either, but i forgot to test it until now :( - shame on me. But now it should work perfectly also in chrome.
About the fetching of the array: please make sure it is in the very last line *at all*, so no blank lines afterwards if you are editing your profile.

{{vm.hiddenReplies[6041] ? 'expand_more' : 'expand_less'}} hide replies show replies
slomox slomox May 4, 2011 May 4, 2011 at 10:26:38 AM UTC flag Report link Permalink

I usually use Firefox 4. I tested it on two different machines and both show the same behaviour: works well if I do not specify any languages in the last line of my profile but breaks if I do so.

I also tested it on Chrome: works well if I do not specify any languages in the last line of my profile but breaks if I do so. Even worse, I cannot edit Tatoeba at all.

{{vm.hiddenReplies[6043] ? 'expand_more' : 'expand_less'}} hide replies show replies
jakov jakov May 4, 2011 May 4, 2011 at 10:35:11 AM UTC flag Report link Permalink

have you tried the updated version?

{{vm.hiddenReplies[6044] ? 'expand_more' : 'expand_less'}} hide replies show replies
slomox slomox May 4, 2011 May 4, 2011 at 10:46:27 AM UTC flag Report link Permalink

Yes. Apparently the error does occur in a Greasemonkey file and not directly in your script. Perhaps the error is the wrong Greasemonkey version? I used version 0.9.2 and now tested the newest version 0.9.3. Doesn't work in both. Which version of Greasemonkey do you use?

{{vm.hiddenReplies[6045] ? 'expand_more' : 'expand_less'}} hide replies show replies
jakov jakov May 4, 2011 May 4, 2011 at 10:58:43 AM UTC flag Report link Permalink

Im using version 0.9.2, but i meant that i have updated the script at userscripts.org, have you downloaded it again?

{{vm.hiddenReplies[6046] ? 'expand_more' : 'expand_less'}} hide replies show replies
slomox slomox May 4, 2011 May 4, 2011 at 11:26:02 AM UTC flag Report link Permalink

Yes, I have.

{{vm.hiddenReplies[6047] ? 'expand_more' : 'expand_less'}} hide replies show replies
jakov jakov May 4, 2011 May 4, 2011 at 12:46:44 PM UTC flag Report link Permalink

Can you see the little dropdown box? Because then it would generally work, but not recognize your languages.

I have added some console logging to the script. Maybe you could tell me what is the last message you get from my script.

{{vm.hiddenReplies[6048] ? 'expand_more' : 'expand_less'}} hide replies show replies
slomox slomox May 4, 2011 May 4, 2011 at 9:50:36 PM UTC flag Report link Permalink

The script produces no visible output. No dropdown box.

The last messages when the page is loaded are:

- profile_path is http://tatoeba.org/deu/user/profile/slomox
- mylangs is now deu,epo,eng,fra
- helper()-function started


As soon as I hover the mouse over the div with the translations

- uncaught exception [..]
- addsymbols

are the next messages.

{{vm.hiddenReplies[6060] ? 'expand_more' : 'expand_less'}} hide replies show replies
jakov jakov May 6, 2011 May 6, 2011 at 6:29:44 PM UTC flag Report link Permalink

Could you try to replace this line
$('.sentences_set').live("mouseover", addsymbols);
with this one: $('.sentences_set').each(addsymbols);

I will try to find a fix for the problem as soon as possible, but http://tatoeba.org/eng/sentences/show/341725
;)

slomox slomox May 3, 2011 May 3, 2011 at 10:10:20 PM UTC flag Report link Permalink

And before I forget it: Well done! Great work!

{{vm.hiddenReplies[6031] ? 'expand_more' : 'expand_less'}} hide replies show replies
jakov jakov May 4, 2011 May 4, 2011 at 9:33:44 AM UTC flag Report link Permalink

Thank you! :)