~ubuntu-branches/ubuntu/wily/po4a/wily

« back to all changes in this revision

Viewing changes to po4a-updatepo

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas FRANCOIS (Nekral), Denis Barbier, Updated program translations, Updated documentation translations
  • Date: 2010-08-25 23:16:59 UTC
  • mfrom: (1.3.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100825231659-rln0fgarttc4up62
Tags: 0.40.1-1
[ Denis Barbier ]
* New upstream release.
  + Style update in documentation.
  + Mention po4a-build in po4a(1). Closes: #565422
  + Use 'Software in the Public Interest'. Closes: #590502
  + Change header entry in PO files to be consistent with
    xgettext when creating POT files.
  + Trailing spaces must not be removed from translations
    if they are escaped.  Closes: #593106
* debian/control: Upstream repository has switched
  from CVS to SVN, update Vcs-* fields.

[ Updated program translations ]

* French, by David Prévot
* Spanish, by Omar Campagne
* Japanese, by KURASAWA Nozomu
* Esperanto, by Joop Eggen
* Swedish, by Martin Bagge
* Russian, by Yuri Kozlov (Closes: #592041)
* Estonian, by Annika
* Ukrainian, by Yuri Chornoivan
* Czech, by Michal Šimůnek (Closes: #592330)
* Portuguese, by António Moreira
* German, by Thomas Müller (Closes: #594258)

[ Updated documentation translations ]

* French, by David Prévot
* Spanish, by Omar Campagne
* Japanese, by KURASAWA Nozomu

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
eval 'exec perl -S $0 ${1+"$@"}'
3
3
    if $running_under_some_shell;
4
4
 
5
 
# pod-updatepo -- Update the po translation of POD data.
 
5
# pod-updatepo -- update the PO translation of POD data.
6
6
#
7
7
# Copyright 2002-2010 by SPI, inc.
8
8
#
13
13
 
14
14
=head1 NAME
15
15
 
16
 
po4a-updatepo - update the translation (in po format) of documentation
 
16
po4a-updatepo - update the translation (in PO format) of documentation
17
17
 
18
18
=head1 SYNOPSIS
19
19
 
23
23
 
24
24
=head1 DESCRIPTION
25
25
 
26
 
The po4a (po for anything) project goal is to ease translations (and more
 
26
The po4a (PO for anything) project goal is to ease translations (and more
27
27
interestingly, the maintenance of translations) using gettext tools on
28
28
areas where they were not expected like documentation.
29
29
 
30
 
The C<po4a-updatepo> script is in charge of updating po files to make
 
30
The C<po4a-updatepo> script is in charge of updating PO files to make
31
31
them reflect the changes made to the original documentation file. For that,
32
 
it converts the documentation file to a pot file, and call L<msgmerge(1)>
33
 
on this new pot and on the provided po files.
 
32
it converts the documentation file to a POT file, and call L<msgmerge(1)>
 
33
on this new POT and on the provided PO files.
34
34
 
35
 
It is possible to give more than one po file (if you want to update several
 
35
It is possible to give more than one PO file (if you want to update several
36
36
languages at once), and several documentation files (if you want to store
37
 
the translations of several documents in the same po file).
 
37
the translations of several documents in the same PO file).
38
38
 
39
 
If the master document has non-ascii characters, it will convert the po files
40
 
to utf-8 (if they weren't already), in order to allow non-standard characters
 
39
If the master document has non-ASCII characters, it will convert the PO files
 
40
to UTF-8 (if they weren't already), in order to allow non-standard characters
41
41
in a culture independent way.
42
42
 
43
 
=head1 COMMAND-LINE OPTIONS
 
43
=head1 OPTIONS
44
44
 
45
45
=over 4
46
46
 
60
60
 
61
61
=item -p, --po
62
62
 
63
 
Po file(s) to update. If these files do not exist, they are created by
 
63
PO file(s) to update. If these files do not exist, they are created by
64
64
C<po4a-updatepo>.
65
65
 
66
66
=item -o, --option
226
226
my ($doc)=Locale::Po4a::Chooser::new($format,%options);
227
227
 
228
228
map { -e $_ || die wrap_msg(gettext("File %s does not exist."), $_) } @masterfiles;
229
 
map { die wrap_msg(gettext("po4a-updatepo can't take the input po from stdin."))
 
229
map { die wrap_msg(gettext("po4a-updatepo can't take the input PO from stdin."))
230
230
        if $_ eq '-'  && !-e '-'} @pofiles;
231
231
 
232
232
my ($pot_filename);
235
235
                                           SUFFIX => ".pot",
236
236
                                           OPEN   => 0,
237
237
                                           UNLINK => 0)
238
 
    or die wrap_msg(gettext("Can't create a temporary pot file: %s"), $!);
 
238
    or die wrap_msg(gettext("Can't create a temporary POT file: %s"), $!);
239
239
 
240
240
 
241
241
print STDERR wrap_msg(gettext("Parse input files... ")) if $verbose;
264
264
        print STDERR wrap_msg(gettext("Creating %s:"), $po_filename)
265
265
            if $verbose;
266
266
        system ("cp",$pot_filename,$po_filename) == 0
267
 
            or die wrap_msg(gettext("Error while copying the po file: %s"), $!);
 
267
            or die wrap_msg(gettext("Error while copying the PO file: %s"), $!);
268
268
    }
269
269
}
270
270