Page 1 of 1

translate.google.com - website translation problem

Posted: 2022-12-06, 19:02
by Enobarbous
Pale Moon v31.4.1.1
Translating websites with translate.google.com stopped working today.
How to repeat:
- open https://translate.google.com/?sl=auto&tl=en&op=websites
- paste the address of the site for translation (for example, https://www.palemoon.org) and go.
Expected behavior: opens page with address like https://www-palemoon-org.translate.goog ... r_pto=wapp with text translated into target language (russian in this case)
Real behavior: page opens, but text remains untranslated (regardless of website or language of translation)
Сonsole displays:

Code: Select all

SyntaxError: An invalid or illegal string was specified          m=el_main:468
  rs          https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:468:227
  Hu          https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:551:68
  jv          https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:626:266
  gtElInit          https://www-palemoon-org.translate.goog/:204:32
  _.Li          https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:52:194
  <anonymous>          https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:628:169
  <anonymous>          https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:1:51
Translation works fine on firefox 52 and waterfox classic (as well as on current firefox / chrome). Changing user-agent (both globally, via network.http.useragent.global_override, and via general.useragent.override.google.com / general.useragent.override.translate.goog) to agent from FF 52 /56 /68 did not help.
Any suggestions for a solution? (other than "stop using google translate" :) )

Re: translate.google.com - website translation problem

Posted: 2022-12-06, 19:10
by Moonchild
Try adding an override for googleapis.com

Re: translate.google.com - website translation problem

Posted: 2022-12-06, 19:36
by Enobarbous
It also doesn't work (tested "Mozilla/5.0 (%OS_SLICE% rv:56.0) Gecko/20100101 Firefox/56.0", "Mozilla/5.0 (%OS_SLICE% rv:52.0) Gecko/20100101 Firefox/52.0", "Mozilla/5.0 (%OS_SLICE% rv:68.9) Gecko/20100101 Firefox/68.9").
And I thought network.http.useragent.global_override should have worked for googleapis.com too? I specifically used this pref for the test...

Re: translate.google.com - website translation problem

Posted: 2022-12-06, 20:39
by therube
Off-topic:
Also stopped working in SeaMonkey, https://forums.mozillazine.org/viewtopi ... &t=3101559.

Re: translate.google.com - website translation problem

Posted: 2022-12-07, 03:26
by moonbat
Enobarbous wrote:
2022-12-06, 19:36
And I thought network.http.useragent.global_override should have worked for googleapis.com too?
You don't override globally to fix a single site when there is support for site specific overrides that you can create using PermissionsPlus or Sasuga. In fact there is zero need to mess around with the global override.

Re: translate.google.com - website translation problem

Posted: 2022-12-07, 08:13
by gepus
In this case an override won't help.

Re: translate.google.com - website translation problem

Posted: 2022-12-07, 10:12
by Moonchild
Well get together with the SeaMonkey users and pile onto Google Support to complain :)
MAYBE they will listen.
If not, then there's only one reason "it furthers our Chrome monopoly". It's a Google service and they are more than happy to make it Google-browser specific.

Re: translate.google.com - website translation problem

Posted: 2022-12-07, 10:30
by gepus
It's weird because like the OP already mentioned it still works with the old Waterfox Classic AKA Firefox 56.

Re: translate.google.com - website translation problem

Posted: 2022-12-07, 11:49
by jobbautista9
Indeed, I tested in vanilla Firefox 52, and it translates fine there. The website translation doesn't work all the way back to Pale Moon 28.0.0, so it probably isn't a regression in our part.

Really weird that it works in very old Firefox but not in ours...

Re: translate.google.com - website translation problem

Posted: 2022-12-07, 14:51
by patrick-g
Hi,

It works here (Mageia Linux 8 64bits ; Pale Moon 31.4.1 (64-bit))
SUA used: Native (Mozilla/5.0 (X11; Linux x86_64; rv:5.2) Goanna/20221126 PaleMoon/31.4.1)

Re: translate.google.com - website translation problem

Posted: 2022-12-07, 17:44
by therube
(In SeaMonkey...)

Different Error Console messages between a working version 2.53.11, & not working version 2.53.12 (with current being 2.53.14):

Test page (for a de to en): https://www.uwe-sieber.de/deutsch.html


2.53.11, works:

Code: Select all

Use of attributesí nodeValue attribute is deprecated. Use value instead.
m=el_main:368:329
2.53.12, broken:

Code: Select all

SyntaxError: An invalid or illegal string was specified
m=el_main:469


[& the above, expanded]
rs
https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:468:239
Hu
https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:551:68
jv
https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:626:266
gtElInit
https://www-uwe--sieber-de.translate.goog/deutsch.html:158:32
_.Li
https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:52:194
<anonymous>
https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:628:171
<anonymous>
https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.en_US.mDH6gpU_zdI.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpc_aBGGGcon5musxLArR6j0bbk_A/m=el_main:633:4

Re: translate.google.com - website translation problem

Posted: 2022-12-07, 18:40
by Enobarbous
therube wrote:
2022-12-07, 17:44
Different Error Console messages between a working version 2.53.11, & not working version 2.53.12 (with current being 2.53.14):
The same difference in console messages between Pale Moon and Firefox 52. But m=el_main.js is exactly the same - it is the same even between PM and Chrome.
I'm not sure we should blame google in this case...
moonbat wrote:
2022-12-07, 03:26
You don't override globally to fix a single site when there is support for site specific overrides...
I only use the global override for tests when site-specific overrides don't work.
Furthermore, I don't use this pref in the main installation of pale moon - only in the test portable version

Re: translate.google.com - website translation problem

Posted: 2022-12-07, 21:30
by therube

Re: translate.google.com - website translation problem

Posted: 2022-12-09, 11:43
by Moonchild
Workaround:
  1. In the address bar, type about:config and press enter
  2. In the page that shows up then, in the Filter box, type "navigation" to quickly find the preference
  3. Double-click on the dom.enable_performance_navigation_timing preference to set it to false

Re: translate.google.com - website translation problem

Posted: 2022-12-09, 18:28
by Enobarbous
Thanks for the solution.