New in version 1.2.
Converts iCalendar (*.ics) files to Gettext PO format.
ical2po [options] <ical> <po>
po2ical [options] -t <ical> <po> <ical>
Where:
<ical> |
is a valid .ics file or directory of those files |
<po> |
is a directory of PO or POT files |
Options (ical2po):
show program’s version number and exit
show this help message and exit
output a manpage based on the help
show progress as: dots, none, bar, names, verbose
show errorlevel as: none, message, exception, traceback
read from INPUT in ics format
exclude names matching EXCLUDE from input paths
write to OUTPUT in po, pot formats
read from TEMPLATE in ics format
skip conversion if the output file has newer timestamp
output PO Templates (.pot) rather than PO files (.po)
what to do with duplicate strings (identical source text): merge, msgctxt (default: ‘msgctxt’)
Options (po2ical):
show program’s version number and exit
show this help message and exit
output a manpage based on the help
show progress as: dots, none, bar, names, verbose
show errorlevel as: none, message, exception, traceback
read from INPUT in po, pot formats
exclude names matching EXCLUDE from input paths
write to OUTPUT in ics format
read from TEMPLATE in ics format
skip conversion if the output file has newer timestamp
only convert files where the translation completion is above PERCENT
use translations marked fuzzy
don’t use translations marked fuzzy (default)
This example looks at roundtrip of iCalendar translations. While you can do recovery of translations, its unlikely that you will ever need to do that.
First we need to create a set of POT files.
ical2po -P ical.ics ical.pot
The ical.ics file is converted to Gettext POT files called ical.pot. Directories of iCalendar files can also be processed.
Begin translating the ical.pot file by first copying it to make a PO file.
cp ical.pot ical-af.po
You are now in a position to translate the file ical-af.po in your favourite translation tool.
Once translated you can convert back as follows:
po2ical -t ical.ics ical-af.po ical-af.ics
Your translations found in the Afrikaans PO file, ical-af.po
, will be
converted to .ics using the file ical.ics
as a template and creating your
newly translated .ics file ical-af.ics
.
To update your translations simply redo the POT creation step and make use of pot2po to bring your translation up-to-date.
The converter will only process events in the calendar file, the file itself can contain many other things that could be localisable. Please raise a bug if you want to extract additional items.
The converter does not make use of the LANGUAGE attribute which is permitted in the format. The LANGUAGE attribute does not aid multilingualism in this context so is ignored.
The converter could conceivably also process vCard files, but this has not been implemented for lack of a clear need. Please raise a bug with an example if you have such a file that could benefit from localisation.