F Wolff ha scritto: > On Ma, 2007-06-11 at 09:43 +0200, Alessandro Cattelan wrote: >> F Wolff ha scritto: >>> Open your text file in OOo Calc as a CSV file and choose "tab" as the >>> delimiter. Save it as a normal CSV file (comma seperated) and then you >>> can convert it to PO using csv2po from the translate toolkit. Here is >>> the documentation for that: >>> http://translate.sourceforge.net/wiki/toolkit/csv2po >>> >>>> I have another question: how would Pootle manage two entries with two >>>> different translations, such as "frame" above? >>>> >>>> Ale. >>>> >>> It should suggest both. Note that (in the current implementation) the >>> target field (msgstr) of the terminology files are considered free form, >>> so you are free to add something like "frame (verb)" or "cornice (noun)" >>> to help the translators. >> >> I'm still having trouble with this... :o( >> >> I've done what you suggested above and I got a csv text with two >> tab-separated columns, one with the English text and the next with the >> Italian translation: >> >> "semi bold" "semigrassetto" >> "semi light" "semileggero" >> "semiautomatic" "semiautomatico" >> "semibold" "semigrassetto" >> "semicolon" "punto e virgola" >> "semicondensed" "semi compatto" >> "semiexpanded" "semiespanso" >> "semilight" "semichiaro" >> >> >> If I run the csv2po command, the po file is not created. I've tried >> running the csv2po on the single file and on a directory. Here's the output: >> >> >> [EMAIL PROTECTED]:~/Desktop$ ls csv/ >> glossariostaroffice.csv >> [EMAIL PROTECTED]:~/Desktop$ ls po/ >> [EMAIL PROTECTED]:~/Desktop$ csv2po csv/ po/ >> /usr/lib/python2.5/site-packages/translate/storage/po.py:31: >> DeprecationWarning: The sre module is deprecated, please import re. >> import sre >> processing 1 files... >> [###########################################] 100% >> [EMAIL PROTECTED]:~/Desktop$ ls po/ >> [EMAIL PROTECTED]:~/Desktop$ >> >> >> >> What am I doing wrong? >> >> Ale. > > You need to make a _comma_ separated file. This is the format that the > converter is expecting. Does OOo Calc give the option of choosing the > delimiter style? Perhaps it is using the tabs because the initial file > had them. Then you might need to open the file in a text editor and > replace the tabs with commas. Take note of the expected file format that > csv2po expects (three columns with source and target in the second and > third columns respectively). It might be easiest to ensure that your > file has this format, otherwise you will have to specify the format > using the --columnorder parameter. >
I think it worked now!!! Thank you! Here's the output: #: msgid "year" msgstr "anno" #: msgid "z axis" msgstr "asse Z" #: msgid "zero line" msgstr "linea dello zero" #: msgid "zero values" msgstr "valori zero" Would it make sense to put a comment in there which tells that the file comes from a glossary (for the translator to know where the term comes from)? Would the following work? #: Extracted from the SunGloss msgid "zero line" msgstr "linea dello zero" Thanks again, Ale. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]