Translating addon?

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
VozFreeAccounts
Apollo supporter
Apollo supporter
Posts: 32
Joined: 2022-05-17, 16:58

Translating addon?

Unread post by VozFreeAccounts » 2022-05-17, 19:31

It's crucial! A quick search on this forum revealed why this feature is absent is because Google doesn't grant Pale Moon they API key. I understand. But there are many translation vendors out there more than just Google. What about Yandex, Microsoft or even Baidu? I have used Baidu full page translation, it's pretty good. I only need full page translation at the moment but a more advanced solution like Simple Translate on Chrome/FF is much better. Our BabbleOn addon doesn't work. It does nothing.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2046
Joined: 2012-08-19, 20:32

Re: Translating addon?

Unread post by back2themoon » 2022-05-17, 19:37

VozFreeAccounts wrote:
2022-05-17, 19:31
I only need full page translation at the moment...
viewtopic.php?t=27044#p217077

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2046
Joined: 2012-08-19, 20:32

Re: Translating addon?

Unread post by back2themoon » 2022-05-17, 19:53

Regarding partial text selection & translation, a workaround would be to simply install Google Translate as a search engine.

Then, you could use various extensions which use text selection to perform various actions. I just tested the excellent Selected Search (old Firefox extension, v.0.4.160328) and it does that just fine.

You select the text and a pop-up appears. You then press the Google Translate icon, and it'll take you there with the selected text translated automatically. Other extensions use the right-click method.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 32157
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Translating addon?

Unread post by Moonchild » 2022-05-18, 00:30

You don't need an extension to search selected text. Pale Moon has a right-click menu entry on selections to send it to your active search engine.
Image1.png
"You will observe with concern how long a useful truth may be known and exist before it is generally received and practiced on." -- Benjamin Franklin
"Compromise and collaboration lie at the heart of all great endeavours" -- Kassandra
Image

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 502
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: Translating addon?

Unread post by RealityRipple » 2022-05-18, 01:48

BabbleOn requires you to set your browser's locale preference in the "intl.accept_languages" about:config option, and the address bar icon requires the page's <html> tag to have a lang attribute set which doesn't match any of the items in your "intl.accept_languages" list. The latest version has a context menu to translate pages even if the icon in the address bar doesn't show up.

User avatar
VozFreeAccounts
Apollo supporter
Apollo supporter
Posts: 32
Joined: 2022-05-17, 16:58

Re: Translating addon?

Unread post by VozFreeAccounts » 2022-05-18, 07:53

RealityRipple wrote:
2022-05-18, 01:48
BabbleOn requires you to set your browser's locale preference in the "intl.accept_languages" about:config option, and the address bar icon requires the page's <html> tag to have a lang attribute set which doesn't match any of the items in your "intl.accept_languages" list. The latest version has a context menu to translate pages even if the icon in the address bar doesn't show up.
So many requirements that will not meet in reality my friend. Even Simple Translate is hard coded to a language. You should set your addon to allow the user to choose a target language that will always be used, this will save you a lot of guessing the language of the browser and the page. You could be surprised because you could tell Simple Translate to translate from English to English. Why? People it doesn't spend extra efforts to examine everything like yours. It is deadly dumb, it will always translate the page language to the target language regardless they are in the same language or not! Most translation engines support detect the page language automatically so you don't have to do this for them. Follow the KISS principle my friend ;)

p/s: Even thought my language is Vietnamese my Windows and browsers are always English and my locale is en-US. Most people I know is the same.

User avatar
VozFreeAccounts
Apollo supporter
Apollo supporter
Posts: 32
Joined: 2022-05-17, 16:58

Re: Translating addon?

Unread post by VozFreeAccounts » 2022-05-18, 07:55

Moonchild wrote:
2022-05-18, 00:30
You don't need an extension to search selected text. Pale Moon has a right-click menu entry on selections to send it to your active search engine.
Image1.png
But, how to set Google Translate as a search engine? :)

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2046
Joined: 2012-08-19, 20:32

