Re: [O] org-odt-export-to-odt: hide text
> > 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. > This is the usual gettext approach, which centralizes translations in a file (or table). When you change the original, your strings won't be found and you must update the translation table. I prefer the approach of having a phrase's translations together, so that you when you make a change you can update the translations from the same place. An overlay system in Emacs could show only „the current language“ and hide the others, then with some keys you could cycle through languages. I think this is something that can be done at an Emacs level (since it's for any text file), and org can simply use it.
Re: [O] org-odt-export-to-odt: hide text
Hello Rustom, On Sun, Jul 07, 2013 at 12:53:19PM +0530, Rustom Mody wrote: > > ie make a buffer (needs to be visiting a file) containing > OM > and call rpm-apply-iinput-method > and you should get a buffer containing > ॐ > Beautiful! I'll fool around with this a bit. -- Suvayu Open source is the future. It sets us free.
Re: [O] org-odt-export-to-odt: hide text
On Sun, Jul 07, 2013 at 11:32:49AM +0800, Eric Abrahamsen wrote: > Daniel Clemente writes: > > > 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. May I just say, this is why I absolutely love this list/community; I write a longish part-rant part-explanation response, and that triggers such an interesting discussion. Amazing! -- Suvayu Open source is the future. It sets us free.
Re: [O] org-odt-export-to-odt: hide text
Hi, I have written something that may be useful to some and is somewhat complementary to what is being discussed here. [Well 'written' is not quite accurate -- Nick and Stefan helped me get it together] Its a transliteration system that Ive used with the itrans devanagari (ie Hindi/Sanskrit etc) I expect that in any language in which 1. there is a somewhat accepted standard roman form 2. that roman form is available as an emacs input method 3. the roman is easier to write but painful (for natives of course!!) to read this will be useful ie make a buffer (needs to be visiting a file) containing OM and call rpm-apply-iinput-method and you should get a buffer containing ॐ Regards Rusi -- http://www.the-magus.in http://blog.languager.org apply-input-method.el Description: Binary data
Re: [O] org-odt-export-to-odt: hide text
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
Re: [O] org-odt-export-to-odt: hide text
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
Re: [O] org-odt-export-to-odt: hide text
Hello Uwe, On Sat, Jul 06, 2013 at 10:37:07AM +0200, Uwe Brauer wrote: > > While I would like to have some tags which I could toggle on and off, > for example in the example of Eric, I would just substitute > the tag :noexport: for :export: If you want to use tags, but then say you would prefer not to have headlines, don't you think it is contradictory? This kind of expectation has come up again and again over the years in different forms. To add meta data to a block of text (which is how I view tagging, or properties) you either need XML like enclosing tags or a headline (as Org does), bearing in mind it has to be plain text. I do not think there is any other clean way to implement this other than the way it is presently. To explain with some examples: Org markup syntax like, *bold*, /italics/, etc, can be considered XML like enclosing tags (simplified to a great extent), and tags, properties, TODO keywords, priorities, etc are examples of the headline based division. 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. Hope this helps you, and future users, better understand the relevant issues. Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] org-odt-export-to-odt: hide text
Suvayu Ali writes: > On Fri, Jul 05, 2013 at 09:26:22PM +0200, Uwe Brauer wrote: >> the issue is I want to write say one paragraph in Spanish >> and the next in German, again spanish then German, etc >> but the odt file should only display one language. Try drawers: --8<--- #+title: Using drawers to display one language at a time #+drawers: ENGLISH SPANISH GERMAN #+options: d:("ENGLISH" "GERMAN") :ENGLISH: We can use drawers to display one language at a time, paragraph by paragraph. The Spanish is currently hidden in export. To display it, add "SPANISH" to the list after the `d:' option. :END: :SPANISH: ¿Que tal? :END: :GERMAN: Wie geht es? :END: --8<--- Yours, Christian
Re: [O] org-odt-export-to-odt: hide text
>> "Suvayu" == Suvayu Ali writes: > On Fri, Jul 05, 2013 at 09:26:22PM +0200, Uwe Brauer wrote: >> >> the issue is I want to write say one paragraph in Spanish >> and the next in German, again spanish then German, etc >> but the odt file should only display one language. > Why are you not using Org comments? > Visible text, exported > # Org comment, not exported > Hope this helps, this works, of course, thanks! The only issue is if I want to export say either only Spanish or only German, than this approach needs to delete and replace the comments manually. But ok, better than nothing. That is Spanish is exported # german is not exported. # spanish not German is exported. While I would like to have some tags which I could toggle on and off, for example in the example of Eric, I would just substitute the tag :noexport: for :export: However his approach needs to set headers before the text. Anyhow thanks for you help. Uwe smime.p7s Description: S/MIME cryptographic signature
Re: [O] org-odt-export-to-odt: hide text
On Fri, Jul 05, 2013 at 09:26:22PM +0200, Uwe Brauer wrote: > On 07/05/2013 07:40 PM, Eric S Fraga wrote: > > #+begin_comment ... #+end_comment? > does not work, the odt file contains > > #+begin_comment > > my text > > #+end_comment ? > > the issue is I want to write say one paragraph in Spanish > and the next in German, again spanish then German, etc > but the odt file should only display one language. Why are you not using Org comments? Visible text, exported # Org comment, not exported Hope this helps, -- Suvayu Open source is the future. It sets us free.
Re: [O] org-odt-export-to-odt: hide text
On 07/05/2013 07:40 PM, Eric S Fraga wrote: #+begin_comment ... #+end_comment? does not work, the odt file contains #+begin_comment my text #+end_comment ? the issue is I want to write say one paragraph in Spanish and the next in German, again spanish then German, etc but the odt file should only display one language. smime.p7s Description: S/MIME Cryptographic Signature
Re: [O] org-odt-export-to-odt: hide text
Maybe use #+begin_comment ... #+end_comment? -- Composed on a very small pocket computer. Please excuse the brevity.
Re: [O] org-odt-export-to-odt: hide text
>> "Eric" == Eric S Fraga writes: > Uwe Brauer writes: >> Hello > I'm not sure if I have misunderstood your question or not but you can > easily exclude whole subtrees from export by, for instance: > #+title: The title > #+EXPORT_EXCLUDE_TAGS: noexport > * Introduction > some text which will appear in the exported document. > * Private stuff :noexport: > this will never appear in the exported document. > Exporting this will include the first headline and contents but not > the second. This is regardless of export target. Is this what you > wanted? Almost. Is this also possible without a header? I tried but it did not work. I mean something like this: - This text will appear. secret text smime.p7s Description: S/MIME cryptographic signature
Re: [O] org-odt-export-to-odt: hide text
Uwe Brauer writes: > Hello > > Is there a possiblity to hide text in a org file, such then it is not > displayed (or does not appear) in the odt file, I generated using > org-odt-export-to-odt? I'm not sure if I have misunderstood your question or not but you can easily exclude whole subtrees from export by, for instance: --8<---cut here---start->8--- #+title: The title #+EXPORT_EXCLUDE_TAGS: noexport * Introduction some text which will appear in the exported document. * Private stuff :noexport: this will never appear in the exported document. --8<---cut here---end--->8--- Exporting this will include the first headline and contents but not the second. This is regardless of export target. Is this what you wanted? -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.3-324-gb61ef4
[O] org-odt-export-to-odt: hide text
Hello Is there a possiblity to hide text in a org file, such then it is not displayed (or does not appear) in the odt file, I generated using org-odt-export-to-odt? thanks Uwe Brauer