Hi all,
I did an incredible discovery this morning: the translate-toolkit
package. This package includes a magic tool called "po2txt", which can
be used to convert the related .po files back to an error-detail.txt file.
I am also attaching a new version of the script. This version avoids
duplicate records from po file.
On 06/16/2011 03:45 AM, Amos Jeffries wrote:
> On Wed, 15 Jun 2011 16:24:56 -0600, Alex Rousskov wrote:
>> On 06/15/2011 03:17 PM, Tsantilas Christos wrote:
>>
>>> From what I can understand a translator will use a program like the
>>> poedit to read the above output and produce a new file for a language.
>>> For example the error-details.txt.el.po file.
>>
>> I thought the translation blobs produced by your script will go into
>> existing .po files that are already used for translating error pages and
>> such. In other words, for any supported language, Squid will have a
>> single .po file that Squid loads and uses for translations. Am I off
>> track here? Amos?
>
> That was the idea. Yes.
Yes we can always use one po file. We can just add the output of my
script to existing po files. eg:
# mk-error-details-po.pl error-details.txt >> en.po
or even better using the msgcat utility:
# mk-error-details-po.pl error-details.txt > error-details.po
# msgcat en.po error-details.po
>
> - the English "template" version of error-details.txt needs to go in
> errors/error-details.txt,
> - scripts/update-pot.sh needs to run your convert right after the
> per-page dictionaries for-loop. and before the call to msgcat. You can
> see from that for-loop where the resulting .po needs to be.
OK I see. All this thinks need to be integrated to Makefile and
update-pot.sh script
>
> That gets it into the system for people to translate.
>
> As for getting it out again....
>
> I think po2text in error/Makefile.am ".po.lang:" target should produce
> the translated version of errors/el/error-details.txt or
> errors/error-details.el.txt / .txt.el
We can use the po2txt utility like follows:
po2txt -t error-details.txt -i error-details.po >
errors/en/error-details.txt
or if we merged error-details.po file to the general po files:
po2txt -t error-details.txt -i en.po > errors/en/error-details.txt
Looks OK.
>
> Then the question becomes, how do we allow the admin to edit the
> results? an /etc/squid/error-details.txt which loads first and overrides
> anything we provide?
It follows the same policy with the error pages templates.
If I am not wrong if the user has configured an error_directory will get
the error details from here else from the related "share/errors/en/"
related path.
>
> Amos
>
>
This archive was generated by hypermail 2.2.0 : Thu Jun 16 2011 - 12:00:04 MDT