Jump to content

Extension talk:Live Translate

Add topic
From mediawiki.org


Installation error

[edit]

I get this error when trying to maintenance/update.php:

Catchable fatal error: Argument 1 passed to LiveTranslateHooks::onSchemaUpdate() must be an instance of DatabaseUpdater, none given in /public_html/wiki/extensions/LiveTranslate/LiveTranslate.hooks.php on line 130

Any suggestions?

-

What version of mediawiki are you using? --Jeroen

-

1.16.0, and here's the error when trying to reach the Wiki:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "". Database returned error "1146: Table 'xxxxxxxx_wiki.live_translate' doesn't exist (localhost)". -- Blink Blink 15:57, 23 December 2010 (UTC)

I had a look at this, and it turned out to be a compatibility issue with MediaWiki 1.16 in the installation code. It's fixed on SVN trunk. Updating your code and running update.php again should fix the issue :) Jeroen De Dauw 15:58, 23 December 2010 (UTC)Reply
thanks, it's working now =) 173.55.64.94 18:38, 23 December 2010 (UTC)Reply

New feature: translation control location

[edit]

feature suggestion: An option to change the location of where you want the translation controls. I think on my wiki it would work better at the top of the entire wiki, because I have a lot of diagrams/images and the controls are pushing them to the left. 173.55.64.94 22:03, 27 December 2010 (UTC)Reply

To quote myself from a blog post: "A cool new feature I’ve been considering, and might add at some point, is having __LIVETRANSLATE__ and __NOLIVETRANSLATE__ magic words, that allow per-page showing or hiding of the translation control. Yaron suggested also having a per-namespace setting."
So yes, I think this is a cool thing to have, and there is a good chance I'll implement it at some future point, especially if someone pays me to do it :) Jeroen De Dauw 13:53, 28 December 2010 (UTC)Reply
FWIW, I'd love to see an option to put the widget in the sidebar. Great extension Jeroen! Jlerner 01:48, 25 January 2011 (UTC)Reply
Excellent work on this extension.
Implemented on http://www.dexid.org and it works great!
I'd love to see a magic word option as well, as I'd likely disable it on the main page.
Cheers on a great job. BrettFerguson 13:39, 21 April 2011 (UTC)Reply

Publication of unedited machine translations

[edit]

I assume that the purpose of this tool is to provide a draft translation in the language of the reader, to help the reader to understand the contents of the original, written in a different language.

The tool as it appears on the screenshots does not include any advice concerning the quality of the draft translation produced. There is nothing to explain that the translations produced are not reliable enough to be published, without being edited by someone who understands the languages of the translation and the source, and who preferably also has some knowledge of the subject matter of the source.

I am concerned that as it stands, this translate tool will encourage unsuspecting members of the public to publish translations on a wiki in languages which they do not understand themselves. This has already happened on some language versions of Wikipedia.

I propose that, as a minimum, there should be a warning attached to the tool to say that it should not be used to publish translations which have not been edited by a person who understands both languages.

By the way, the screenshots of the extension in use which have been produced are very useful in understanding the extension and in translating its interface on translatewiki.net. I notice that you do have a short description of the tool in the screenshot. However this has not been included in the messages to be translated at translatewiki.net. Is it intended to include this description as an integral part of the tool, and is the description to be localised on translatewiki.net? Lloffiwr 20:48, 7 January 2011 (UTC)Reply

