[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs as a translator's tool

From: Eric Abrahamsen
Subject: Re: Emacs as a translator's tool
Date: Fri, 18 Sep 2020 12:08:28 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

[Dropping other people off cc as they might not want to stick with a
pretty old thread]

Arthur Miller <> writes:

>> -------- Originalmeddelande --------
>> Från: Eric Abrahamsen <>
>> Datum: 2020-09-17 20:27 (GMT+01:00)
>> Till: arthur miller <>
>> Kopia: Jean-Christophe Helary <>,
>> help-gnu-emacs <>, Emanuel Berg <>, 
>> Yuri
>> Khan <>
>> Ämne: Re: Emacs as a translator's tool
>> arthur miller <> writes:
>>> Sure, no rush at all. By the way, the original source is a book in pdf 
>>> format.
>> Ha, this package won't do much at all, then! The main point is having
>> source and translation together in the same buffer, and keeping
>> correspondences between locations and glossary items. If the source
>> isn't in Emacs at all, I don't think it will do much for you.
> Ok, text extracted fine; I am not sure how to use the tool yet; but at
> least I can repport that when I tried to enable org-translate-mode I got
> error:
> Symbol’s value as variable is void:org-export-filter-body-functions
> That was solved by (require 'ox). I don't know if ox is supposed to be
> included by default or not, but seems to solve it.

Oops, thanks, I'll add that.

> After that mode started correctly (in my org file), and asked me if I
> wanted to index something:
> Project not yet segmented, segment now? (y or n) y
> You’re 0% done!
> I have downloaded the source file just few minutes ago, so I guess I
> have the latest version.
> Any pointer what to do next/how to use the tool? How should I setup the
> document so it can be used with the tool? How do I set the source file
> (extracted text), do I need to copy it manually or can I set it up as a
> file to be imported?
> Currently I try to follow the book layout as closely as possible, so I
> have a structure as this:
> * Chapter X
> ** p1
> ** p2
> ...
> ** pn
> *Chapyter Y
> ** pn+1
> ....

You can check the Commentary section of the file for the basics: right
now it expects three (at least) top-level Org headings, representing the
source text, translated text, and glossary. So you'd move your existing
translation under a new top-level heading, put the original source text
under a new top-level heading, and add a third top-level heading for the

How the package identifies which tree is which is very customizable, but
by default it looks for a ":source:" tag on the top heading of the
source tree, a ":translation:" tag on the top heading of the translation
tree, and a glossary where the heading text itself is just "Glossary".

If you're doing a book, I would then set `ogt-segmentation-strategy' to
the symbol 'paragraph. Then turn on the minor mode, which should segment
the source text. I've updated the library to also segment the
translation text, which will be important to you since you've already
done so much of it.

I'm sort of surprised that segmentation didn't error out before -- if
the code can't find a source tree, it should indicate an error.

Then use "C-M-n" to start a new segment in the translation text, and
"C-M-f" and "C-M-b" to move between segments. Or move around however you
like, and then hit "C-M-t" to update the source window to show the
location corresponding to where you are.

It's early days for this library, so please be patient! Thanks for being
willing to test it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]