From dongsheng.song at gmail.com Wed Mar 25 00:58:05 2009 Content-Type: multipart/mixed; boundary="===============2506754019709585478==" MIME-Version: 1.0 From: Dongsheng Song To: devel at lists.po4a.org Subject: Re: [Po4a-devel] Please respect TMP or TEMP environment variable, use "/tmp" as fail back Date: Wed, 25 Mar 2009 08:56:58 +0800 Message-ID: <4b3406f0903241756u57a96b81lb6eb28f2ccb59933@mail.gmail.com> In-Reply-To: 20090324200724.GB16421@nekral.nekral.homelinux.net --===============2506754019709585478== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 2009/3/25 Nicolas Fran=C3=A7ois : > On Tue, Mar 24, 2009 at 10:55:07PM +0800, dongsheng.song(a)gmail.com wrot= e: >> Please respect TMP and TEMP environment variable, use "/tmp" as fail bac= k. >> >> So we can use po4a in M$ windows box. >> >> > (undef,$tmp_filename)=3DFile::Temp->tempfile($filename."XXXX", >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0DIR =C2=A0 =C2=A0=3D> "/tmp", >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0OPEN =C2=A0 =3D> 0, >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0UNLINK =3D> 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 =3D> "/tmp"', po4a-translate and po4a-updatepo w= orks 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: #: ../en/book/book.xml:23 msgid "Version Control with Subversion" msgstr "Subversion =E6=9D=83=E5=A8=81=E6=8C=87=E5=8D=97" For external files: #. type: Content of: <book><appendix><sect1><title> #: ..\en\book\appa-quickstart.xml:115 msgid "High-Speed Tutorial" msgstr "=E5=BF=AB=E9=80=9F=E6=8C=87=E5=8D=97" I'm not familiar with perl, can you fix this ? --- Dongsheng Song --===============2506754019709585478==--