From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: org-odt-export-to-odt: hide text Date: Sun, 07 Jul 2013 11:32:49 +0800 Message-ID: <87fvvr11um.fsf@ericabrahamsen.net> References: <87wqp5yzdy.fsf@gilgamesch.quim.ucm.es> <87ip0prl49.fsf@ucl.ac.uk> <8761woexb0.fsf@mat.ucm.es> <51D71DDE.8000606@mat.ucm.es> <20130706071308.GA4661@kuru.dyndns-at-home.com> <871u7c2ifg.fsf@mat.ucm.es> <20130706110301.GB4661@kuru.dyndns-at-home.com> <87k3l31von.wl%n142857@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvfiS-00027o-6D for emacs-orgmode@gnu.org; Sat, 06 Jul 2013 23:32:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvfiR-00064D-3C for emacs-orgmode@gnu.org; Sat, 06 Jul 2013 23:32:48 -0400 Received: from plane.gmane.org ([80.91.229.3]:48520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvfiQ-000647-SW for emacs-orgmode@gnu.org; Sat, 06 Jul 2013 23:32:47 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UvfiO-0004gu-F1 for emacs-orgmode@gnu.org; Sun, 07 Jul 2013 05:32:44 +0200 Received: from 114.250.115.98 ([114.250.115.98]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Jul 2013 05:32:44 +0200 Received: from eric by 114.250.115.98 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Jul 2013 05:32:44 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Daniel Clemente 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