I agree, it might not be clear to some people that the result should be taken with a grain of salt, and that it would be helpful to have this documented. So by all means feel free to add this. Some optional notice in the extension itself would also be nice, but is not needed by my client (which is paying for the dev of this extension).
All messages used in the extension are internationalized AFAIK. The descriptions for the screenshots on the documentation page are not (just like the rest of the docs). Jeroen De Dauw 00:20, 8 January 2011 (UTC)Reply
I am a translator at translatewiki.net, not a developer. When you mention adding to the documentation, I assume that means adding to the 'Extension:Live Translate' page here at MediaWiki. I'm happy to do that, when I get some time.
At translatewiki.net there are 9 messages to translate for this extension but the description starting 'Live translate is a simple extension that allows...' is not amongst them. Was that just an accidental omission? Isn't it part of the extension? Was being slow to understand here.
You mention the possibility of adding an optional message regarding the quality of the results. How do you suggest this could be displayed? - appearing permanently beneath the tool, only appearing when the tool is used, say above the translated text, inserted as an expandable note after the 'Translate' button? Are any of these possible from a technical point of view? Lloffiwr 09:44, 8 January 2011 (UTC)Reply
When you mention adding to the documentation, I assume that means adding to the 'Extension:Live Translate' page
Yes, indeed.
How do you suggest this could be displayed? - appearing permanently beneath the tool, only appearing when the tool is used, say above the translated text, inserted as an expandable note after the 'Translate' button?
I think displaying a notice above the text after it's been translated should suffice.
Are any of these possible from a technical point of view?
Sure, quite easy to implement actually. I'll just do that for the next version :) Jeroen De Dauw 12:39, 9 January 2011 (UTC)Reply
Thank you for the prompt reply. With regard to the language of the notice to users, the most useful language for the notice is probably the language of the source. This covers the situation where someone, who speaks the language of the original only, ventures to use the live translate tool to publish in an unfamiliar language. However, for people who are using the tool to understand an original written in an unfamiliar language, this produces an untranslated notice at the top of the translated text, which again they don't understand. You might try producing the notice in both the language of the original and the translation.
This reminds me of the classic occasion where a Welsh translation was requested by e-mail to the translation department of a government organisation and the e-mail reply duly published. This transpired to be one of those automated response things which you can use when you are out of the office!
Do you want some input on composing the text of the notice? Lloffiwr 16:06, 9 January 2011 (UTC)Reply
You might try producing the notice in both the language of the original and the translation.
Sure, why not.
This reminds me of the classic occasion where a Welsh translation was requested by e-mail to the translation department of a government organisation and the e-mail reply duly published.
Heh :)
Do you want some input on composing the text of the notice?
Sure.
I do get the impression you are a bit off on the usage of this extension though; it's not meant to publish translations. It's intended to be used on technical articles by people that can not read the language they are in, so they can understand what's written. Not to create a new page (or do any other form of publishing) with the translated text. Jeroen De Dauw 17:51, 9 January 2011 (UTC)Reply
OK - nice to know what its intended use is. If you could guarantee that no-one else would try to use this extension in other wikis then there would not be any issue. But given that Mediawiki is open-source software I am concerned how this software could potentially be applied either in existing wikis or any new wikis yet to be dreamt of....
I will have a think about potential wording - unfortunately am very busy at work just now. Lloffiwr 18:54, 9 January 2011 (UTC)Reply
OK - here is a draft of a message to appear before the translation, in both the language of the source and of the translation:
Here follows a machine translation, possibly incomplete and containing errors of grammar. This machine translation is not intended to be published or distributed without first being edited by a person who understands the languages of both the source and the translation. Lloffiwr 11:57, 22 January 2011 (UTC)Reply
I have added a section on 'optional disclaimer' to the documentation page of the extension. Perhaps you could amend as you see fit, when the software has been updated? Lloffiwr 22:44, 22 January 2011 (UTC)Reply
That's a good idea to have as an option, but how about simpler wording, like: "This is a machine translation, that most likely contains a variety of errors. It is not intended to be directly published or distributed." Yaron Koren 17:58, 25 January 2011 (UTC)Reply
I don't mind the message being shorter; I suppose more people are likely to read a disclaimer the shorter it is. The disadvantage is that 'variety' and 'directly' don't convey a specific meaning to those who don't understand the background to this. However, I can't come up with any alternatives that are better, so agree with the latest wording, except that I don't know whether 'most likely' is acceptable in written American English, instead of 'probably'. Lloffiwr 09:49, 30 January 2011 (UTC)Reply
Well, it'll always be possible to change it again it any point. "most likely" is correct in American English (that's what I speak); although "probably" would work fine too. Yaron Koren 17:44, 30 January 2011 (UTC)Reply
OK. Lloffiwr 17:32, 13 February 2011 (UTC)Reply
Did the above get actioned? Lloffiwr 16:47, 11 August 2011 (UTC)Reply

Unclear meaing of translatable messages

[edit]

