11

Getting tired of the poor editing capabilities of software like OmegaT, I would like to know if there is a way to turn Emacs into a CAT (Computer-Assisted Translation) tool. I was thinking about writing a major-mode, but feel free to share your ideas.

Basically, this is what I need:

  • Emacs must be able to identify a segment (i.e.: a sentence ending with a full stop) already translated and suggest the translation. This implies the creation of a translation memory (a .tmx file, for example) which contains all the original segments and the translated segments;
  • The translator must be able to create and edit a glossary of terms and Emacs should suggest the translation if the term is in the current segment;
  • Emacs should be able to recognize the formatting of the original file (i.e.: bold, italic, different fonts size, tables) in order to keep the formatting as close as possible to the original file when exporting the translation;
  • Emacs should ideally be able to export the translated document into the same format as the original.

Are any of these requirements actually possible or am I just hoping for something out of reach?

ebpa
  • 7,319
  • 26
  • 53
Boccaperta-IT
  • 1,556
  • 11
  • 24
  • 4
    Well it's all *possible*, but very likely not all *practical*. If you're hoping for someone to write this *for* you, that may be optimistic. For starters, I would suggest that document import/export processing not be implemented in elisp. Let Emacs deal with a single format, and use external tools (which Emacs could call) to convert between formats. In fact I would suggest in general making as much use as possible of pre-existing applications. Emacs is pretty good at gluing things together, though, so maybe it's a viable project. – phils Oct 23 '14 at 12:59
  • Oh no, I don't need anyone to write it for me. I'm thinking about writing it myself (should have made it clearer in the question, sorry, I edited it.) What I need is suggestions and ideas from the expert here. I need to understand whether this is a feasible project or not. – Boccaperta-IT Oct 23 '14 at 13:02
  • 1
    I'm not very familiar with [`po-mode`](https://www.gnu.org/software/gettext/manual/html_node/PO-Mode.html) but the Info pages look like it would provide some vaguely relevant functionality. – tripleee Oct 23 '14 at 14:27
  • That only works with .po files. It's a start, but surely not enough to cover all the requirements I need. – Boccaperta-IT Oct 23 '14 at 15:18
  • 1
    Re: formats, probably Org-mode is the way to go. Re: other requirements, to me it seems doable (I toyed with an idea of writing something like this a long time ago, though I realize now that my elisp-fu might not be enough for that). I second the idea of using other (cli) tools and having Emacs just glue them in a nice interface. – mbork Oct 26 '14 at 21:03
  • 1
    Suggestions and ideas aren't a great fit for StackExchange `;)` This would be better to ask on http://reddit.com/r/emacs – Sean Allred May 11 '15 at 19:36
  • 1
    @Boccaperta-IT Any progress with the project? – Sati Aug 19 '19 at 15:53
  • 1
    I am very late to this topic. But, did you manage to write any Emacs package for omegat? If yes. Where is it? If no, what was your solution to the issue? I am also interested in seeing Emacs-OmegaT integration. – Achylles Mar 12 '20 at 13:21

1 Answers1

1

It's definitely possible. You might need to be careful about performance (Emacs Lisp is no speed daemon), but other than that, it's a small matter of coding.

Stefan
  • 26,154
  • 3
  • 46
  • 84