emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org-odt-export-to-odt: hide text


From: Eric Abrahamsen
Subject: Re: [O] org-odt-export-to-odt: hide text
Date: Sun, 07 Jul 2013 11:32:49 +0800
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

Daniel Clemente <address@hidden> writes:

> El Sat, 6 Jul 2013 13:03:01 +0200 Suvayu Ali va escriure:
>> 
>> If you or any other user wants this kind of feature, you have to come up
>> with a syntax that is not intrusive and doesn't break basic Org
>> features.
>> 
>
>   I created such a syntax for normal text files [1] but have been
> struggling to port it to Org, mainly because of the „header“ concept.
>   I want translatable content in headers and text inside headers but
> without ever having to distort the outline structure (e.g. duplicate
> headers, missing titles, …).
>   I see two solutions:
>
>   1)
>   If only we had „part-of-line drawers“ we could annotate titles directly:
>
> * @ENGLISH{Section 1} @SPANISH{Sección 1}
> :ENGLISH:
> Section 1 is in English
> :ENGLISH:
>
> :SPANISH:
> La sección 1 está en español
> :SPANISH:
>
> ** 123
> etc. (more translatable content)
> ** 456
>
>   2)
>   We could do the same with a property which means „if drawer X is
> visible, use this property's value as the title of this section“.
> E.g.:
>
> * the first section (this title isn't used)
>   :PROPERTIES:
>   :TITLE_ENGLISH: Section 1
>   :TITLE_SPANISH: Sección 1
>   :END:
>
> :ENGLISH:
> Section 1 is in English
> :ENGLISH:
>
> :SPANISH:
> La sección 1 está en español
> :SPANISH:
>
> ** 123
> etc. (more translatable content)
> ** 456
>
>
>
>   Just some ideas for anyone who has the time to come up with a multilingual 
> export engine.
>
>
> [1]: http://www.danielclemente.com/dislines/syntax.en.html

I came up with the basics of an automated translation system, that could
be turned into this. The problem is that I only work from Chinese to
English, so I never got around to multilingual support, nor does it
support tagging or blocking out specific strings to translate.

You put your translation table in an org table, and there's a command to
slurp that into a hashtable. The translation commands just whizz through
the text and swap strings, basically. You can do subtree/region/file,
tag subtrees to translate or not to translate, and there are interactive
(a la query-replace) and noninteractive (for use as an export hook)
versions.

Work on it stalled because I do less translation these days. The core of
it's fairly solid, though, and I'd be happy to push it in whatever
direction people would find useful. The next step would be settling on
syntax: right now you can just leave arbitrary strings in the text, and
anything that matches a term from the dictionary will get translated.
That's only useful when you're essentially just translating a whole file
from one language into another. I'll take a look at the syntax link
above.

Yours,
Eric




reply via email to

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