Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-10-20 Thread Carl Meyer
Hi Wayne, On 10/20/2014 04:59 AM, Wayne Ye wrote: > Hi Carl, > Thanks for the encouragement! > I've created a new ticket in > Trac: https://code.djangoproject.com/ticket/23689#ticket, could you > please kindly take a look, feel free to revise it if I missed anything, > and change the triage status

Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-10-20 Thread Wayne Ye
Hi Carl, Thanks for the encouragement! I've created a new ticket in Trac: https://code.djangoproject.com/ticket/23689#ticket, could you please kindly take a look, feel free to revise it if I missed anything, and change the triage status, thanks a lot! I will try to submit a patch/pull request w

Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-10-17 Thread Carl Meyer
On 10/16/2014 09:41 PM, Wayne Ye wrote: > HI Carl and Ramiro, > Thank you both very much for tracking this issue! > > Actually I am a junior Django developer (but has nearly 10 years exp on > ASP.NET and RoR), I am eager to contribute to the Django project! If > this issue has not yet been logged

Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-10-16 Thread Wayne Ye
HI Carl and Ramiro, Thank you both very much for tracking this issue! Actually I am a junior Django developer (but has nearly 10 years exp on ASP.NET and RoR), I am eager to contribute to the Django project! If this issue has not yet been logged onto Trac and not yet working in progress, can I

Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-10-15 Thread Ramiro Morales
Hi Carl, On Mon, Sep 29, 2014 at 2:45 PM, Carl Meyer wrote: >> 1. https://docs.djangoproject.com/en/dev/topics/i18n/#definitions > > I do notice that this bit of documentation asserts that a language code > "Represents the name of a language. Browsers send the names of the > languages they accept

Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-09-29 Thread Carl Meyer
Hi Ramiro, On 09/27/2014 06:13 AM, Ramiro Morales wrote: > The names of directories with translations on disk are actually GNU > gettext locale names[1] as opposed to language names[1] (the ones in > the Accept-Language HTTP header and discussed above.) > > It does specify that the part after the

Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-09-28 Thread Apostolos Bessas
On Sat, Sep 27, 2014 at 3:13 PM, Ramiro Morales wrote: > > I wonder if this also has implications for checking whether a given > > locale is present on the system. It looks to me like we also do this > > case-sensitively right now, but we should do it case-insensitively. This > > might be a bit o

Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-09-28 Thread Apostolos Bessas
Hi Wayne, On Mon, Sep 29, 2014 at 5:27 AM, Wayne Ye wrote: > > Per official I18n wiki: > https://docs.djangoproject.com/en/1.4/topics/i18n/translation/#using-translations-outside-views-and-templates > > I was using *translation.get_language()* method to retrieve the client > preferred language: >

Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-09-28 Thread Wayne Ye
Hi Ramiro, Thank you very much for replying the thread, I read your testing code, it makes totally sense, however I guess there might be still some issues, I am not expert here but let me explain more details about what I found: Per official I18n wiki: https://docs.djangoproject.com/en/1.4/topi

Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-09-27 Thread Ramiro Morales
On Fri, Sep 26, 2014 at 4:58 AM, Wayne Ye wrote: > I noticed on small defect here while I was testing my django website's > I18N/L10n, basically below are example Accept-Language headers sent by > Chrome and Firefox (all latest version): > > Chrome: Accept-Language: zh-TW,zh;q=0.8,en-US;q=0.6,en;

Re: Django detects HTTP Accept-Language header in case-sensitive manner

2014-09-26 Thread Carl Meyer
Hello Wayne, On 09/26/2014 01:58 AM, Wayne Ye wrote: > I noticed on small defect here while I was testing my django website's > I18N/L10n, basically below are example Accept-Language headers sent by > Chrome and Firefox (all latest version): > > Chrome: Accept-Language: *zh-TW*,zh;q=0.8,en-US;q=

Django detects HTTP Accept-Language header in case-sensitive manner

2014-09-26 Thread Wayne Ye
I noticed on small defect here while I was testing my django website's I18N/L10n, basically below are example Accept-Language headers sent by Chrome and Firefox (all latest version): Chrome: Accept-Language: *zh-TW*,zh;q=0.8,en-US;q=0.6,en;q=0.4 Firefox: Accept-Language: *zh-tw*,zh;q=0.8,