> On Tue, 18 Aug 2020 at 18:33, andy pugh <[email protected]> wrote: > > > I have been thinking about this, and have the beginnings of an idea: > > https://paste.ubuntu.com/p/622bPmPVBQ/ > > And I have now made some progress with the idea. > https://github.com/LinuxCNC/linuxcnc/tree/andypugh/multilingual_comp > > It certainly isn't all there yet, and I suspect that the parsing of > the strings in to languages should be done in some cunning way in the > yapps parser. > > But: halcompile --show-doc=es src/hal/components/abs.comp will display > a Spanish manpage, and --show-doc=fr will show a French one. > > The current version tries to use a "languages" entry in the .comp, but > that doesn't look like it will work because of when that gets parsed. > A better plan is to see what other languages might exist in the file > when doing the default language. I know how to do that, but it's late > here. > > It might be worth re-thinking the format too, possibly this would > parse more robustly. > > pin out float out """Analog output value, always positive > <_fr> Valeur de sortie analogique, toujours positive</_fr> > <_es> Valor de salida analógica, siempre positivo</_es>""";
In C " is used to enclose strings and \ is used as an escape character. > Or a more asciidoc-like > > pin out float out """Analog output value, always positive" > :lang: fr Valeur de sortie analogique, toujours positive > :lang: es Valor de salida analógica, siempre positivo"""; It might be worth looking at VHDL to get an idea or maybe at netlist formats. _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
