On Thu, Jul 18, 2019 at 10:28:31PM +0200, pelzflorian (Florian Pelz) wrote: > Another option I would like the most is using a custom PO file writer > and MO file reader that generates a single msgid directly from the > original nested s-expression. Such a procedure seems nice to use, but > complicated to implement. >
I will try writing a custom xgettext that combines nested·s-expressions·that are marked for translation with G_ to·a·single·msgstr that gets written to the·PO·file. This combined string will not be part of the source code but will be generated from a nested sexp. The PO file containing the combined strings can then be translated as usual. For reading the translation, the combined msgstr will be constructed again by the marking procedure G_ and looked up by reading from an MO file. It will take me a few days and a MO file reader will still be missing. I suppose it would be easier to use for the sxml’s author who would not need to write special code to internationalize the sxml. Regards, Florian