I agree that a list of char* is enough for language_tags.
Thanks for your review and patch. I'll apply your patch and send v9.
On Wed, Jan 28, 2015 at 3:15 PM, Junio C Hamano wrote:
> On Tue, Jan 27, 2015 at 3:34 PM, Junio C Hamano wrote:
>> Yi EungJun writes:
>>
>>> +
>>> + sprint
On Tue, Jan 27, 2015 at 3:34 PM, Junio C Hamano wrote:
> Yi EungJun writes:
>
>> +
>> + sprintf(q_format, ";q=0.%%0%dd", decimal_places);
>> +
>> + strbuf_addstr(buf, "Accept-Language: ");
>> +
>> + for(i = 0; i < num_langs; i++) {
>> + if (
Yi EungJun writes:
> +static void write_accept_language(struct strbuf *buf)
> +{
> + /*
> + * MAX_DECIMAL_PLACES must not be larger than 3. If it is larger than
> + * that, q-value will be smaller than 0.001, the minimum q-value the
> + * HTTP specification allows. See
> +
From: Yi EungJun
Add an Accept-Language header which indicates the user's preferred
languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG.
Examples:
LANGUAGE= -> ""
LANGUAGE=ko:en -> "Accept-Language: ko, en;q=0.9, *;q=0.1"
LANGUAGE=ko LANG=en_US.UTF-8 -> "Accept-Language: ko, *;
Jeff King:
If that is the case, though, I wonder if we should actually be adding it
as a git-protocol header so that all transports can benefit (i.e., we
could be localizing human-readable error messages in upload-pack,
receive-pack, etc).
That would be very nice, thre is a lot of language mix
2014-07-12 1:24 GMT+09:00 Eric Sunshine :
> On Fri, Jul 11, 2014 at 5:22 AM, Yi, EungJun wrote:
>> 2014-07-09 6:52 GMT+09:00 Eric Sunshine :
+ grep "^Accept-Language: ko; q=1.000, en; q=0.999, \*; q=0.001"
actual
>>>
>>> Do you want to \-escape the periods? (Or maybe use 'grep -F'
2014-07-11 5:10 GMT+09:00 Jeff King :
> On Wed, Jul 09, 2014 at 11:46:14AM +0100, Peter Krefting wrote:
>
>> Jeff King:
>>
>> >I did some digging, and I think the public API is setlocale with a NULL
>> >parameter, like:
>> >
>> > printf("%s\n", setlocale(LC_MESSAGES, NULL));
>> >
>> >That still wil
2014-07-09 19:40 GMT+09:00 Peter Krefting :
> Yi EungJun:
>
>
>> Example:
>> LANGUAGE= -> ""
>> LANGUAGE=ko -> "Accept-Language: ko; q=1.000, *; q=0.001"
>> LANGUAGE=ko:en -> "Accept-Language: ko; q=1.000, en; q=0.999, *; q=0.001"
>
>
> Avoid adding "q=1.000". It is redundant (the default for an
On Wed, Jul 09, 2014 at 11:46:14AM +0100, Peter Krefting wrote:
> Jeff King:
>
> >I did some digging, and I think the public API is setlocale with a NULL
> >parameter, like:
> >
> > printf("%s\n", setlocale(LC_MESSAGES, NULL));
> >
> >That still will end up like "en_US.UTF-8", though;
>
> And it
Jeff King:
I did some digging, and I think the public API is setlocale with a
NULL parameter, like:
printf("%s\n", setlocale(LC_MESSAGES, NULL));
That still will end up like "en_US.UTF-8", though;
And it only yields the highest-priority language, I think.
I couldn't find any standard func
Yi EungJun:
Example:
LANGUAGE= -> ""
LANGUAGE=ko -> "Accept-Language: ko; q=1.000, *; q=0.001"
LANGUAGE=ko:en -> "Accept-Language: ko; q=1.000, en; q=0.999, *; q=0.001"
Avoid adding "q=1.000". It is redundant (the default for any
unqualified language names is 1.0, and additionally there ha
On Wed, Jul 09, 2014 at 02:46:35PM +0900, Yi, EungJun wrote:
> I agree with you. In fact, I tried to get user's preferred language in
> the same way as gettext. It has guess_category_value() to do that and
> the function is good enough because it considers $LANGUAGE, $LC_ALL,
> $LANG, and also sys
2014-07-09 14:10 GMT+09:00 Jeff King :
> On Wed, Jul 09, 2014 at 12:54:06AM +0900, Yi EungJun wrote:
>
>> From: Yi EungJun
>>
>> Add an Accept-Language header which indicates the user's preferred
>> languages defined by 'LANGUAGE' environment variable if the variable is
>> not empty.
>>
>> Example
On Wed, Jul 09, 2014 at 12:54:06AM +0900, Yi EungJun wrote:
> From: Yi EungJun
>
> Add an Accept-Language header which indicates the user's preferred
> languages defined by 'LANGUAGE' environment variable if the variable is
> not empty.
>
> Example:
> LANGUAGE= -> ""
> LANGUAGE=ko -> "Accep
On Tue, Jul 8, 2014 at 11:54 AM, Yi EungJun wrote:
> From: Yi EungJun
>
> Add an Accept-Language header which indicates the user's preferred
> languages defined by 'LANGUAGE' environment variable if the variable is
> not empty.
>
> Example:
> LANGUAGE= -> ""
> LANGUAGE=ko -> "Accept-Language:
From: Yi EungJun
Add an Accept-Language header which indicates the user's preferred
languages defined by 'LANGUAGE' environment variable if the variable is
not empty.
Example:
LANGUAGE= -> ""
LANGUAGE=ko -> "Accept-Language: ko; q=1.000, *; q=0.001"
LANGUAGE=ko:en -> "Accept-Language: ko;
16 matches
Mail list logo