[haiku-development] Re: Proposal for Haiku locale resouses reorganization.

  • From: PulkoMandy <pulkomandy@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 30 Sep 2009 17:27:15 +0200

Le Wed, 30 Sep 2009 16:42:19 +0200, Oliver Tappe <zooey@xxxxxxxxxxxxxxx> a écrit:


Hi Jorge,

On 2009-09-30 at 15:56:58 [+0200], Jorge G. Mare <koki@xxxxxxxxxxxxx> wrote:

PulkoMandy wrote:
> This is simple to do, you can just copy the catkeys file, rename it to
> have a .txt extension, and put it in the proper directory in the
> image. This is designed so it's easy to create unofficial
> translations. But it would still be better to provide us with the
> files so we can integrate them in the official distribution :)
>

This approach will preclude many non-devs from contributing to the
translation/localization effort, and will most probably put too much
burden on developers.

I must admit that I don't even understand what exactly is meant by
PulkoMandy's statement (Adrien: no offense meant). So I guess you certainly
have a point there ;-)

Forgive me for what may be a dumb question (or even what some may see as
a sacrilegious question!), but why wouldn't Haiku use the same approach
as Zeta, where a purely text-based translation catalog approach was
used? This would make localization a lot more accessible to a lot more
people.

But it *is* text-based! Basically, a *.catkeys file is just a tab-delimited
text file. It should be possible to open it via the csv-import feature of
your favourite spreadsheet, too.

cheers,
        Oliver


There are two different catalog formats handled in Haiku :
The catkeys file are tab-delimited text files, they are what you will find in the svn source tree. They _can_ be used directly by renaming them to .txt and putting them in the right place. This is not the current solution, but it works. The catalog files are binary. They are faster to load (no parsing involved), and in theory, they can be included in executable as resources or attributes. This way you can have a single executable file with all languages bundled inside it, if you want it so. And you can still add more languages as separate files. Unfortunately, I haven't tested this feature yet, so I don't know if it works. If so, a decision between resources and attributes should be made and the buildsystem adjusted accordingly.

The purpose of the linkcatkey tool is to convert from the .catkeys format (text) to .catalog (binary), and write its output either as a plain file, attribute or resource in an executable.

--
Adrien Destugues / PulkoMandy
http://pulkomandy.ath.cx

Other related posts: