Re: Translation design patterns or approaches

2024-11-09 Thread Oliver Corff via GNU roff typesetting system discussion
Hi Bento, have a look at groff_mm and search for the section "Localization". There you'll find more information. Usually, if you specify the language on the command line as indicated in man groff_mm, then you will not need any control over conditional loading of macro files. The manual explains

Re: Translation design patterns or approaches

2024-11-09 Thread G. Branden Robinson
Hi Bento, At 2024-11-09T16:34:21-0300, Bento Borges Schirmer wrote: > Hey Oliver, > > Em sex., 8 de nov. de 2024 às 19:05, Oliver Corff via GNU roff > typesetting system discussion escreveu: > > Check, e.g. the macro files trans.tmac, de.tmac, sv.tmac, cs.tmac, > > fr.tmac etc.in /usr/share/grof

Re: Translation design patterns or approaches

2024-11-09 Thread Bento Borges Schirmer
Hey Oliver, Em sex., 8 de nov. de 2024 às 19:05, Oliver Corff via GNU roff typesetting system discussion escreveu: > Check, e.g. the macro files trans.tmac, de.tmac, sv.tmac, cs.tmac, > fr.tmac etc.in /usr/share/groff/1.23.0/tmac > > They demonstrate the mechanism how you can use string macros wi

Re: Translation design patterns or approaches

2024-11-08 Thread Oliver Corff via GNU roff typesetting system discussion
Hi, in my humble opinion, a solution to your problem (if I understood it correctly) already exists. Perhaps a good starting point for writing useful macros which output the desired text according to language is the macro repository of groff. Check, e.g. the macro files trans.tmac, de.tmac, sv.tm

Re: Translation design patterns or approaches

2024-11-08 Thread Bento Borges Schirmer
Hey Adam and onf, Thanks for the suggestion about po4a, it is good to know such thing exists. But I didn't find any examples about it and I was not in the mood to understand it, so I tried to be creative! I kludged together the switch case example from groff documentation [1] and now I have this

Re: Translation design patterns or approaches

2024-11-08 Thread Adam Sampson
Bento Borges Schirmer writes: > I want to translate my CV to english. [...] Do you know any design > pattern, macro set or preprocessor that could handle this task in a > manageable way? po4a (https://po4a.org/, packaged in most distributions already) is one approach to this -- you write the doc

Re: Translation design patterns or approaches

2024-11-07 Thread onf
Hi Bento, On Thu Nov 7, 2024 at 7:38 PM CET, Bento Borges Schirmer wrote: > I want to translate my CV to english. The simplest option would be to copy > my document and just alter it. It would be no headache, since it is just > one page. But maybe there is a smarter way? > > Do you know any design