! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Strange check for '/' in user's locale in libxfce4util
Status:
CLOSED: FIXED
Product:
Libxfce4util
Component:
General

Comments

Description Enrico Tröger editbugs 2008-05-10 07:48:35 CEST
I was just about writing a German localized version of the Info text in
xfce4-about. While testing I noticed it isn't used at all.

After reading the code to get an idea what's going wrong, I noticed
something strange in xfce_localize_path_internal()
(libxfce4util/trunk/libxfce4util/xfce-i18n.c:95).
There is a check:

if (G_LIKELY (lang != NULL && strchr (lang, '/') != NULL))

I don't understand why lang should contain a '/'. This is why it
doesn't work for me. My locale is "de_DE.UTF-8".

If I run xfce4-about with
LANG=de_DE.UTF-8/ xfce4-about
it works because the check for the '/' is TRUE and the localized
version is used. But when are '/' are used in locales? I've never seen
this before.
Comment 1 Brian J. Tarricone (not reading bugmail) 2008-09-11 18:35:56 CEST
Ok, after staring at that for a good while, I'm fairly certain it should be strchr (path, '/).  Fix checked in.
Comment 2 Brian J. Tarricone (not reading bugmail) 2008-09-11 18:36:29 CEST
Ok, after staring at that for a good while, I'm fairly certain it should be strchr (path, '/).  Fix checked in.
Comment 3 Enrico Tröger editbugs 2008-09-12 10:22:24 CEST
Works like a charm, thanks.

Bug #4071

Reported by:
Enrico Tröger
Reported on: 2008-05-10
Last modified on: 2009-07-14

People

Assignee:
Xfce Bug Triage
CC List:
0 users

Version

Attachments

Additional information