guix-devel
[Top][All Lists]
Advanced

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

Re: Web site i18n with Haunt


From: pelzflorian (Florian Pelz)
Subject: Re: Web site i18n with Haunt
Date: Fri, 9 Feb 2018 18:47:45 +0100
User-agent: NeoMutt/20171208

On Fri, Feb 09, 2018 at 06:02:22PM +0100, Ludovic Courtès wrote:
> […]
> Awesome.  There were a couple of people interested in internationalizing
> our web site during the Guix workshop, so hopefully they can follow your
> lead and ping you if they need help!
> 
> Ludo’.

Gladly.  But perhaps others also have better ideas for how to do
it. ;) In particular, independent from Haunt, using XML for
translation strings as Ricardo proposed would look more familiar to
translators (and my own __ macro’s implementation is buggy for corner
cases and could certainly be simplified and cleaned up).  This must be
decided and written before the Guix website can be properly
internationalized.

How for example would this excerpt from my website better be rendered
as XML or is this or another non-XML approach better?


(p ,@(__ "Thank you for your interest in my workshop \
“GUI Programming with GTK+”. ||register_|To register please go |here|. ||For \
more information see ||link_|here||."
         `(("register_" .
            ,(lambda (before-link link-text after-link)
               (if enable-registration
                   `(span
                     ,before-link
                     ,(a-href
                       "/gui-prog-anmelden/"
                       link-text)
                     ,after-link)
                   "")))
           ("link_" .
            ,(lambda (text)
               (a-href
                (poster-url-for-lingua current-lingua)
                text))))))

Some people also had preferred automatic extraction of strings instead
of marking each one.  If this were to be done, it would need support
in Haunt itself.  However, false positives could not be avoided when
automatically looking for what strings to extract.

Also Haunt’s design is not complete.  I’m not entirely sure about my
patches’ approach regarding Atom feeds, and blog post layouts are
definitely a problem – layouts should take the file name as an
argument somehow.

Other tooling like what sirgazil proposed here
https://lists.gnu.org/archive/html/guile-devel/2017-12/msg00051.html
might also be desirable but is not urgent.  It probably should not be
part of Haunt but an external library just like __.

Then this all needs documentation.

Regards,
Florian

Attachment: signature.asc
Description: PGP signature


reply via email to

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