[haiku-development] Locale kit, add ons and header files

  • From: PulkoMandy <pulkomandy@xxxxxxxxx>
  • To: Haiku dev <haiku-development@xxxxxxxxxxxxx>
  • Date: Sat, 13 Jun 2009 21:42:06 +0200

Hello,
I have a little problem with the locale kit.
I'm working on an easy way to translate an application. The idea is to
dump all the strings from a source C++ file, allow the user to alter
the dumped strings, and put them back on the binary file (as
attributes or resources).
The current code uses the same catalog format in the dumped file and
in the binary, it's a flattened BMessage. However, this does not allow
easy translation because the dumped file is binary.

So, i'm now working on a different catalog format that will write an
easily readable and modifiable text file. I've got the first part of
the process working (dumping the strings from the C++ source and
saving them). Now i'm working on the second part, loading the file,
converting it to binary and saving it in the executable.

My plain text catalog format is implemented as a catalog add on. It's
loaded automatically by the locale kit when an application request it.
The binary catalog format is done as a special add on, living inside
the locale kit and always loaded. The problem is this binary add on
has special extensions to the catalog add-on API, that are used to
extract a list of all the strings contained in the add-on. I need to
do the same with my new plain text add on. So I need a header for my
add on, specifying the added methods. The problem is there is no
headers/add-ons/ folder in haiku source tree, so i'm not sure where to
put this header file. Should I just extend the add-on API and allow
this method for all the add ons ? Or can I put my header somewhere
else ?

Thanks for your help,

-- 
Adrien - GSoC student

Other related posts: