emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: org-odt-export-to-odt: hide text
Date: Sun, 07 Jul 2013 11:32:49 +0800	[thread overview]
Message-ID: <87fvvr11um.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 87k3l31von.wl%n142857@gmail.com

Daniel Clemente <n142857@gmail.com> 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	other threads:[~2013-07-07  3:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-05 12:17 org-odt-export-to-odt: hide text Uwe Brauer
2013-07-05 17:07 ` Eric S Fraga
2013-07-05 17:22   ` Uwe Brauer
2013-07-05 17:40     ` Eric S Fraga
2013-07-05 19:26       ` Uwe Brauer
2013-07-06  7:13         ` Suvayu Ali
2013-07-06  8:37           ` Uwe Brauer
2013-07-06 11:03             ` Suvayu Ali
2013-07-06 16:48               ` Daniel Clemente
2013-07-07  3:32                 ` Eric Abrahamsen [this message]
2013-07-07  8:04                   ` Suvayu Ali
2013-07-07  8:48                   ` Daniel Clemente
2013-07-06  9:52           ` Christian Moe
2013-07-07  7:23 ` Rustom Mody
2013-07-07  8:05   ` Suvayu Ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvvr11um.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).