Re: Translating addon?

Unread post by back2themoon » 2022-05-18, 08:06

1. Visit Google Translate: https://translate.google.com/
2. Press the arrow on the top-right Pale Moon Search bar.
3. Select Add "Google Translate".

Or visit https://mycroftproject.com/ for Google Translate and many more search engines.

Also, do visit the Pale Moon Add-ons Site. Lots of information there, and in the main page.

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 502
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: Translating addon?

Unread post by RealityRipple » 2022-05-18, 10:54

VozFreeAccounts wrote:
2022-05-18, 07:53
RealityRipple wrote:
2022-05-18, 01:48
BabbleOn requires you to set your browser's locale preference in the "intl.accept_languages" about:config option, and the address bar icon requires the page's <html> tag to have a lang attribute set which doesn't match any of the items in your "intl.accept_languages" list. The latest version has a context menu to translate pages even if the icon in the address bar doesn't show up.
So many requirements that will not meet in reality my friend. Even Simple Translate is hard coded to a language. You should set your addon to allow the user to choose a target language that will always be used, this will save you a lot of guessing the language of the browser and the page. You could be surprised because you could tell Simple Translate to translate from English to English. Why? People it doesn't spend extra efforts to examine everything like yours. It is deadly dumb, it will always translate the page language to the target language regardless they are in the same language or not! Most translation engines support detect the page language automatically so you don't have to do this for them. Follow the KISS principle my friend ;)

p/s: Even thought my language is Vietnamese my Windows and browsers are always English and my locale is en-US. Most people I know is the same.
This is the simple option. That config value controls what your browser's navigator object reports as your supported languages. Checking for html lang tags is the simple check. Trying to detect what a language is based on the contents is one of the most complex things you could possibly do.

User avatar
VozFreeAccounts
Apollo supporter
Apollo supporter
Posts: 32
Joined: 2022-05-17, 16:58

Re: Translating addon?

Unread post by VozFreeAccounts » 2022-05-18, 11:02

RealityRipple wrote:
2022-05-18, 10:54
VozFreeAccounts wrote:
2022-05-18, 07:53
RealityRipple wrote:
2022-05-18, 01:48
BabbleOn requires you to set your browser's locale preference in the "intl.accept_languages" about:config option, and the address bar icon requires the page's <html> tag to have a lang attribute set which doesn't match any of the items in your "intl.accept_languages" list. The latest version has a context menu to translate pages even if the icon in the address bar doesn't show up.
So many requirements that will not meet in reality my friend. Even Simple Translate is hard coded to a language. You should set your addon to allow the user to choose a target language that will always be used, this will save you a lot of guessing the language of the browser and the page. You could be surprised because you could tell Simple Translate to translate from English to English. Why? People it doesn't spend extra efforts to examine everything like yours. It is deadly dumb, it will always translate the page language to the target language regardless they are in the same language or not! Most translation engines support detect the page language automatically so you don't have to do this for them. Follow the KISS principle my friend ;)

p/s: Even thought my language is Vietnamese my Windows and browsers are always English and my locale is en-US. Most people I know is the same.
This is the simple option. That config value controls what your browser's navigator object reports as your supported languages. Checking for html lang tags is the simple check. Trying to detect what a language is based on the contents is one of the most complex things you could possibly do.
It seems you are still not yet got it. You pass the texts directly to translation services. These services will detect the input language automatically. You don't have to do this for them. What you think are clever is indeed just overengineering and a waste of time.

Go to Google Translate site. You will see it has Detect Language when you don't specify the input language, isn't it? Do you get my points?

Only the target language matters, the language to be translated to matters, the input language is irrelevant.

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 502
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: Translating addon?

Unread post by RealityRipple » 2022-05-18, 12:02

That's what the context menu is for.

Also, Preferences > Content > Languages > Choose.

User avatar
VozFreeAccounts
Apollo supporter
Apollo supporter
Posts: 32
Joined: 2022-05-17, 16:58

