After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 595084 - Automatic and memory translation
Automatic and memory translation
Status: RESOLVED OBSOLETE
Product: gnome-subtitles
Classification: Other
Component: general
latest
Other Linux
: Normal enhancement
: ---
Assigned To: Maintainers of GNOME subtitles
Maintainers of GNOME subtitles
: 579253 620634 (view as bug list)
Depends on:
Blocks: 579253
 
 
Reported: 2009-09-13 17:14 UTC by yogaxpto
Modified: 2018-09-21 16:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bash Script to access google translate and another online translation database (6.04 KB, application/x-shellscript)
2009-12-27 20:18 UTC, Eamon
  Details
Patch proposing solution fo translating a single subtitle using Google Translate service. (17.53 KB, patch)
2011-03-20 14:36 UTC, D Krkoska
none Details | Review
Patch adding automatic translation functionality, changed according to Pedro's issues. (24.30 KB, patch)
2011-03-26 18:11 UTC, D Krkoska
accepted-commit_now Details | Review

Description yogaxpto 2009-09-13 17:14:10 UTC
It would be good that Gnome Subtitles could have automatic translation...
That feature could save a lot of time to Gnome Subtitle's users.
Comment 1 LoLDog 2009-10-04 17:32:41 UTC
http://tinytm.sourceforge.net/en/faq/index.html

I did a quick search for "memory translation" and tinyTM powered by an PostgreSQL Database was the first thing that I found.

The program could be the backbone for an advance feature that only needs to call the tinyTM and feed it with information. 

By the way as it uses PostgreSQL it can also do searchs online and I think that there are other solutions that could even suit better these need maybe with a MySQL database.

information source:
http://en.wikipedia.org/wiki/Translation_memory

ps: To add this feature could be easy as writing bindings to another application that does the job for now.
Comment 2 LoLDog 2009-10-04 17:39:00 UTC
Sorry, I forgot the biggest memory translation engine that there is, the google translation if there is no other way the fastest way to implement this is to let the program talk to google and get google to do it :)
Comment 3 Eamon 2009-12-27 20:18:33 UTC
Created attachment 150469 [details]
Bash Script to access google translate and another online translation database
Comment 4 Eamon 2009-12-27 20:19:45 UTC
I second this. In fact I was about to open a new feature request for it.
I also think google is a great resource to use. I know that manually google
translating took me all of 2 minutes and did indeed save lots of time.
I did a bit of digging and came up with a bash script that can access google
translate as well as 'internal dictionaries.' Here is the link:
http://savannah.nongnu.org/projects/twandgtw/ 
This is probably not the only project, but I think that it may provide a good
reference.
I have attached the bash script here!
Comment 5 Pedro Castro 2010-06-07 23:54:55 UTC
*** Bug 620634 has been marked as a duplicate of this bug. ***
Comment 6 A. G. Luz 2010-06-11 13:02:23 UTC
I second this, too. I'm a professional translator and TM are really useful for us. BUT since it seems hard to implement, CSV files would do!
I need to be able to use my CSV files (converted from TM files) on Gnome-subtitles. Whenever we have an word ocurrence found, we have a word in Bold or Italic. Then we click on it and we'll have the definition for the word like we do in TM.

I'll start making mockups for Gnome-subtitles so that the developers can understand us easier.

Pedro Castro. You're really good!

Thank you.
Comment 7 Pedro Castro 2010-07-11 22:15:47 UTC
Thank you Andrius,

It isn't clear to me, yet, if automatic translation (using Google Translate)
and translation memory can have the same kind of GUI or a separate mechanism.
Backends like Google's work with complete sentences, however TM will translate
only sets of words it has stored. Does it make sense to have a "translate all"
feature with TM (what will it do with unrecognized words?).
Comment 8 Pedro Castro 2010-11-07 17:31:13 UTC
Merging with bug #579253 - Memory translation as we're talking about the same thing here. Existing ideas there must be taken into account too.
Comment 9 Pedro Castro 2010-11-07 17:31:56 UTC
*** Bug 579253 has been marked as a duplicate of this bug. ***
Comment 10 LoLDog 2010-12-12 05:16:30 UTC
Libtranslate from gnome uses Google translate I think.

How to implement it?

I was thinking about how search&replace works, they highlight the word they found and you click on the button "replace" if it is ok, and of course there is the button "replace all" in this case should be "translate all" which will give you a not perfect translation that people still need to to through.

Also if you highlight something and right click there could be a "translate this", like when you highlight HTML in Firefox and right click and in the menu appears "view selected source-code".

It doesn't need to be fancy, anything right now is better then nothing.

Thanks for the great job.
Comment 11 Pedro Castro 2011-02-24 00:14:34 UTC
Assigning to David Krkoška.
Comment 12 D Krkoska 2011-03-20 14:36:09 UTC
Created attachment 183844 [details] [review]
Patch proposing solution fo translating a single subtitle using Google Translate service.

I implemented simple solution to translate a single subtitle automatically using Google Translate service. To use the function, you have to have both files (Text, Translation) opened and set spelling languages for both of it, because tranlation options are generated from given language pair.

Google Translate service itself gives some of the restrictions to the functionality, but nothing important for the start.

I tested it for spanish, english and german translations. Other language pairs haven't been tested so far. Any further testing would be appreciated.
Comment 13 Pedro Castro 2011-03-20 21:37:08 UTC
Thanks again for the patch David. Some comments:
- We should refrain from using popups as much as possible. I see at least 3:
  * No text/translation set: in this case, when clicking "Translate" GS could open the Set Text Language and/or Set Translation Language dialogs. The user then selects the languages to use in translation. If the user presses Cancel, no translation is done (but I don't think it's necessary to show a popup).
  * Nothing to be translated: I also think a popup isn't necessary in this case. I see it as "the translation of blank is blank". :-)
- Trying to translate a single line works marvelously. However, trying to translate all lines gave NullPointerException in TranslatorCommand.cs:58
- The menu items could be simplified to Tools->Translate Text and Tools->Translate Translation (the last one seems odd at first but I think the name works)

Cheers
Comment 14 D Krkoska 2011-03-26 18:11:44 UTC
Created attachment 184308 [details] [review]
Patch adding automatic translation functionality, changed according to Pedro's issues.

I've fixed patch for adding automatic translation. Asking for retesting please :-)

One thing needs to be mentioned: translating two or more subtitles at once is not supported yet (only when single subtitle is selected, then it is translated).
Comment 15 Pedro Castro 2011-04-10 21:27:00 UTC
Review of attachment 184308 [details] [review]:

Commited with changes.
Comment 16 Pedro Castro 2011-04-10 21:32:48 UTC
Patch commited, thanks again David. Be sure to take a look at the log for commit details:
http://git.gnome.org/browse/gnome-subtitles/commit/?id=082d0a19fd6d17a1fa157e915220fe4dbc960ce2

As a next step, I think the following improvements would greatly benefit from the developments made so far:
- Support translation of multiple subtitles
- Support multiple backend engines using libtranslate
Comment 17 Pedro Castro 2011-07-03 19:51:48 UTC
Translation support has been disabled as Google is deprecating GTrans till the end of the year and the current implementation isn't yet complete.
Gnome Subtitles should support multiple translation engines by the use of a library such as libtranslate, in order not to be dependent of a single translation provider.
Comment 18 GNOME Infrastructure Team 2018-09-21 16:04:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-subtitles/issues/32.