Murray's Blog

Glom across borders

Boring technical bit

It’s been a hard week. I’ve been doing some major (more repetitive than conceptual) refactoring of the Glom source code, to make it use smartpointers for lots of the information, instead of copying by values lots. Copying by value gave me stability when I wasn’t sure how things should work, but now I’m more sure about where things should be explicitly created, shared, or copied. The memory management feels a bit like Java, but at least I still have the const keyword, and at least I still have strong compile-time typing. I’d be lost without them.

Exciting new feature

The point of this was to support translations of everything in Glom that can have a human-visible title instead of just an identifying name, such as tables, fields, reports, layout parts, relationships, etc. Rather than have little translation buttons next to each title, I chose to pull it all into one list. And if you develop a system in French but then later have to deploy it in Germany, that should be OK too. You can even test it without changing your locale, though you’d have, for instance, German field titles with Spanish menus and buttons.

It would be very easy for someone to implement Import and Export to/from regular gettext .po files. Maybe I can even check them into cvs so that the wonderful GNOME translation teams translate the example Glom system for me.

I had considered this a post-1.0 feature, in Glom’s list of planned features, but I realise that I need this for clients in Germany, so I can still use English as my first development language when creating Glom solutions. As usual, don’t forget that your company may fund me to implement the remaining features.

Unfortunately, it only uses the first part of locale names at the moment, such as “de” for “de_DE.UTF-8”, so, for instance, you must use the same German translation for Germany, Austria, and Switzerland. That’s because I can’t find any list of real locales (whose names should also be translated themselves). iso-files seems to have only language names instead of locales.

Exit mobile version