[Po4a-devel] Please respect TMP or TEMP environment variable, use "/tmp" as fail back

Dongsheng Song dongsheng.song at gmail.com
Wed Mar 25 00:56:58 UTC 2009


2009/3/25 Nicolas François <nicolas.francois at centraliens.net>:
> On Tue, Mar 24, 2009 at 10:55:07PM +0800, dongsheng.song at gmail.com wrote:
>> Please respect TMP and TEMP environment variable, use "/tmp" as fail back.
>>
>> So we can use po4a in M$ windows box.
>>
>> > (undef,$tmp_filename)=File::Temp->tempfile($filename."XXXX",
>> >                                            DIR    => "/tmp",
>> >                                            OPEN   => 0,
>> >                                            UNLINK => 0);
>
> I propose to remove the usage of the DIR parameter.
> This means that the default tmpdir() from File::Spec is used.
> On Linux this is the directory specified by TMPDIR, with a fallback to
> /tmp
>
> Is this OK on Windows?
>
>
> BTW, I was already asked whether po4a works on Windows, but I could not
> answer because of lack of such platform. Does po4a works on Windows?
>
> I expected some issues with the end of lines on windows.
>
> Best Regards,
> --
> Nekral
>

Yes, When I remove 'DIR    => "/tmp"', po4a-translate and po4a-updatepo works
on Windows for docbook xml.

But the po4a-updatepo  generate different source reference
path-separator character
between master file and external files:

For matest file:

    #. type: Content of: <book><title>
    #: ../en/book/book.xml:23
    msgid "Version Control with Subversion"
    msgstr "Subversion 权威指南"

For external files:

    #. type: Content of: <book><appendix><sect1><title>
    #: ..\en\book\appa-quickstart.xml:115
    msgid "High-Speed Tutorial"
    msgstr "快速指南"

I'm not familiar with perl, can you fix this ?

---
Dongsheng Song



More information about the Po4a-devel mailing list