On 21/05/11 09:39, Tsantilas Christos wrote:
Hi all,
This patch adds support for a translatable and customisable error detail
file (errors/templates/error_details.txt) The file is stored like we
store error page templates today.
Inside the file, an HTTP-like format used that can be
later extended to other error details:
name: value
details: "value"
descr: "value"
or
name: value
details: "multi
line
value"
descr: "value with a \"quoted string\" inside"
More informations and some technical details there are in patch preamble.
In this patch also I am including the HttpHeader.cc changes with spaces
changes striped (to make review easier).
This is a Measurement Factory project.
Do we really want to emulate the standard PO format with different names
and line wrapping? (You will then have to also write a squid<->PO
conversion tool before translators can do anything)
PO Example:
#: templates/ERR_ACCESS_DENIED+html.body.div.blockquote.p:23
msgid "Access Denied."
msgstr "Access Denied."
#: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.p:29
msgid ""
"Please contact the <a href=\"mailto:%w%W\">cache administrator</a> if you "
msgstr ""
"Please contact the <a href=\"mailto:%w%W\">cache administrator</a> if you "
Note that:
"#:" == "descr:"
"msgid" == "name:"
"msgstr" == "value:"
empty line delimits entries in both.
'\' escaping supported by both.
"" on the first line indicates multi-line values to PO. With each string
line being individually "" wrapped.
PO uses \n to indicate internal newlines within the template text if it
must, however individual paragraphs like that are best-practice split
into two entries.
Amos
--
Please be using
Current Stable Squid 2.7.STABLE9 or 3.1.12
Beta testers wanted for 3.2.0.7 and 3.1.12.1