On 11 juin 07, at 09:11, Alessandro Cattelan wrote:
I'd been told before that it should be quite easy to convert a txt into
PO but unfortunately I don't know how to do it.

Basically what I have is a long list of terms and expressions in two
tab-separated columns, one for the English version and one for the
Italian translation. Something like this:

fraction        frazione        

I understand that a PO files with these entries would look something
like this:

msgid "fraction"
msgstr "frazione"

Is that correct?

I assume it would be quite easy to write a script for that, but I can't
do it.

Ale,

No need for a script.

Take the text editor you usually use and open your text file.
1) I assume that you understand regular expressions a little bit
2) and that the character between "fraction" and "frazione" in your text file is a tabulation

You'd have to search for:

^([^\t+])\t([^\t+])$

and to replace by

msgid "\1"\rmsgstr "\2"\r\r

The regexp may be slightly incorrect and will certainly depend on the text editor you use but give the above thing a try and fine tune until you get the proper results.

Cheers,
JC

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to