(Oh no, here we go again, I hear some of you say)

This morning, a bug came in from Alexandro about our editor crashing on startup for him. This gave me a dreadful sinking feeling, as he’d been complaining about the fact that the “Spanish (Americas)” language support wasn’t working properly in other mails (it wasn’t) and I knew there was more to it than that.

Spanish (Americas) – there is no language, surely ? Well, unfortunately, in our editor, there does seem to be : I could almost imagine the feature-requestor talking to the engineer about it : “you know, the type of Spanish they speak in South America”.

That doesn’t sound good to me – purely based on the experience of hearing English spoken in Carrickfergus versus English spoken in Cork or Kerry here in Ireland. Those two places are only a few hundred miles apart, versus countries in South America which are thousands of miles apart : you can’t expect to have a Spanish localisation that works in all of them, can you ?

Anyway, it turns out, the stack trace Alexandro was seeing was :

at javax.swing.ImageIcon.(ImageIcon.java:138)
at com.sun.tmci.editor.translation.TMInnerPanel.setNationFlag(TMInnerPanel.java:136)
at com.sun.tmci.editor.translation.ContrastFrame.(ContrastFrame.java:31)
at com.sun.tmci.editor.translation.MainFrame.jbInit(MainFrame.java:2003)
at com.sun.tmci.editor.translation.MainFrame.(MainFrame.java:483)
at com.sun.tmci.editor.translation.TransEditor.(TransEditor.java:12)
at com.sun.tmci.editor.translation.TransEditor.main(TransEditor.java:17)

What was the problem ? Well, the editor was looking for a flag called “Spanish_1Americas2.gif”, which wasn’t present in the images directory, and some additional shoddy coding meant that the editor crashed : not good.

So, apart from the shoddy coding, there’s the issue of what flag to use for a non-existant locale that’s used for a non-existant country. Hrm – on top of that, there’s a lot of other sensitive issues that can arise with respect to bundling flags in applications (which is what had really given me the sinking feeling in the first place).

There was a particularly hairy discussion on this over on the GNOME devel list a while back which makes me think we should probably try and remove this stuff from our editor at some stage. I’m thinking of perhaps something where we just say “Source” and “Target” instead, does anyone have any better ideas ?