guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Website translation


From: Ludovic Courtès
Subject: Re: Website translation
Date: Mon, 15 Jul 2019 14:33:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

"pelzflorian (Florian Pelz)" <address@hidden> 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]