libxfce4util i18n broken
Benedikt Meurer
Benedikt.Meurer at unix-ag.uni-siegen.de
Thu Aug 7 10:56:12 CEST 2003
On Thu, 07, Aug 2003, Jasper Huijsmans wrote:
Jasper,
> 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
IIRC the correct format is <language>_<country>.<encoding>, so lets
please use this format. Anyway, the above could easily be supported by
adding them to the nls.alias file.
I looked for the OpenGroup specs and use in this case and our current
implementation is compatible with how its done in X/Motif/CDE/etc.
Please do not change the concept or add hacks to this. %L should be
replaced with the complete LC_ALL string (e.g. de_DE.ISO8859-1) and %l
should be replaced with the current language (e.g. de).
> 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.
The above scheme does not look right, so I don't think, we need
support for this. And again: No hacks to get messy stuff going,
please. First lets figure out, if the current scheme is the correct
one (I think it is, cause its used with all Unix system I know, and I
think, Linux does so aswell). This is supported by alll setlocale()
implementations I know (and again, make sure, you set the correct
environment variable, most of the time, it is LC_ALL).
> 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.
xfce_get_localized_file() and xfce_get_localized_dir() will be removed
from libxfce4util in the future, since they are less flexible and
everything is covered by xfce_get_path_localized().
> Implementation note: benny, at the start of xfce_get_localized_path, you
> do a
> g_return_val_if_fail(dst != NULL, NULL);
This is just to be sure.
> 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?
It could be gboolean as well yes, but I like it to be gchar *.
Anyway, please do not change anything in the i18n stuff before 4.0.
> Jasper
Olivier: Please try LC_ALL=fr_FR.UTF-8 instead of LANG=.
regards,
Benedikt
--
NetBSD Operating system: http://www.NetBSD.org/
pkgsrc "Work in progress": http://pkgsrc-wip.sf.net/
XFce desktop environment: http://www.xfce.org/
German Unix-AG Association: http://www.unix-ag.org/
More information about the Xfce4-dev
mailing list