This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #15527] strftime_l.c: Support lowercase output


9.12.2016 17:20 Mike Frysinger <vapier@gentoo.org> wrote:
>
>
> On 09 Dec 2016 12:00, Rafal Luzynski wrote:
> > [...]
> > That's really not what I meant. I meant that switching all locale
> > data to titlecase would be possible only if there was a flag to
> > switch back to lowercase.
>
> i'm saying the flags are irrelevant. the data should be in the form
> that is appropriate for that locale. that might mean uppercase, or
> lowercase, or titlecase. flags would not help at all, and in fact,
> they would make things worse. en_US authors would see that, think
> that it's weird looking, and then use the titlecase flag. then it'd
> be broken for many other locales.

Format strings should be translatable and it should be left to
translators what format string and what flags they want. An application
should present all messages, format strings, and date/time data
either in en_US or all should be localized, otherwise we
get some unfinished mix of localized/not-yet-localized.
So although it's correct to use titlecase in English it should not
be relevant for other languages.

> > Yes, in my language (and I think that in most languages) we have
> > all months names and weekdays names in lowercase and this is correct
> > by default. But we have no flag to switch to titlecase and
> > I think it would be useful sometimes.
>
> i have a hard time seeing a valid usecase where the code forcing
> titlecase all the time would be desirable.

No, I didn't mean a code forcing titlecase all the time.  My aim
is to provide a choice: lowercase/titlecase/uppercase, for each
format specifier individually.  For now in English (and German)
we have titlecase/uppercase, in other languages we have lowercase/uppercase.
What is a solution to provide the missing case?

> forcing all lower or
> upper case isn't that hard to imagine (e.g. output forms where
> *all* content, not just dates, are in the respective cases).

I agree with the uppercase, but is it really useful to have
all lowercase in English?

> > > [...]
> > > we already have a flag to force it to uppercase. makes sense to have
> > > a flag to do the opposite. your arguments here apply to the uppercase
> > > flag too.
> >
> > No, does not. I didn't say anything about uppercase, if I had
> > to say I'd say it's correct so let's leave it as it is now.
> > What I wanted to say is that we don't have a flag to switch
> > to titlecase.
> >
> > My question was: what is the real problem solved by implementing
> > a flag to switch to lowercase?
>
> i didn't say you talked about uppercase. my point is that your argument
> isn't specific to lowercase. you could s/lower/upper/ and have the same
> points. so why do you think having uppercase makes sense but adding
> lowercase is wrong ?

Because we already have all data in lowercase.  No need to convert
from lowercase to lowercase.  More precisely: in some languages
the data are in titlecase but should remain so, converting them
to lowercase is incorrect.

My point is not that lowercase flag is wrong or destructive,
I just think it does not provide any additional value.

A separate problem is that there is no flag to convert to
titlecase.  My suggestion is that if we had locale data in
titlecase (like in English) and a flag to convert them to
lowercase explicitly then it would be a workaround.  Of course
a titlecase flag would be better.  But, again, that's a separate
case, only similar to the lowercase flag.

Regards,

Rafal


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]