DOKK / manpages / debian 12 / publican / Publican::Translate.3pm.en
Publican::Translate(3pm) User Contributed Perl Documentation Publican::Translate(3pm)

Publican::Translate - Module for manipulating POT and PO files.

        use Publican::Translate;
        my $po = Publican::Translate->new();
        $po->update_pot();
        $po->update_po({ langs => 'fr-FR,de-DE' });
        $po->update_po({ langs => 'all' });
        $po->merge_xml({ lang  => 'fr-FR' });

Creates, updates and merges POT and PO files for Publican projects.

Create a new Publican::Translate object.

Snapshot the source to give translation a stable base.

Update the pot files

Merge XML and PO into a translated XML file.

Update the PO files using internal process or msgmerge

Merge updated POT files in to existing PO files.

Compare 2 strings and return how closely they match.

Returns a vlaue between 0 and 1, weighted for string length.

Update the PO files for all languages

Get the strings to translate from an XML::TreeBuilder object

Merge translations in to XML

Replace strings with translated strings.

Print the translation strings in an XML::TreeBuilder object to a POT file

Returns a valid PO header string.

Format a string for use in a PO file.

Generate translation statistics for the supplied language.

"unknown args %s"
All subs with named parameters will return this error when unexpected named arguments are provided.
"%s is a required argument"
Any sub with a mandatory parameter will return this error if the parameter is undef.

Publican requires no configuration files or environment variables.

Carp version Publican File::Path Term::ANSIColor DateTime Locale::PO XML::TreeBuilder String::Similarity

None reported.

No bugs have been reported.

Please report any bugs or feature requests to "publican-list@redhat.com", or through the web interface at <https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Publican&amp;component=publican>.

Jeff Fearn "<jfearn@redhat.com>"

2018-07-08 perl v5.26.2