menu
Tatoeba
language
Înregistrare Autentificare
language Română
menu
Tatoeba

chevron_right Înregistrare

chevron_right Autentificare

Navigați

chevron_right Afișați o propoziție aleatorie

chevron_right Navigați după limbă

chevron_right Navigați după liste

chevron_right Navigați după etichete

chevron_right Navigați după conținut audio

Comunitate

chevron_right Perete

chevron_right Listă cu toți membrii

chevron_right Limbi vorbite de membri

chevron_right Vorbitori nativi

search
clear
swap_horiz
search
jakov jakov 3 mai 2011 3 mai 2011, 21:20:40 UTC flag Report link Link permanent

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'}} ascundeți răspunsurile afișați răspunsurile
slomox slomox 3 mai 2011 3 mai 2011, 21:57:11 UTC flag Report link Link permanent

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'}} ascundeți răspunsurile afișați răspunsurile
jakov jakov 4 mai 2011 4 mai 2011, 08:55:20 UTC flag Report link Link permanent

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

slomox slomox 3 mai 2011 3 mai 2011, 22:09:21 UTC flag Report link Link permanent

>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'}} ascundeți răspunsurile afișați răspunsurile
jakov jakov 4 mai 2011 4 mai 2011, 09:33:30 UTC flag Report link Link permanent

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'}} ascundeți răspunsurile afișați răspunsurile
slomox slomox 4 mai 2011 4 mai 2011, 10:26:38 UTC flag Report link Link permanent

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'}} ascundeți răspunsurile afișați răspunsurile
jakov jakov 4 mai 2011 4 mai 2011, 10:35:11 UTC flag Report link Link permanent

have you tried the updated version?

{{vm.hiddenReplies[6044] ? 'expand_more' : 'expand_less'}} ascundeți răspunsurile afișați răspunsurile
slomox slomox 4 mai 2011 4 mai 2011, 10:46:27 UTC flag Report link Link permanent

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'}} ascundeți răspunsurile afișați răspunsurile
jakov jakov 4 mai 2011 4 mai 2011, 10:58:43 UTC flag Report link Link permanent

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'}} ascundeți răspunsurile afișați răspunsurile
slomox slomox 4 mai 2011 4 mai 2011, 11:26:02 UTC flag Report link Link permanent

Yes, I have.

{{vm.hiddenReplies[6047] ? 'expand_more' : 'expand_less'}} ascundeți răspunsurile afișați răspunsurile
jakov jakov 4 mai 2011 4 mai 2011, 12:46:44 UTC flag Report link Link permanent

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'}} ascundeți răspunsurile afișați răspunsurile
slomox slomox 4 mai 2011 4 mai 2011, 21:50:36 UTC flag Report link Link permanent

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'}} ascundeți răspunsurile afișați răspunsurile
jakov jakov 6 mai 2011 6 mai 2011, 18:29:44 UTC flag Report link Link permanent

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 3 mai 2011 3 mai 2011, 22:10:20 UTC flag Report link Link permanent

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

{{vm.hiddenReplies[6031] ? 'expand_more' : 'expand_less'}} ascundeți răspunsurile afișați răspunsurile
jakov jakov 4 mai 2011 4 mai 2011, 09:33:44 UTC flag Report link Link permanent

Thank you! :)