i18n done the wrong way.
2006-01-25
1 minute read

From evolution’s widgets/misc/e-dateedit, a custom date field:

    e_utf8_strftime (buffer, sizeof (buffer), _("%m/%d/%Y"), &tmp_tm);

You see that _("%m/%d/%Y") there? That means you’ll only have a sane (that is, non-American) date format if you’re running with LC_MESSAGES set to the format you prefer for dates and such. It also means extra work for the translator as well as possible errors due to translators having a personal preferred way to write dates. Using “%x” instead fixes the problem (verified by binary patching /usr/lib/evolution/2.6/libemiscwidgets.so.0.0.0, since I don’t have a very recent evolution source handy) and gives me nice and (semi-)sane dates.

Bug not yet filed due to me being aboard an aeroplane.

Now I just have to fix the way to write dates in nb_NO.UTF-8 into the same as ISO-8601, but that should be easy enough.

Update. I meant %x, not %c, of course

Back to posts