Extension talk:Live Translate/Flow

About this board

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

1
176.151.92.12 (talkcontribs)

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

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

how do I change the location of the translate buttons

1
Tbrophy19473 (talkcontribs)

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?

Reply to "how do I change the location of the translate buttons"

Does the extension support Google Translate API v2?

7
91.198.201.28 (talkcontribs)

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.

Jeroen De Dauw (talkcontribs)

IIRC the latest version is using v2 of the API.

91.198.201.28 (talkcontribs)

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":""}.

Eraeshaes (talkcontribs)

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?

Reply to "Does the extension support Google Translate API v2?"

Does anyone have a working instance of the extension?

1
91.198.201.28 (talkcontribs)

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?

Reply to "Does anyone have a working instance of the extension?"

Timing out or not working

5
Stampstudy (talkcontribs)

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

91.198.201.28 (talkcontribs)

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.

Stampstudy (talkcontribs)

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.

91.198.201.28 (talkcontribs)

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?

90.175.175.206 (talkcontribs)

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!!

Reply to "Timing out or not working"

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

1
91.198.201.28 (talkcontribs)

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.

Reply to "Local translation memory OK, machine translation doesn't work."

Um im newish to mediawiki and it wont install at all

5
72.70.210.5 (talkcontribs)

this wont install and it keeps giving me a database error :/ can you please help me?

He7d3r (talkcontribs)

Could you provide us more deailed information? What is the error you are seeing? Which version of MediaWiki are you using?

Jeroen De Dauw (talkcontribs)

Did you run /maintenance/update.php as described in the installation instructions?

72.70.210.5 (talkcontribs)

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

Jeroen De Dauw (talkcontribs)

Did you run /maintenance/update.php as described in the installation instructions?

Looks like you did not.

Reply to "Um im newish to mediawiki and it wont install at all"

Installation Error - Problem running update.php

2
2.136.82.183 (talkcontribs)

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

Jeroen De Dauw (talkcontribs)

This seems to be an issue with your MW install loose from this extension. I suggest you ask on the wikitech mailing list.

Reply to "Installation Error - Problem running update.php"

Compatibility version 1.2 with mediawiki 1.17 issue

7
Eurodomenii (talkcontribs)

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
    • My workaround, downgrade.. MW 1.17 with LiveTranslate 1.1.1 works just fine!
Jeroen De Dauw (talkcontribs)

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.

Eurodomenii (talkcontribs)

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!

Jeroen De Dauw (talkcontribs)

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.

Eurodomenii (talkcontribs)

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!

BrettFerguson (talkcontribs)

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.

Reply to "Compatibility version 1.2 with mediawiki 1.17 issue"

Publication of unedited machine translations

14
Lloffiwr (talkcontribs)

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?

Jeroen De Dauw (talkcontribs)

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).

Lloffiwr (talkcontribs)

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?

Jeroen De Dauw (talkcontribs)
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 :)

Lloffiwr (talkcontribs)

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?

Jeroen De Dauw (talkcontribs)
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.

Lloffiwr (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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?

Yaron Koren (talkcontribs)

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."

Lloffiwr (talkcontribs)

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'.

Yaron Koren (talkcontribs)

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.

Reply to "Publication of unedited machine translations"
Return to "Live Translate/Flow" page.