[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Translating to Chinese, Spanish and Japanese (and more)
From: |
Ricardo Wurmus |
Subject: |
Re: Translating to Chinese, Spanish and Japanese (and more) |
Date: |
Mon, 05 Feb 2018 18:21:18 +0100 |
User-agent: |
mu4e 1.0-alpha3; emacs 25.3.1 |
pelzflorian (Florian Pelz) <address@hidden> writes:
> On Mon, Feb 05, 2018 at 01:26:04PM +0100, Ricardo Wurmus wrote:
>> Simple XML might be a better candidate for a DSL. Translators would get
>> a string like “<link>Installation instructions</link>.” and give us back
>> a translated string such as “<link>安装说明</link>。” On the haunt side
>> we would have a procedure that parses the XML to SXML and we could
>> operate on the S-expression. So instead of this:
>>
>
> Ah, that is what you mean by XML. I used "link|Installation
> instructions" for that, but yes, maybe XML is easier to understand /
> more familiar for translators.
What’s good about using XML is that we already have parser and tooling
support for it. It can even be nested (though you shouldn’t go
overboard with it), which may sometimes be necessary, and we can easily
and programmatically access individual parts of the XML tree with sxpath
and the like.
> I believe this Gettext support should be separate from Haunt so it can
> be reused e.g. for Web servers written in Guile.
Yes, I agree. After playing with it for a while on the train it looks
like it could be implemented without modifying Haunt at all.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
- Translating to Chinese, Spanish and Japanese (and more), Pjotr Prins, 2018/02/05
- Re: Translating to Chinese, Spanish and Japanese (and more), julien lepiller, 2018/02/05
- Re: Translating to Chinese, Spanish and Japanese (and more), Ricardo Wurmus, 2018/02/05
- Re: Translating to Chinese, Spanish and Japanese (and more), pelzflorian (Florian Pelz), 2018/02/05
- Re: Translating to Chinese, Spanish and Japanese (and more),
Ricardo Wurmus <=
Re: Translating to Chinese, Spanish and Japanese (and more), Ludovic Courtès, 2018/02/05