Topic on Talk:Content translation

Content translation on Scandinavian wikis either

11
Summary by Orf3us

Problem with a gadget

Orf3us (talkcontribs)

It seems like there is something wrong for all wikis?

Orf3us (talkcontribs)

When you start translating all you see is a blank page.

Amire80 (talkcontribs)

Which error do you see in the JavaScript console? (Usually it can be opened with F12.)

Orf3us (talkcontribs)

Is this it?

Uncaught TypeError: Cannot read property 'insertBefore' of null

    at rcp_draw_disabled_box (eval at <anonymous> (load.php?debug=false&lang=nb&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:4), <anonymous>:328:771)

    at HTMLDocument.rcp_init (eval at <anonymous> (load.php?debug=false&lang=nb&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:4), <anonymous>:320:214)

    at fire (load.php?debug=false&lang=nb&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:45)

    at Object.fireWith [as resolveWith] (load.php?debug=false&lang=nb&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:46)

    at Function.ready (load.php?debug=false&lang=nb&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:49)

    at completed (load.php?debug=false&lang=nb&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:49)

Amire80 (talkcontribs)

Yes, probably. Into which language are you trying to translate?

Orf3us (talkcontribs)

from Danish to Norwegian bokmål. I have never had the problem before.

Amire80 (talkcontribs)

It's most likely a bug in the Recent Changes Patrol gadget. In Norwegian it's called "Patruljering: Legg til en boks for siste endringer med klikkbare lenker". If you have it enabled, try disabling it.

Orf3us (talkcontribs)

Yes, I have disabled it, and now the conent translation works. I wonder how you could conclude that from the message above, but I am very thankful. Should I report this problem somewehere or will you?

Amire80 (talkcontribs)

The string "rcp_draw_disabled_box" appears in your error message. I searched for it in the MediaWiki namespace. Over the last 2+ years I have debugged a lot of gadgets that break Content Translation and got quite good at identifying them :)

It should be easy for Jeblad and Laaknor to fix this. An easy way to fix this is to check that the side_col element actually exists on the page, and if it doesn't, just exit the gadget.

Jeblad (talkcontribs)

That gadget is a root cause for a lot of problems. This is a known bug from w:no:Wikipedia:Torget/Arkiv/2015/november#Innholdsoversettelse. The gadget is a strange mix of dynamic Javascript and jQuery.

It is probably better to "leak" the information about live update of recent changes, than trying to fix the gadget.

Orf3us (talkcontribs)

Thank you for the answers to both of you. I will not take it any further.