"pelzflorian (Florian Pelz)" <pelzflor...@pelzflorian.de> skribis:
> On Sun, Jul 14, 2019 at 04:12:41PM +0200, Ludovic Courtès wrote: >> Note that “lego translation” is what we should _not_ do because it gives >> translators fragments of sentences, which does not allow them to >> correctly translate text. >> > > Format strings are something we can try. If they are too fragmented > for translators, we can still use a custom tool to convert them and > their fragments to a single string which gets passed to gettext. Yes. Another option would be to locally use XML in strings, along these lines: --8<---------------cut here---------------start------------->8--- (use-modules (sxml simple) (ice-9 match)) (define (X_ str) (match (xml->sxml (string-append "<BODY>" (gettext str) "</BODY>")) (('*TOP* ('BODY . lst)) lst))) `(div ,@(X_ "This is <a href=\"/foo\">a link</a>.")) --8<---------------cut here---------------end--------------->8--- That would allow us to remain string-oriented while still enjoying the benefits of SXML (info "(guile) Types and the Web"). Maybe we’ll need a combination of format strings and stuff like that. Thanks, Ludo’.