[katello-devel] Setting a user's preferred locale via cli

Eric Sammons esammons at redhat.com
Mon Aug 6 13:12:10 UTC 2012



----- Original Message -----
> On 08/02/2012 02:06 PM, Tom McKay wrote:
> >
> >
> > ----- Original Message -----
> >> From: "Lukas Zapletal" <lzap at redhat.com>
> >> To: katello-devel at redhat.com
> >> Sent: Thursday, August 2, 2012 4:30:23 AM
> >> Subject: Re: [katello-devel] Setting a user's preferred locale via
> >> cli
> >>
> >> On Wed, Aug 01, 2012 at 11:19:47PM -0700, Michael McCune wrote:
> >>> no way todo it now but it wouldn't be that hard to add.  Just
> >>> file
> >>> an RFE and we can triage it appropriately.  patches happily
> >>> accepted
> >>> :)
> >>>
> >>
> >> Well, why to introduce new option when you can do this in UNIX:
> >>
> >> LC_ALL=fr katello environment list
> >>
> >> What CLI does it sends this locale to the server so the Katello
> >> server
> >> returns all data in French (well not data but all constants
> >> there).
> >> It should also switch over to French in this case (for all
> >> messages
> >> and
> >> column names for example - CLI is localized of course).
> >>
> >> You have discovered a bug, Og. While it should work, what we do in
> >> our
> >> source code base is we always get system's default locale (in my
> >> case
> >> English). So we do not take user's setting into effect.
> >>
> >> So I filed new bug:
> >> https://bugzilla.redhat.com/show_bug.cgi?id=845198
> >>
> >> We will not introduce new option you recommend (if you filed a RFE
> >> please close it), but we will rather fix this one. Then it should
> >> work
> >> the usual way (e.g. if I as Czech ssh into a box with English
> >> system
> >> locale, ssh in the default configuration will switch my
> >> environment
> >> to
> >> Czech, so Katello CLI will work in Czech for me).
> >>
> >> Nice find, especially when your default one is English (I guess
> >> :-)
> >>
> >> LZ
> >>
> >> --
> >> Later,
> >>
> >>   Lukas "lzap" Zapletal
> >>   #katello #systemengine
> >>
> >> _______________________________________________
> >> katello-devel mailing list
> >> katello-devel at redhat.com
> >> https://www.redhat.com/mailman/listinfo/katello-devel
> >>
> >
> > Disagree that this is not worth a RFE. Just like in the UI, where
> > the user may override the default browser locale, a --locale
> > option would allow the user to override the systems default
> > locale. I am voting for the RFE.
> >
> 
> I vote for using LC_ALL. The functionality is in fact the same so I'd
> prefer to be unix-consistent.
> 
> T.
> 

Now I thought default locale as set in the browser was strictly for the browser.  When you are talking about the cli then you are talking about using the system's locale.  If the katello / headpin cli are not honoring the systems locale then there is a bug here.  Remember the system has a default locale and a user can override that locale in their login properties (as set in .bashrc or other).

I had always assumed that the "default locale" setting was only available in the browser because it was only applicable to the browser.

--Eric




More information about the katello-devel mailing list