As several previous entries show I have been making a serious push lately towards adding native language support. Until a few days ago everything seemed to be going exactly according to plan.
A few days ago I started testing some of the translation files which have been contributed by members of the Puppy Linux forum. The translations were loading and displaying right, but with an odd side effect that I did not expect. Certain languages (Italian, French, Spanish, etc.) use accented characters. These accented characters were being replaced with a question mark in the displayed text. When I ran the offending programs on the command line I saw numerous identical PANGO warnings, to the effect that an invalid utf-8 string had been passed to pango.
Well, all of the translation files are saved in valid utf-8, so it made no sense. I spent nearly half a day trying to track the problem down with no success. Finally I came upon a hit on google which identified the problem for me, in a forum post about an application crash in php-gtk. In that post the offending bit of programming turned out to be the Clearlooks gtk+ theme engine. Since I created Grafpup’s new Melange gtk+ theme using Clearlooks I experimented with changing to a blank theme and right away the problem disappeared.
This is really upsetting since I put so much time and effort into crafting that theme, and the corresponding Openbox theme and desktop wallpaper. I did some experimenting with other, related theme engines to see if I could come up with a similar look and still avoid the text rendering bug. I tried Ubuntulooks, Candido, Murrine, and Nudoko. All of them came close with a little tweaking, but all of them did at least one or two things visually that I just couldn’t stand. Ubuntulooks and Candido both brightened menu gradients and progress bars, turning my rich brown into a really awful bright orange like in Ubuntu’s Human theme. Nudoko came close, but has really ugly looking scrollbars and a tacky looking gradient on tab widgets. Probably the closest to the look I wanted was Murrine, but it gives too glossy of a look to buttons and tree headers, and also has a bit of the same issue with lightening of progress bars and menu gradients.
Well for now, since I don’t want to start from scratch on a new theme and also don’t feel like fixing the Clearlooks bug, I’m just going to leave it as is. The nls push is mainly for 3.xx development, so I plan to get the bug sorted out by then but not in time for 2.01. Perhaps I can find where the bug lies in the Clearlooks source by comparing it with one of the other engines (all of which are descended from Clearlooks, btw).
Speaking of nls support I want to mention a few brainstorms I had. I was thinking, how best can native language support be added to the live cd, without having too large an impact on the amount of ram used whhen the system copies itself to memory. Adding one extra language does not add much overhead, perhaps a couple mb’s actually, but adding several languages and you have a lot of space taken up by files which are not being used at all. I had one idea which stood out as being the most workable.
What I propose is to create, at the time the live cd is created, an extra squashfile for each additional language I want to support. At first this would be a basic list of mainly European languages, probably German, French, Italian, Spanish, and Russian. Perhaps one or two others. Each of these squashfiles would contain the language files for all of the programs in that particular build of the live cd, corresponding to that language. By default none of these additional squashfiles would be loaded during normal bootup, so while the size of the live cd itself would increase somewhat the overall memory footprint while running would be exactly the same as if they weren’t there at all. However, passing an extra LANG parameter on the boot command line would cause Grafpup to add that squashfile to the aufs union and set the LANG environment variable, so that you could have, say, a German localized desktop by typing in “grafpup lang=de” when the boot screen appears.
This approach has several other benefits to it. It would be quite easy to create a localized remaster by making sure the appropriate nls squashfile was present and modifying isolinux.cfg to pass the extra lang parameter. Hard drive installations could be localized by having the installer copy the contents of the nls file at the same time the graf_3.xx.sfs file was copied to the desired partition. And there would be a relatively lower memory handicap when running the live cd localized over trying to add several other languages to the graf_3.xx.sfs file.
As of right now this is in the purely theoretical realm and I haven’t even begun any actual implementation of the idea, but I see no reason at this juncture why it wouldn’t work. It would require modification to unleashed, to allow the creation of the nls squashfiles, and modification of the init scripts to allow their loading during bootup.
I think this is going to be the one major area of improvement in 3.xx over it’s predecessors. In Grafpup-2.0 I implemented multi-user support, which was the main outstanding feature. Grafpup-3.xx will have the distinction of being multi-national. Yes, I like that idea very much.