Re: [squid-users] Custom pages with translation

From: E.S. Rosenberg <esr_at_g.jct.ac.il>
Date: Mon, 30 May 2011 14:50:01 +0300

2011/5/30 Amos Jeffries <squid3_at_treenet.co.nz>:
> On Sun, 29 May 2011 22:46:10 +0300, E.S. Rosenberg wrote:
>>
>> 2011/5/29 Amos Jeffries <squid3_at_treenet.co.nz>:
>>>
>>> On 29/05/11 23:29, E.S. Rosenberg wrote:
>>>>
>>>> Hi all,
>>>> We would like to create a few cutom errors and have them exist in the
>>>> most common languages on our campus, I added the custom page to the
>>>> templates folder, and I added a custom page to one of the languages,
>>>> however when I browse with auto negotiate set to the language I still
>>>> just get the English message instead of the language's message (and
>>>> the localized version is 100% different since we translated it
>>>> completely).
>>>> Is there some other step that I missed here?
>>>
>>>  * Squid version must be 3.1 or later.
>>
>> Check: 3.1.6
>>>
>>>  * error_directory directive MUST be absent from squid.conf.
>>
>> Check
>>>
>>>  * your new template(s) must be readable by the squid user account. Check
>>> permissions match the files around them.
>>
>> Check
>>>
>>>  * browser must be advertising the test language first in the
>>> Accept-Language header. (Squid processes it left-to-right looking for the
>>> first available template)
>>
>> Afaik it is, with other (builtin like ERR_ACCESS_DENIED) pages I get
>> the translated page just not with the custom page.
>>>
>>> You can see what Squid is doing with "debug_options 4,6"
>>
>> Ok, it showed me the following:
>> errorpage.cc(1044) BuildContent: No existing error page language
>> negotiated for ERR_WORKTIME_ACCESS_DENIED. Using default error file .
>>
>> Which suggests that the somehow the browser is not sending the
>> language header with this block page....
>
> Or that Squid was not built with --enable-auto-locale. That should be
> enabled by default if not disabled manually, though.
Well for 'builtin' error pages (like ERR_ACCESS_DENIED) it does give
me the localized page so that seems to be a pointer that it should
work right?

Thanks,
Eliyahu - אליהו
>
> The debug output when negotiation is enabled should look something like:
>
> ... Testing Header: he-IL,he;q=0.9,en;q=0.8
> ... Found language 'he-il', testing for available template in:
> '/usr/share/squid/errors/he-il'
>
> OR if the aliases are not setup a warning about he-il then:
>
> ... Found language 'he', testing for available template in:
> '/usr/share/squid/errors/he'
>
>
>>
>> BTW. the "float: right" makes the hebrew error messages very
>> unreadable, direction: rtl; seems to be sufficient (only tested on
>> IE8-9, FF3.6 and FF4)
>
> Ah thank. You fixed in the langpack for tomorrow. It just missed out on
> todays releases :(. Should be in next months.
>
> Amos
>
Received on Mon May 30 2011 - 11:50:10 MDT

This archive was generated by hypermail 2.2.0 : Mon May 30 2011 - 12:00:05 MDT