Hi, “livetranslate-special-location” and “Livetranslate-importtms-param-miscmatch” are not intuitively translatable considering the purpose of this extension. Perhaps it has something to do with the translation control location discussed in an other thread on this page, but I am not entirely sure. Cheers [[kgh]] 13:31, 11 January 2011 (UTC)Reply

I'll document the messages. They have nothing to do with the translation control or it's location. Jeroen De Dauw 13:35, 11 January 2011 (UTC)Reply
Cool, thank you! It is good that I have asked. Cheers [[kgh]] 15:32, 11 January 2011 (UTC)Reply
I just committed the docs. Should show up on translatewiki next time they update from svn. Jeroen De Dauw 16:53, 11 January 2011 (UTC)Reply
Affirmative :) [[kgh]] 21:26, 11 January 2011 (UTC)Reply

Stand alone version

[edit]

How would you accomplishing this on a stand alone system? Dgennaro 19:04, 24 January 2011 (UTC)Reply

I'm guessing you are asking how you can use Google translate when not having internet access. Obviously you can't. The translation specified via Live Translate will work though. And if I'm not mistaken, Google has commercial products to handle such use cases, but that's really outside the scope of this extension. Jeroen De Dauw 22:33, 24 January 2011 (UTC)Reply
Thank you for the feedback on this. Dgennaro 19:50, 9 February 2011 (UTC)Reply

The translator ignores the words in my dictionary

[edit]

Hi, I installed this tool in my wiki. However, when I select a language to translate to, the words I have in my custom dictionary are ignored and are displayed in the original language. Any ideas what I did wrong?

I created a page in the wiki called Live Translate Dictionary and added the test words below.

en,sv,nl,de,no,fr people,personer,Personen,Personen,Personer issues,ärenden,test nl,test de,test no,test fr 213.115.136.17 15:20, 24 March 2011 (UTC)Reply

Can you please paste the words in a sane and readable format? Jeroen De Dauw 18:27, 24 March 2011 (UTC)Reply
Sorry, didn't notice the strange format. The test words are as follows:
en, sv, nl, de, no, fr
people, personer, Personen, Personen, Personer
issues, ärenden, test nl, test de, test no, test fr
Source language is en, the rest the available translated languages.
I have the following ex installed already and I have not removed it. It seems Live Translate works fine anyway, apart from leaving the custom words untranslated.
http://www.mediawiki.org/wiki/Extension:Google_Translator
Thanks for a quick reply
Matt 80.216.84.58 20:37, 24 March 2011 (UTC)Reply
Do you have the dictionary page listed at Special:LiveTranslate with "live translate format" selected (like in this screenshot)?
If so, something is going wrong, and debugging is needed. Is your wiki publicly accessible? If so, please link to a page where the word replacing does not work. If not, you can have a look at your wiki database at table live_translate and see if the words are there or not. Jeroen De Dauw 21:41, 24 March 2011 (UTC)Reply

Compatibility version 1.2 with mediawiki 1.17 issue

[edit]

First of all, congratulate for this easy to use and very efficient extension.

My setup tests:

  • MW 1.16 with LiveTranslate 1.2 works
  • After upgrading to MW 1.17 with LiveTranslate 1.2 doesn't show up in the top right corner
Odd, it works for me with MW trunk. I did make some IE related fixes since the 1.2 release though, so if you're using Internet Explorer, that explains why it's not showing up for you. Is that the case?
I just released version 1.2.1 with these IE fixes, so that one will probably help you out. Jeroen De Dauw 14:40, 12 September 2011 (UTC)Reply
I have tested in FF and Chrome, so this is not IE related in my case.
I have followed your advice and I have tested also with MW 1.19 alpha trunk and is still not working.
Please test with MW 1.17 stable version, not trunk.
Thank you! Eurodomenii 23:36, 12 September 2011 (UTC)Reply
Did you get the new (1.2.1) release?
I just tested with MW 1.17 and even 1.16, and both work fine for me.
If 1.2.1 doesn't work for you, can you link to your wiki so I can have a look? If not, please list any non-standard things you have on your wiki that might be interfering with Live Translate. Jeroen De Dauw 02:08, 13 September 2011 (UTC)Reply
Amazing quick and quality feedback from the developer... Fixed in version 1.2.2, Release note: Fixed script loading issue occuring when resource loader debugging is off. Jeroen, keep up the good work! Eurodomenii 22:29, 15 September 2011 (UTC)Reply
I'm having this exact same issue with MediaWiki 1.17.
Where can I download version 1.2.2? It hasn't been added to the download page yet. BrettFerguson 11:45, 24 October 2011 (UTC)Reply
I just added the download. Jeroen De Dauw 18:02, 24 October 2011 (UTC)Reply

