libxfce4util i18n broken

Jasper Huijsmans jasper at moongroup.com
Thu Aug 7 10:40:33 CEST 2003


Right, I just looked at it and there are a couple of things I'd like to
discuss.

I believe the general format for locale is this (not all parts need to
be there):
  ll_LL at modifier.encoding

What we want is to try and find a filename for all possible subgroups of
this locale:

  ll_LL at modifier.encoding
  ll_LL at modifier
  ll_LL
  ll

Do we really want to support this in xfce_get_path_localized() ? The
above scheme is not easy to support. I can split in into prelocale and
postlocale parts and then try all subgroups, but it will be a bit messy.
At least we have to limit the formats to one locale specifier.

But, frankly I don't think we need a general function like that at all.
if we have xfce_get_localized_file and xfce_get_localized_dir, that
should be enough for all our purposes. Perhaps a
xfce_get_file_in_localized_dir(), but that can easily be done in the
application as well.

Implementation note: benny, at the start of xfce_get_localized_path, you
do a 
  g_return_val_if_fail(dst != NULL, NULL);

That makes no sense, right? It's the destination buffer, the caller
specifically has to provide the size of the buffer. It probably is an
uninitialized buffer anyway. Also, wouldn't it be better to return TRUE
or FALSE from the function, rather than NULL or a pointer to the buffer?

	Jasper






More information about the Xfce4-dev mailing list