1Publican::Translate(3)User Contributed Perl DocumentationPublican::Translate(3)
2
3
4
6 Publican::Translate - Module for manipulating POT and PO files.
7
9 This document describes Publican::Translate version $VERSION
10
12 use Publican::Translate;
13 my $po = Publican::Translate->new();
14
15 $po->update_pot();
16 $po->update_po({ langs => 'fr-FR,de-DE' });
17 $po->update_po({ langs => 'all' });
18 $po->merge_xml({ lang => 'fr-FR' });
19
21 Creates, updates and merges POT and PO files for Publican projects.
22
24 new
25 Create a new Publican::Translate object.
26
27 trans_drop
28 Snapshot the source to give translation a stable base.
29
30 update_pot
31 Update the pot files
32
33 po2xml
34 Merge XML and PO into a translated XML file.
35
36 update_po
37 Update the PO files using internal process or msgmerge
38
39 merge_po
40 Merge updated POT files in to existing PO files.
41
42 TODO Impliment this...
43
44 match_strings
45 Compare 2 strings and return how closely they match.
46
47 Returns a vlaue between 0 and 1, weighted for string length.
48
49 update_po_all
50 Update the PO files for all languages
51
52 get_msgs
53 Get the strings to translate from an XML::TreeBuilder object
54
55 merge_msgs
56 Merge translations in to XML
57
58 translate
59 Replace strings with translated strings.
60
61 print_msgs
62 Print the translation strings in an XML::TreeBuilder object to a POT
63 file
64
65 header
66 Returns a valid PO header string.
67
68 normalise
69 Remove extraneous white space.
70
71 po_format
72 Format a string for use in a PO file.
73
74 po_unformat
75 Remove PO formatting from a string.
76
77 po_report
78 Generate translation statistics for the supplied language.
79
81 "unknown args %s"
82 All subs with named parameters will return this error when
83 unexpected named arguments are provided.
84
85 "%s is a required argument"
86 Any sub with a mandatory parameter will return this error if the
87 parameter is undef.
88
90 Publican requires no configuration files or environment variables.
91
93 Carp version Publican File::Copy::Recursive File::Path
94
96 None reported.
97
99 No bugs have been reported.
100
101 Please report any bugs or feature requests to
102 "publican-list@redhat.com", or through the web interface at
103 <https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Publican&component=publican>.
104
106 Jeff Fearn "<jfearn@redhat.com>"
107
108
109
110perl v5.16.3 2014-12-15 Publican::Translate(3)