Jump to content

Topic on Talk:Content translation/Flow

Translation greyed-out, cannot be changed

24
Rowanwindwhistler (talkcontribs)

I am doing a translation (this one: https://es.wikipedia.org/w/index.php?title=Especial:Traducci%C3%B3n_de_contenidos&campaign=contributionsmenu&to=es&page=Guerre+de+Livonie&from=fr&targettitle=Usuario%3ARowanwindwhistler%2FGuerreDeLivonie) but I cannot continue translating or modify the paragraphs I already translated as, even after loading the translation, the site will grey out the translated version and allow no changes. Is there any way to solve this problem and allow me to carry on translating.

Thank you!

Rowanwindwhistler (talkcontribs)

Will this be looked into in the near future or shall I forget about the translation?

Electrodd (talkcontribs)

Same happened to me after playing with translation options. Can somebody help?

Electrodd (talkcontribs)

Hey, try out with a different browser. Chrome was blocking the script

Rowanwindwhistler (talkcontribs)

Thank you for the recommendation. Unfortunately, it did not work for me. I tried iceweasel, chromium and opera and in all three of them the translation cannot be edited.

Amire80 (talkcontribs)

Can you please enable the JavaScript console and check whether there are any errors?

It's F12 in Firefox.

Rowanwindwhistler (talkcontribs)

Well, while loading the translation, these are the entries that show up in the console:

ReferenceError: otroparametro is not defined[Saber más]  index.php:5:1

    <anónimo> https://es.wikipedia.org/w/index.php:5:1

ReferenceError: otroboton is not defined[Saber más]  index.php:8:1

    <anónimo> https://es.wikipedia.org/w/index.php:8:1

ReferenceError: otrobuscador is not defined[Saber más]  index.php:7:1

    <anónimo> https://es.wikipedia.org/w/index.php:7:1

ReferenceError: otroflotante is not defined[Saber más]  index.php:7:1

    <anónimo> https://es.wikipedia.org/w/index.php:7:1

ReferenceError: otroenlace is not defined[Saber más]  index.php:7:1

    <anónimo> https://es.wikipedia.org/w/index.php:7:1

ReferenceError: otroresumen is not defined[Saber más]  index.php:7:1

    <anónimo> https://es.wikipedia.org/w/index.php:7:1

ReferenceError: topaz is not defined[Saber más]  index.php:6:1

    <anónimo> https://es.wikipedia.org/w/index.php:6:1

unreachable code after return statement[Saber más]  index.php:4646:1

TypeError: document.getElementById(...) is null[Saber más]  index.php:826:14

    recent2.addToolboxLink https://es.wikipedia.org/w/index.php:826:14

    window.addMarvin https://es.wikipedia.org/w/index.php:832:3

    <anónimo> https://es.wikipedia.org/w/load.php:13:982

    jQuery.event.dispatch https://es.wikipedia.org/w/load.php:65:913

    jQuery.event.add/elemData.handle https://es.wikipedia.org/w/load.php:60:459

TypeError: document.getElementById(...) is null[Saber más]  index.php:80:7

    wmWatchEditFound https://es.wikipedia.org/w/index.php:80:7

    wmwpajax.downloadComplete https://es.wikipedia.org/w/index.php:27:56

    wmwpajax.download/x.onreadystatechange https://es.wikipedia.org/w/index.php:18:52

Once the translation is loaded, when it should be ready for modifying, no further output is shown in the console. Thank you.

Amire80 (talkcontribs)
Nikerabbit (talkcontribs)

The TypeErrors don't seem to be coming from our code. Perhaps they are gadgets? I am not sure if they are causing the ReferenceErrors. Those could be template parameters related to template adaptation, or something else. Same backtrace with &debug=true added to the URL would give more information in which code files these occur.

Amire80 (talkcontribs)

Oh right, I missed document.getElementById. They are typical for gadgets. I'll try to check that.

Amire80 (talkcontribs)

Hi,@Rowanwindwhistler,

The problem definitely begins at the page es:Usuario:Rowanwindwhistler/vector.js. It calls another user script called "monobook-full.js", which already sounds problematic, because Monobook and Vector are different skins, and a script for Monobook may be incompatible with Vector. That script is producing errors on other pages as well, and not only in Content Translation.

I strongly recommend removing this from your vector.js file until it is fixed and proper support for the Vector skin is added. I see that it is also used by hundreds of other Spanish Wikipedia users, so a lot of people are affected, and again, it's not only Content Translation, but all Wikipedia pages.

Rowanwindwhistler (talkcontribs)

For https://es.wikipedia.org/w/index.php?title=Especial:Traducci%C3%B3n_de_contenidos&campaign=contributionsmenu&to=es&page=Guerre+de+Livonie&from=fr&targettitle=Usuario%3ARowanwindwhistler%2FGuerreDeLivonie&debug=true I get roughtly the same output:

ReferenceError: otroparametro is not defined[Saber más]  index.php:5:1

ReferenceError: otroresumen is not defined[Saber más]  index.php:7:1

    <anónimo> https://es.wikipedia.org/w/index.php:7:1

ReferenceError: topaz is not defined[Saber más]  index.php:6:1

    <anónimo> https://es.wikipedia.org/w/index.php:6:1

ReferenceError: otroboton is not defined[Saber más]  index.php:8:1

    <anónimo> https://es.wikipedia.org/w/index.php:8:1

ReferenceError: otrobuscador is not defined[Saber más]  index.php:7:1

    <anónimo> https://es.wikipedia.org/w/index.php:7:1

ReferenceError: otroenlace is not defined[Saber más]  index.php:7:1

    <anónimo> https://es.wikipedia.org/w/index.php:7:1

ReferenceError: otroflotante is not defined[Saber más]  index.php:7:1

    <anónimo> https://es.wikipedia.org/w/index.php:7:1

unreachable code after return statement[Saber más]  index.php:4646:1

TypeError: document.getElementById(...) is null[Saber más]  index.php:826:14

    recent2.addToolboxLink https://es.wikipedia.org/w/index.php:826:14

    window.addMarvin https://es.wikipedia.org/w/index.php:832:3

    <anónimo> https://es.wikipedia.org/w/resources/src/mediawiki.legacy/wikibits.js:88:4

    jQuery.event.dispatch https://es.wikipedia.org/w/load.php:4669:15

    jQuery.event.add/elemData.handle https://es.wikipedia.org/w/load.php:4338:6

TypeError: document.getElementById(...) is null[Saber más]  index.php:80:7

    wmWatchEditFound https://es.wikipedia.org/w/index.php:80:7

    wmwpajax.downloadComplete https://es.wikipedia.org/w/index.php:27:56

    wmwpajax.download/x.onreadystatechange https://es.wikipedia.org/w/index.php:18:52

Amire80 (talkcontribs)

Yes, "otroparametro" and "topaz" are variables from scripts that are called by monobook-full.js.

This problem is not specific to Content Translation.

Amire80 (talkcontribs)

I strongly recommend talking to the people who maintain JavaScript and gadgets in the Spanish Wikipedia, and asking them to fix these scripts thoroughly.

Elitre (WMF) (talkcontribs)

It may be not so hard finding someone to fix this, if we could also say where the problem is and what exactly needs to be done.

Amire80 (talkcontribs)
Rowanwindwhistler (talkcontribs)

Thank you for all the help so far. I tried changing the skin from Vector to Modern in the preferences menu, to see if I could bypass the problem and carry on the translation but it did not work.

Amire80 (talkcontribs)

I tried changing the skin to Modern or Monobook, but it doesn't resolve the issue. That script is buggy and should be removed from your private JavaScript until it is fixed.

Rowanwindwhistler (talkcontribs)

I tried commenting out the script and changing the skin to a different one (Modern). Now there are no errors in the javascript console (even with debug=true in the URL), there is no output at all, but the problem remains: the Spanish translation appears grayed out and cannot be modified. The page says the translation has been saved, but there is a sort of loading "gadget" at the top as if it the translation was still being loaded (three circles that grow and shrink all the time).

Andrei Stroe (talkcontribs)

Just to remind you, similar behavior here. First, there was the suspicion of javascript interference, but the issue persists.

Andrei Stroe (talkcontribs)

I managed to get mine working, I updated phab:T157121 with the information.@Rowanwindwhistler, try to have a look at the templates that the French article uses: is there any that is connected via Wikidata to a Spanish template without templatedata? If so, we may be looking at the same bug. A good place to start is the list of requests made by the browser when opening the translation: see what is last. If it's a request to convert a template to html text, then go to that template and the ones that follow it in the source.

Rowanwindwhistler (talkcontribs)

Thank you for the recommendation but I am afraid I am not very familiar with Wikidata or templates to be able to tell whether a template may be using Wikidata or not...

If you meant HTTP requests similar to https://es.wikipedia.org/api/rest_v1/transform/wikitext/to/html/Usuario:Rowanwindwhistler/GuerreDeLivonie when you mentioned requests to convert to HTML text, there are a few that receive a 400 Bad Request response and I guess the templates in the body request may be the templates (they look like templates to me, the body for the request above is "Harvsp|1=Kahle|2=Hauptmann|3=1984|p=18" for instance).

Amire80 (talkcontribs)

@Nikerabbit, any more ideas now that the user script is not a problem any longer?..

@Rowanwindwhistler, it's probably not the cause of the problem, but I suggest switching the skin to Vector or Monobook. The "Modern" skin, despite its name, is barely maintained by now.

Andrei Stroe (talkcontribs)

@Rowanwindwhistler, if you have a non-empty list of "other languages" in the left column of the template page, and the template page in the other language is there, then they're most likely linked via Wikidata. Most are, so you can safely assume that they are. That's not the question. The question is the presence of the templatedata in the template page.

Or you could just napalm every template in the article with templatedata, it can't hurt.

Reply to "Translation greyed-out, cannot be changed"