Installation Error - Problem running update.php

[edit]

I get the following error running update.php through the browser : Creating live_translate table... An error occured: Could not open "/LiveTranslate.sql".

Backtrace:

  1. 0 C:\Program Files\EasyPHP-5.3.8.1\www\wikibank\includes\installer\DatabaseUpdater.php(362):

Any idea ?

Thanks Thomas 2.136.82.183 06:09, 31 January 2012 (UTC)Reply

This seems to be an issue with your MW install loose from this extension. I suggest you ask on the wikitech mailing list. Jeroen De Dauw 18:49, 31 January 2012 (UTC)Reply

Um im newish to mediawiki and it wont install at all

[edit]

this wont install and it keeps giving me a database error :/ can you please help me? 72.70.210.5 22:29, 12 February 2012 (UTC)Reply

Could you provide us more deailed information? What is the error you are seeing? Which version of MediaWiki are you using? Helder 15:53, 13 February 2012 (UTC)
Did you run /maintenance/update.php as described in the installation instructions? Jeroen De Dauw 20:00, 13 February 2012 (UTC)Reply
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function "LiveTranslateFunctions::getLocalMemoryNames". Database returned error "1146: Table 'proje552_wiki.live_translate_memories' doesn't exist (localhost)"
thats my error 72.70.210.5 20:20, 13 February 2012 (UTC)Reply
Did you run /maintenance/update.php as described in the installation instructions?
Looks like you did not. Jeroen De Dauw 14:04, 14 February 2012 (UTC)Reply

Local translation memory OK, machine translation doesn't work.

[edit]

I've created a new Google project and got a new API key for browser applications. I've installed the Live Translate extension and the settings in LocalSettings.php are following:

require_once( "$IP/extensions/LiveTranslate/LiveTranslate.php" );
$egLiveTranslateLanguages[] = 'nl';
$egLiveTranslateLanguages[] = 'de';
$egLiveTranslateService = LTS_GOOGLE;
$egGoogleApiKey = 'MY-GOOGLE-API-KEY-FOR-BROWSER-APPLICATIONS';

The words from my local translation memory are translated correctly, but the machine translation doesn't seem to work. When I press the "Translate" button, the words from the local translation memory are translated immediately, but the button remains "Translated..." for some time (up to a minute), and nothing happens. The statistics from the Google APIs Console doesn't indicate any translation requests. It seems that the extension does not reach the Google Translate API at all. I have double-checked, and the API key for browser applications is correct. What can be the reason?

Remark: When I use the version 1.2 and above, no "Translate" button appears anywhere, so I have to use 1.1.1. I don't know if this has anything to do with the problem described above. 91.198.201.28 10:30, 14 May 2012 (UTC)Reply

Timing out or not working

[edit]

Cannot seem to get it to work :

I have installed the extension and have the translate button appear on my pages. When I click the translate button it takes a while before stopping with either nothing happening or timing out. I have tried with both google API and MS ID. At first it was just not doing anything. I clicked the translate button and then it would say show original. Now it times out.

My server details :

MediaWiki 1.18.1 PHP 5.2.17 MySQL 5.0.91-log

Thanks for any help in advance Stampstudy (talk) 21:03, 23 May 2012 (UTC)Reply

