[Top][All Lists]

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

Re: Website translations with Haunt

From: pelzflorian (Florian Pelz)
Subject: Re: Website translations with Haunt
Date: Fri, 15 Dec 2017 15:25:01 +0100
User-agent: NeoMutt/20171208

On Fri, Dec 15, 2017 at 12:06:28PM +0000, ng0 wrote:
> Christopher Lemmer Webber transcribed 1.4K bytes:
> > pelzflorian (Florian Pelz) writes:
> > 
> > > I want to ask for your thoughts on my new solution since translations
> > > are probably important to many Haunt users.  In particular, I believe
> > > there was some discussion on Website translation on the Guile or Guix
> > > lists as well.
> > 
> > And not just important to Haunt... many sxml using projects!
> What's the difference (except for the visible syntax/writing) between
> SXML and XML? When I've looked into translations not just prep came to
> my mind but XML has native translation support - just no one wants to
> work with plain XML when it can be avoided ;)
> Is there a chance that we can make use of this native translation ability
> while staying user friendly?
> It's been really long since I've looked into this, so excuse the gap of 
> knowledge
> and fuzzy "what if..."s.

I found only this [1] for XML native translation support.

IMHO it should be up to the SHTML author to specify the lang attribute
etc.  But the lang attribute and perhaps text direction should
be used when writing example code or default styles.

About the marking of translations: I prefer explicitly marking the
strings that should be translated instead of including all of them in
the Gettext pot file.  Explicit markings are flexible which I believe
is good when interleaving SHTML code with Scheme procedures.

The w3 document [1] from above recommend extracting every element
content that is not marked as its:translate="no" by default.  It is
however difficult to automatically decide which parts of a Scheme file
are (S)HTML and which parts are not, so I do not like this approach.
Also often an element’s attributes need translation and sometimes the
text content does not.

In GTK+ UI files, which are XML, each tag can be marked with a
translatable="yes" attribute.  Gettext then extracts each marked
string into the pot file.  (Although the Glade UI designer
automatically adds translatable=yes to all elements with text.  As
above, this would make autodetection difficult when other Scheme code
is part of the file.)

I also prefer the much shorter _ syntax that is common for Gettext
rather than a translatable=yes attribute because SHTML is usually
written manually.

tl;dr I would rather not use this “implicit” marking in Haunt.



Attachment: signature.asc
Description: PGP signature

reply via email to

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