Qt Linguist – nul points!

March 16th, 2007 by donnek Leave a reply »

I’ve just finished a translation of QCad, the 2D CAD program (see this page for a couple of screenshots). It’s a Qt program, so it uses ts-files instead of the gettext po-files. Qt supplies their own app (Qt Linguist) to deal with these.

The main “benefits” of ts-files are that they group messages into sections, which is supposed to make it easier to track down where your message should be showing up, and they use XML. But in my view, they are the most abominable things ever to be let loose on localisation.

Because the messages are split into sections, this means that if you use the same message in multiple areas of your app, you will get it appearing in multiple sections of the ts-file, and … yes, that’s right … it has to be translated multiple times. Qt Linguist has a section where previous translations (in that file!) have occurred, and you can press Ctrl + a number to copy them into the message, and then Ctrl + Enter to mark the message as “complete”. So for each repeated message you need two extra keystrokes before you can move on to the next using Ctrl + Shift + L. On a shortish file, this doesn’t matter, but when you have one that is longer than about 800 messages, it starts to grate. Oh, and you’ve just discovered you misspelt a word in one of the messages you were happily copying in to these duplicate messages … Now you have to find each one separately using Ctrl + F, and correct them. (I know you could do it via some sort of grep, if you are handy with grepping, but I wouldn’t trust it not to make changes where it shouldn’t, leading to even more edits.)

And XML … Well, once you get over about 1,000 items (and apps like Scribus have considerably more than that), you can just feel Linguist chomping it’s way through all that excess text – it can take 2-3 seconds just to go to the next item in a Find list. My biggest gripe about XML (apart from the one about not using it to hold data when there are far more efficient apps to do that – they’re called relational databases) is that it’s so wordy. For configuration files, and portable formats, it can be OK, but there are some types of data where the XML tags end up being probably 70% of the filesize (the tei-files for dictd – see this page) are an example.

So this is another case where the free software architects got it right with gettext – old-fashioned maybe (no XML), but very practical.

4 comments

  1. Rhys Wynne says:

    Screen shots look impressive. I had similar problems with translation of Nireblog, where the same text were repeated and needed translating more than once.

    How do you choose what to translate?
    Do you just see what’s possible to localise and then go ahead, or is some consideration given to the possible uptake/popularity of software?

    Although I have no need to use CAD myself, my father uses it quite a bit, but don’t you think CAD use is limited to specialists?

    Are there any drawing packages that can be localised? I’ve downloaded GIMP, and on my home laptop, which doesn’t have Welsh version of XP on it (yet!), some of the prompt boxes appear in Welsh which baffles me a bit (like ‘do you want to save’ etc)

    I’m not a very technical person, but I’m very interested in the work you’re doing and think that the Meddaliadur is a brilliant resource.

    Diolch yn fawr for your efforts.

  2. Ordovicius says:

    Any ideas for the Welsh Blog Awards 2007?

  3. donnek says:

    Hi Rhys

    Thanks. I usuually choose things I’m involved I’m using at the time, which in turn may be based on software I think might be of interest to a wider set of people. I ended up using QCad because my son was doing Graphics for TGAU, so I wanted to see what was available in Linux. I agree it’s specialist for the average desktop user.

    You might be interested in the CAELinux liveCD (http://www.caelinux.com/CMS). I’ve got a copy, but I haven’t used it yet, mainly because I’m exploring a lot of audio stuff.

    There are lots of drawing packages that could be worked on. I did a version of Scribus (DTP) a couple of years ago, as well as the kids’ program Tuxpaint (that went down very well at the 2004 Urdd), and some parts of Krita should be in Welsh too. All of these needs some revision, though. Inkscape would be a priority, I’d have thought.

    On the GIMP thing, it may be that some of the GTK stuff, which is substantially translated, may be on your system, and it is picking up some setting that shows you are in Wales, and wight therefore want the Wlsh version. I’m not sure how that would be happening though.

    I’m rewriting Meddaliadur to use a database, because beyond the amount of apps I’ve got on there at the minute, it’s just too annoying to update!

    Thanks for the input!

  4. donnek says:

    Salve, ordovicie!

    Unfortunately, no – an interesting list. Now, if there were a category for Best Software Blog, I would have a suggestion, but modesty prevents me from naming it here … 🙂

Leave a Reply