Hi, [ For the proposal outlined below I would like to create a new directory in Mesa CVS. Brian, is this ok with you? What about mesa/src/mesa/drivers/dri/common/xmlpool? Any objections or alternatives? ]
I thought about how translatability of driver options could be improved. My recent experience with using gettext in DRIconf got me thinking if the same tools could be used for translating driver options. This would have two big advantages: 1. Gettext and related tools are well known to translators, even without programming experience. 2. Translations for different languages are maintained in separate files, which also makes life easier for translators. However, then a mechanism is needed to combine all the translations into a single file, because the XML schema that drivers use to advertise their options wants all translations of an option in one place. I have written a small Python script that does the job of generating something like xmlpool.h (options.h) from a template file (t_options.h) containing the English descriptions and gettext translations in separate files. I'll be offline for the rest of the week. Therefore I'm attaching a .tar.gz containing the work I have done so far for interested people to look at. It contains a new common/xmlpool.h and a directory common/xmlpool with the option template t_options.h, a German translation de.po, and everything that's needed for maintaining translations and generating options.h from t_options.h+translations. This is already working for me. To try this live, extract the tarball in mesa/src/mesa/drivers/dri. Then cd into common/xmlpool and run "make" to generate options.h (you need Python and the gettext tools installed). Then rebuild the drivers. Take a look at the start of common/xmlpool/Makefile for details about adding new translations. Regards, Felix -- | Felix Kühling <[EMAIL PROTECTED]> http://fxk.de.vu | | PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3 B152 151C 5CC1 D888 E595 |
xmlpool.tar.gz
Description: application/compressed-tar