I believe this is another case of what I have described in another topic here, see #Local translation memory OK, machine translation doesn't work. The symptomes are the same: long waiting time after pressing the button, then nothing happens. I've figured out that words from the local dictionaries are translated, but Google doesn't seem to receive any requests; at least, the statistics doesn't show anything. 91.198.201.28 08:20, 24 May 2012 (UTC)Reply
It does sound the same. I will try again when I have more time to setup a sandbox server. Translate would be a fantastic feature to have on my wiki. Let me know if you have any luck. Stampstudy (talk) 07:44, 8 June 2012 (UTC)Reply
I've been testing this for some time now. I haven't yet managed to solve the problem, but I have some more input. Web Console window in my Firefox shows the following error when the page is loaded or after the "Translate" button is pressed: "google.language is undefined @ http://10.251.3.35/w19/load.php?debug=false&lang=en&modules=ext.livetranslate%7Cext.lt.google&skin=vector&version=20120730T065951Z&*:12". I wonder why google.language is not being loaded in spite of that "google.load("language", "1");" is the first instruction in ext.lt.google.js. What can be the reason? 91.198.201.28 12:18, 30 July 2012 (UTC)Reply
Exactly the same problem. Nothing happens.
In our case, the mediawiki is installed completely using spanish language (of course, the pages are in our language too).
But we need to translate into english for our usa/uk students.
Maybe, we are all missing a step or making a missconfiguration, aren't we?
Can you help reviewing the steps/config_files?
Thanks!! 90.175.175.206 10:32, 6 August 2012 (UTC)Reply

Does the extension support Google Translate API v2?

[edit]

According to Google FAQ, they discontinued Translate API v1 on 1st of December 2011 and replaced it with Translate API v2. Does Live Translate extension support this v2? I use Live Translate 1.2.3 alpha and MediaWiki 1.19, and cannot make the Google translation work, albeit words from local translation memories are being translated fine. 91.198.201.28 11:03, 27 July 2012 (UTC)Reply

IIRC the latest version is using v2 of the API. Jeroen De Dauw (talk) 22:45, 27 July 2012 (UTC)Reply
Can anyone confirm that he has a working instance of Live Translate with Google API as of 3rd of August 2012? I've been trying to make the extension work for some time now, but no matter how carefully I follow the instructions, it won't be able produce any automated translation of any word that is not in the translation memory. Now I want to rule out that there have been any changes in the Google API infrastructure, and to confirm that the problem is in what I am doing.
I've tried to test some pieces of the JavaScript code of the extension, and found out that e.g. google.language.translate("Hello world!", "en", "de",callbackResult) responds with a JSON object {"status":{"code":403,"message":"Please use Translate v2. See http://code.google.com/apis/language/translate/overview.html"},"error":{"code":403,"message":"Please use Translate v2. See http://code.google.com/apis/language/translate/overview.html"},"translation":""}. 91.198.201.28 10:54, 3 August 2012 (UTC)Reply
I've wrote a JavaScript module that uses Google API v2 and emulates the behaviour of Google API v1. The extension works now with Google API v2. How do I submit my code? Eraeshaes (talk) 10:49, 8 August 2012 (UTC)Reply
Maybe this page will help you:
Uops, I just noticed the extension is not on Git, so I'll leave it to Jeroen to answer what is the best way. Helder 23:52, 9 August 2012 (UTC)
It is on git :) Jeroen De Dauw (talk) 15:34, 12 August 2012 (UTC)Reply

Does anyone have a working instance of the extension?

[edit]

Can anyone confirm that he has a working instance of Live Translate with Google API as of August 2012? I've been trying to make the extension work for some time now, but no matter how carefully I follow the instructions, it won't be able produce any automated translation of any word that is not in the translation memory. I've also read through the source code of the extension, and it seems that it relies on older Google API architecture that is not there anymore (see my older post (91.198.201.28‎10:54, 3 August 2012) in the discussion "Does the extension support Google Translate API v2?".).

Now I want to find out whether the problem is in what I am doing, or it is because the extension is not working anymore. Can anyone confirm that he uses this extension with Google Translate API and it works? 91.198.201.28 11:36, 7 August 2012 (UTC)Reply

how do I change the location of the translate buttons

[edit]

I hate the button on the top left when it screws up every first line. Can I put it the sidebar or in the site notice? Tbrophy19473 (talk) 19:51, 30 January 2014 (UTC)Reply

Use of "write" is deprecated. Use jQuery or mw.loader.load instead.

[edit]

Hello,

I have installed the extension on MW 1.26

I get a javascript error :

/wiki/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=o9C4rUCA:156

Use of "write" is deprecated. Use jQuery or mw.loader.load instead.

Thanks for your help 176.151.92.12 (talk) 12:58, 15 November 2016 (UTC)Reply