Re: Translating addon?

Unread post by VozFreeAccounts » 2022-05-18, 12:59

RealityRipple wrote:
2022-05-18, 12:02
That's what the context menu is for.

Also, Preferences > Content > Languages > Choose.
Keep your nonsense requirements. It will never be met in reality. Why do you so keen on making things more complicated? Allow the user to set a target language like Google Translate, Simple Translate,... and nearly any other translating extensions available. Is it not just better? Yours is the most awkward and counter intuitive.

p/s: What if my browser is in Vietnamese but I want to translate English to Japanese? I'm in Japan and learning Japanese. Do you ever think about this? Don't try to be so smart!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 32157
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Translating addon?

Unread post by Moonchild » 2022-05-18, 14:29

Off-topic:
VozFreeAccounts wrote:
2022-05-18, 12:59
Keep your nonsense requirements
VozFreeAccounts wrote:
2022-05-18, 12:59
Don't try to be so smart!
Not the first thread you're going out of your way to bite the hand that feeds you. Please tone it down.
"You will observe with concern how long a useful truth may be known and exist before it is generally received and practiced on." -- Benjamin Franklin
"Compromise and collaboration lie at the heart of all great endeavours" -- Kassandra
Image

User avatar
VozFreeAccounts
Apollo supporter
Apollo supporter
Posts: 32
Joined: 2022-05-17, 16:58

Re: Translating addon?

Unread post by VozFreeAccounts » 2022-05-18, 15:27

Moonchild wrote:
2022-05-18, 14:29
Off-topic:
VozFreeAccounts wrote:
2022-05-18, 12:59
Keep your nonsense requirements
VozFreeAccounts wrote:
2022-05-18, 12:59
Don't try to be so smart!
Not the first thread you're going out of your way to bite the hand that feeds you. Please tone it down.
No. I could be over reacting on the fingerprint thread, but I don't agree with the warning point you made on me on this thread. I said nothing wrong. He tried to be smart. He loves over engineering. He makes a very simple problem become complicated. I showed him how other extensions (Google Translate, Simple Translate,...) works, he dismissed all. The problem is of him, not me.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 3949
Joined: 2015-12-09, 15:45
Contact:

Re: Translating addon?

Unread post by moonbat » 2022-05-19, 00:16

VozFreeAccounts wrote:
2022-05-18, 15:27
No. I could be over reacting on the fingerprint thread, but I don't agree with the warning point you made on me on this thread. I said nothing wrong. He tried to be smart. He loves over engineering. He makes a very simple problem become complicated. I showed him how other extensions (Google Translate, Simple Translate,...) works, he dismissed all. The problem is of him, not me.
You never will agree. Right from the moment you signed up you have been nothing but rude and dismissive of others who are long time contributors to the forum, and then you have the fucking gall of accusing me of doing the same on being called out.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20.1 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
jobbautista9
Lunatic
Lunatic
Posts: 418
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: Translating addon?

Unread post by jobbautista9 » 2022-05-19, 05:24

VozFreeAccounts wrote:
2022-05-18, 15:27
I said nothing wrong. He tried to be smart. He loves over engineering. He makes a very simple problem become complicated. I showed him how other extensions (Google Translate, Simple Translate,...) works, he dismissed all. The problem is of him, not me.
I think you're conveniently forgetting the fact that his extension is provided gratis and no warranty/guarantee of any kind, just like Pale Moon. Did you even donate a single cent to him before? Stop acting like you're entitled to everything. If he doesn't want to implement the function you want, then create your own extension instead of complaining.
mima confirmed

Developer of Ambassador in Window Menu, BrowserTickTock, CacheSwitch, Chrome Navigator, Cite4Wiki, Clickity Touch 'n Push, ColorPili, EditDatContent, EditDatTitle, Esrever, Go Menu, User Agent Status, Website Navigation Bar, and Yet Another about:config Helper.

My PGP public key (My copy on rw.rs)

Touhou avatar by わんどろいど of pixiv

Post Reply