guix-devel
[Top][All Lists]
Advanced

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

Re: Website translation


From: Julien Lepiller
Subject: Re: Website translation
Date: Mon, 15 Jul 2019 16:57:34 +0200
User-agent: K-9 Mail for Android

Le 15 juillet 2019 14:33:25 GMT+02:00, "Ludovic Courtès" <address@hidden> a 
écrit :
>"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’.

Fyi, I sent a patch a few months ago to do exactly that, but I can't find it 
anymore…



reply via email to

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