[EXT] S3.Translator

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
csfoxyfire
Posts: 3
Joined: December 9th, 2016, 10:17 pm

Re: [EXT] S3.Google Translator

Post by csfoxyfire »

pag77 wrote:Thank you for your suggestions!
I will definitely do it after the transformation my addon for new Firefox API - WebExtensions
Wow thank you for your fast response. It's so good to know the addon will live on into the WebEx era. I've lost several other addons due to e10s but today S3 is a great news =D>
pag77
Posts: 1642
Joined: December 26th, 2013, 10:46 pm

Re: [EXT] S3.Google Translator

Post by pag77 »

this news is good, but it will not be soon.
a lot of nuances..
pintassilgo
Posts: 200
Joined: August 30th, 2013, 3:50 pm

Re: [EXT] S3.Google Translator

Post by pintassilgo »

Apparently, the icon positioning on selection depends of the cursor coordinates at the end of selection compared to the start of the selection: if the movement was up, the icon is displayed above the cursor; if down, below the cursor.

I'm having problems with this because I use Swift Selection Search, whose panel is always displayed below cursor. So when I end selection with move down, the S3GT icon is hidden by the SSS panel.

Move up, OK:
Image

Move down, hidden behind YouTube icon:
Image

Could you please provide an option to set the position of the icon without depending on the selection movement? In my case, I prefer that it always stay above the cursor.

Thanks.
pag77
Posts: 1642
Joined: December 26th, 2013, 10:46 pm

Re: [EXT] S3.Google Translator

Post by pag77 »

All styles in this file:
chrome://s3gt/skin/s3gt_tooltip.css

You need to create a text file in which will be only the differences
Example: change positions for mini-button - always in top:

Code: Select all

.s3gt_translate_tooltip[is_mini='true'] {
	margin: -30px 5px;
}
.s3gt_translate_tooltip[is_mini='true'][is_bottom="true"] {
	margin: -30px 5px;
}
After create file:

open settings in FlyWindow , Theme - Custom File - Select your file:
Image
pintassilgo
Posts: 200
Joined: August 30th, 2013, 3:50 pm

Re: [EXT] S3.Google Translator

Post by pintassilgo »

Worked, thank you. :D
Shogunreaper
Posts: 13
Joined: April 15th, 2013, 4:56 am

Re: [EXT] S3.Google Translator

Post by Shogunreaper »

i thought this was supposed to keep formatting?

it does when i translate the page through translate.google.com but not when i use this extension

heres the page i was trying to do
https://rutracker.org/forum/viewtopic.php?t=3177517

everything just gets shoved in one giant paragraph.
pag77
Posts: 1642
Joined: December 26th, 2013, 10:46 pm

Re: [EXT] S3.Google Translator

Post by pag77 »

Unfortunately sometimes google-widget does not cope.
Press "Ctrl" + "Translate full page" - for translate full page via Google Web site
Shogunreaper
Posts: 13
Joined: April 15th, 2013, 4:56 am

Re: [EXT] S3.Google Translator

Post by Shogunreaper »

kind of defeats the purpose of it then

if i have to open another page i might as well open it in chrome.
SvenGiermann
Posts: 3
Joined: August 21st, 2009, 2:59 am

Re: [EXT] S3.Google Translator

Post by SvenGiermann »

In daily work with Firefox and Thunderbird, there's a small thing that would make my life easier:

Add a second/alternative default language, which is chosen when the automatically detected language matches the default language.

I could even contribute some code for this, but didn't want to start with it, before asking you for that.
The reason is: most of the time, I translate from English to German, sometimes from other languages. But when it comes to translating German to English, I always need to switch the language manually. It would be very helpful, if the add-on would translate to English, when it detects German as the source language! :-)

Sven
pag77
Posts: 1642
Joined: December 26th, 2013, 10:46 pm

Re: [EXT] S3.Google Translator

Post by pag77 »

In the add-on is already using such an algorithm.
For you it does not work?
Automatic translation algorithm when source and target languages are the same (en->en, fr->fr, ru->ru, etc.)
  • launch a translation.
  • if both languages (source and target) are the same, the add-on checks the target one and if it is not the default translation language, it then translates to it.
  • if it is the default translation language, the add-on checks that "Language Learning" is enabled, if it is and the source language is the same as the studied one (in the settings: "replace phrase in this language"), it then translates to the studied language.
  • if it doesn't match neither point 2 nor point 3, then it is left as is: en->en, fr->fr, ru->ru, etc.
SvenGiermann
Posts: 3
Joined: August 21st, 2009, 2:59 am

Re: [EXT] S3.Google Translator

Post by SvenGiermann »

Up to now, I never used "Language learning" - but I tested to learn German or English, which did not change anything.
For convenience, I switch the languages I use for everyone to reproduce. Imagine you often read German texts, which you wish to translate to English. And sometimes you write something in German and do not remember the German word for "language"...

What I'm going to achieve is:
- select the word "language" somewhere, click "Translate marked text" and get "Sprache" (which is working)
- select the word "Sprache", click translate and get "language" (not working without switching the target languag manually)

What do I have to configure to get this working?
pag77
Posts: 1642
Joined: December 26th, 2013, 10:46 pm

Re: [EXT] S3.Google Translator

Post by pag77 »

open settings S3.Translator
1. set default language "English" in tab "Translate"
Image

2. enable Learning, set lang-from and lang-to, for disabled Learning set number of phrases = 0
Image
SvenGiermann
Posts: 3
Joined: August 21st, 2009, 2:59 am

Re: [EXT] S3.Google Translator

Post by SvenGiermann »

Oh, thank you - now it works!

In my (failing) tests, I left "Replace the phrases in this language" at "all languagues", which didn't work. But with your supplied settings, everthing works as expected!

FYI: I was pointed to another possibility to achieve this by some workaround...
At least in the floating window, you may choose to display "back translation" (or second translation) - in this section you can choose any other than the source language and mark the checkbox to save this selection. Then everything you translate will be translated to the default language AND the second language!
But I will now use the learning mode for that.
pag77
Posts: 1642
Joined: December 26th, 2013, 10:46 pm

Re: [EXT] S3.Google Translator

Post by pag77 »

I'm glad that your problem is solved :)
Please change your comment:
https://addons.mozilla.org/addon/s3goog ... ws/849768/
Orangutan100
Posts: 54
Joined: July 9th, 2015, 11:56 am

Re: [EXT] S3.Google Translator

Post by Orangutan100 »

Hi Oleksandr, would you have any update on how the webextensions port is coming along? I have tried all other translation related add-ons on AMO and I like S3GT the best. Would be great if you could give a rough time frame.

Thanks.
Post Reply