Make Perl strings translatable using perl-libintl.
authorRichard Jones <rjones@trick.home.annexia.org>
Wed, 15 Jul 2009 13:24:41 +0000 (14:24 +0100)
committerRichard Jones <rjones@trick.home.annexia.org>
Wed, 15 Jul 2009 14:30:23 +0000 (15:30 +0100)
All Perl strings are now marked as translatable using __"string"
or __x("string {placeholder}", placeholder => $_).  Perl strings
now get copied to the PO files.

The po/POTFILES.in file is now updated automagically whenever we
add new *.c, *.pl or *.pm files into the repository.

Makefile.am
README
configure.ac
df/virt-df.pl
inspector/virt-inspector.pl
perl/lib/Sys/Guestfs/Lib.pm
po/Makevars
po/POTFILES.in
po/libguestfs.pot
po/pl.po
v2v/virt-v2v.pl

index fe960b7..3f27693 100644 (file)
@@ -149,6 +149,15 @@ dist-hook:
        ./gitlog-to-changelog > ChangeLog
        cp ChangeLog $(distdir)/ChangeLog
 
+# Update the list of translatable files in po/POTFILES.in.
+all-local:
+       find -name '*.c' -o -name '*.pl' -o -name '*.pm' | \
+       grep -v '/blib/' | \
+       grep -v '/capitests/' | \
+       grep -v '/examples/' | \
+       sort | \
+       sed 's,^\./,,' > $(srcdir)/po/POTFILES.in
+
 # Pkgconfig.
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/README b/README
index 23e270b..d56d21e 100644 (file)
--- a/README
+++ b/README
@@ -77,6 +77,8 @@ bindings
 - (Optional) Perl XML::XPath, Sys::Virt modules (for libvirt support
 in virt-inspector).
 
+- (Optional, but highly recommended) perl-libintl for translating perl code.
+
 Running ./configure will check you have all the requirements installed
 on your machine.
 
index 3ee1102..4bb7689 100644 (file)
@@ -306,7 +306,7 @@ AC_CHECK_PROG([PERL],[perl],[perl],[no])
 dnl Check for Perl modules that must be present to compile and
 dnl test the Perl bindings.
 missing_perl_modules=no
-for pm in Test::More Test::Pod Test::Pod::Coverage ExtUtils::MakeMaker; do
+for pm in Test::More Test::Pod Test::Pod::Coverage ExtUtils::MakeMaker Locale::TextDomain; do
     AC_MSG_CHECKING([for $pm])
     if ! perl -M$pm -e1 >/dev/null 2>&1; then
         AC_MSG_RESULT([no])
@@ -519,7 +519,7 @@ AM_CONDITIONAL([HAVE_HASKELL],
 
 dnl Check for Perl modules needed by virt-df, inspector and V2V.
 missing_perl_modules=no
-for pm in Pod::Usage Getopt::Long Sys::Virt Data::Dumper XML::Writer; do
+for pm in Pod::Usage Getopt::Long Sys::Virt Data::Dumper XML::Writer Locale::TextDomain; do
     AC_MSG_CHECKING([for $pm])
     if ! perl -M$pm -e1 >/dev/null 2>&1; then
         AC_MSG_RESULT([no])
index 0ccc7a8..4cac896 100755 (executable)
@@ -28,6 +28,7 @@ use Getopt::Long;
 use Data::Dumper;
 use File::Temp qw/tempdir/;
 use XML::Writer;
+use Locale::TextDomain 'libguestfs';
 
 =encoding utf8
 
@@ -254,21 +255,21 @@ sub print_stat
 
 sub print_title
 {
-    my @cols = ("Virtual Machine", "Filesystem");
+    my @cols = (__"Virtual Machine", __"Filesystem");
     if (!$inodes) {
        if (!$human) {
-           push @cols, "1K-blocks";
+           push @cols, __"1K-blocks";
        } else {
-           push @cols, "Size";
+           push @cols, __"Size";
        }
-       push @cols, "Used";
-       push @cols, "Available";
-       push @cols, "Use%";
+       push @cols, __"Used";
+       push @cols, __"Available";
+       push @cols, __"Use%";
     } else {
-       push @cols, "Inodes";
-       push @cols, "IUsed";
-       push @cols, "IFree";
-       push @cols, "IUse%";
+       push @cols, __"Inodes";
+       push @cols, __"IUsed";
+       push @cols, __"IFree";
+       push @cols, __"IUse%";
     }
 
     if (!$csv) {
index cd5427a..3754ced 100755 (executable)
@@ -27,6 +27,7 @@ use Pod::Usage;
 use Getopt::Long;
 use Data::Dumper;
 use XML::Writer;
+use Locale::TextDomain 'libguestfs';
 
 # Optional:
 eval "use YAML::Any;";
@@ -201,7 +202,7 @@ if ($version) {
     print "$h{major}.$h{minor}.$h{release}$h{extra}\n";
     exit
 }
-pod2usage ("$0: no image or VM names given") if @ARGV == 0;
+pod2usage (__"virt-inspector: no image or VM names given") if @ARGV == 0;
 
 my $rw = 0;
 $rw = 1 if $output eq "fish";
@@ -293,7 +294,7 @@ if ($output !~ /.*fish$/) {
 if ($output eq "fish" || $output eq "ro-fish") {
     my @osdevs = keys %$oses;
     # This only works if there is a single OS.
-    die "--fish output is only possible with a single OS\n" if @osdevs != 1;
+    die __"--fish output is only possible with a single OS\n" if @osdevs != 1;
 
     my $root_dev = $osdevs[0];
 
@@ -319,7 +320,7 @@ elsif ($output eq "perl") {
 
 # YAML output
 elsif ($output eq "yaml") {
-    die "virt-inspector: no YAML support\n"
+    die __"virt-inspector: no YAML support\n"
        unless exists $INC{"YAML/Any.pm"};
 
     print Dump(%$oses);
@@ -354,13 +355,13 @@ sub output_text_os
     print $os->{version}, " " if exists $os->{version};
     print "on ", $os->{root_device}, ":\n";
 
-    print "  Mountpoints:\n";
+    print __"  Mountpoints:\n";
     my $mounts = $os->{mounts};
     foreach (sort keys %$mounts) {
        printf "    %-30s %s\n", $mounts->{$_}, $_
     }
 
-    print "  Filesystems:\n";
+    print __"  Filesystems:\n";
     my $filesystems = $os->{filesystems};
     foreach (sort keys %$filesystems) {
        print "    $_:\n";
@@ -378,7 +379,7 @@ sub output_text_os
        my %aliases = %{$os->{modprobe_aliases}};
        my @keys = sort keys %aliases;
        if (@keys) {
-           print "  Modprobe aliases:\n";
+           print __"  Modprobe aliases:\n";
            foreach (@keys) {
                printf "    %-30s %s\n", $_, $aliases{$_}->{modulename}
            }
@@ -389,7 +390,7 @@ sub output_text_os
        my %modvers = %{$os->{initrd_modules}};
        my @keys = sort keys %modvers;
        if (@keys) {
-           print "  Initrd modules:\n";
+           print __"  Initrd modules:\n";
            foreach (@keys) {
                my @modules = @{$modvers{$_}};
                print "    $_:\n";
@@ -398,13 +399,13 @@ sub output_text_os
        }
     }
 
-    print "  Applications:\n";
+    print __"  Applications:\n";
     my @apps =  @{$os->{apps}};
     foreach (@apps) {
        print "    $_->{name} $_->{version}\n"
     }
 
-    print "  Kernels:\n";
+    print __"  Kernels:\n";
     my @kernels = @{$os->{kernels}};
     foreach (@kernels) {
        print "    $_->{version}\n";
@@ -415,7 +416,7 @@ sub output_text_os
     }
 
     if (exists $os->{root}->{registry}) {
-       print "  Windows Registry entries:\n";
+       print __"  Windows Registry entries:\n";
        # These are just lumps of text - dump them out.
        foreach (@{$os->{root}->{registry}}) {
            print "$_\n";
index d5dfb4e..925c494 100644 (file)
@@ -22,6 +22,7 @@ use warnings;
 
 use Sys::Guestfs;
 use File::Temp qw/tempdir/;
+use Locale::TextDomain 'libguestfs';
 
 # Optional:
 eval "use Sys::Virt;";
@@ -131,35 +132,36 @@ sub open_guest
     } elsif (ref ($first) eq "SCALAR") {
        @images = ($first);
     } else {
-       die "open_guest: first parameter must be a string or an arrayref"
+       die __"open_guest: first parameter must be a string or an arrayref"
     }
 
     my ($conn, $dom);
 
     if (-e $images[0]) {
        foreach (@images) {
-           die "guest image $_ does not exist or is not readable"
+           die __x("guest image {imagename} does not exist or is not readable",
+                   imagename => $_)
                unless -r $_;
        }
     } else {
-       die "open_guest: no libvirt support (install Sys::Virt, XML::XPath and XML::XPath::XMLParser)"
+       die __"open_guest: no libvirt support (install Sys::Virt, XML::XPath and XML::XPath::XMLParser)"
            unless exists $INC{"Sys/Virt.pm"} &&
            exists $INC{"XML/XPath.pm"} &&
            exists $INC{"XML/XPath/XMLParser.pm"};
 
-       die "open_guest: too many domains listed on command line"
+       die __"open_guest: too many domains listed on command line"
            if @images > 1;
 
        $conn = Sys::Virt->new (readonly => 1, @_);
-       die "open_guest: cannot connect to libvirt" unless $conn;
+       die __"open_guest: cannot connect to libvirt" unless $conn;
 
        my @doms = $conn->list_defined_domains ();
-       my $isitinactive = "an inactive libvirt domain";
+       my $isitinactive = 1;
        unless ($readwrite) {
            # In the case where we want read-only access to a domain,
            # allow the user to specify an active domain too.
            push @doms, $conn->list_domains ();
-           $isitinactive = "a libvirt domain";
+           $isitinactive = 0;
        }
        foreach (@doms) {
            if ($_->get_name () eq $images[0]) {
@@ -167,7 +169,16 @@ sub open_guest
                last;
            }
        }
-       die "$images[0] is not the name of $isitinactive\n" unless $dom;
+
+       unless ($dom) {
+           if ($isitinactive) {
+               die __x("{imagename} is not the name of an inactive libvirt domain\n",
+                       imagename => $images[0]);
+           } else {
+               die __x("{imagename} is not the name of a libvirt domain\n",
+                       imagename => $images[0]);
+           }
+       }
 
        # Get the names of the image(s).
        my $xml = $dom->get_xml_description ();
@@ -176,7 +187,9 @@ sub open_guest
        my @disks = $p->findnodes ('//devices/disk/source/@dev');
        push (@disks, $p->findnodes ('//devices/disk/source/@file'));
 
-       die "$images[0] seems to have no disk devices\n" unless @disks;
+       die __x("{imagename} seems to have no disk devices\n",
+               imagename => $images[0])
+           unless @disks;
 
        @images = map { $_->getData } @disks;
     }
@@ -258,7 +271,7 @@ sub resolve_windows_path
     my $path = shift;
 
     if (substr ($path, 0, 1) ne "/") {
-       warn "resolve_windows_path: path must start with a / character";
+       warn __"resolve_windows_path: path must start with a / character";
        return undef;
     }
 
@@ -740,7 +753,7 @@ sub _load_windows_registry
     close SAVEERR;
 
     unless ($res == 0) {
-       warn "reged command failed: $?";
+       warn __x("reged command failed: {errormsg}", errormsg => $?);
        return;
     }
 
@@ -749,7 +762,7 @@ sub _load_windows_registry
     # it.
     my $content;
     unless (open F, "$dir/out") {
-       warn "no output from reged command: $!";
+       warn __x("no output from reged command: {errormsg}", errormsg => $!);
        return;
     }
     { local $/ = undef; $content = <F>; }
@@ -919,7 +932,7 @@ sub _find_filesystem
                return ($_, $fses->{$_});
            }
        }
-       warn "unknown filesystem label $label\n";
+       warn __x("unknown filesystem label {label}\n", label => $label);
        return ();
     } elsif (/^UUID=(.*)/) {
        my $uuid = $1;
@@ -929,7 +942,7 @@ sub _find_filesystem
                return ($_, $fses->{$_});
            }
        }
-       warn "unknown filesystem UUID $uuid\n";
+       warn __x("unknown filesystem UUID {uuid}\n", uuid => $uuid);
        return ();
     } else {
        return ($_, $fses->{$_}) if exists $fses->{$_};
@@ -952,7 +965,7 @@ sub _find_filesystem
 
        return () if m{/dev/cdrom};
 
-       warn "unknown filesystem $_\n";
+       warn __x("unknown filesystem {fs}\n", fs => $_);
        return ();
     }
 }
@@ -1171,7 +1184,8 @@ sub _check_for_modprobe_aliases
 
         for my $path ( @results ) {
             $path =~ m{^/files(.*)/alias(?:\[\d*\])?$}
-                or die("$path doesn't match augeas pattern");
+                or die __x("{path} doesn't match augeas pattern",
+                          path => $path);
             my $file = $1;
 
             my $alias;
@@ -1220,7 +1234,8 @@ sub _check_for_initrd
                    @modules;
                    $initrd_modules{$version} = \@modules
                } else {
-                   warn "/boot/$initrd: could not read initrd format";
+                   warn __x("{filename}: could not read initrd format",
+                            filename => "/boot/$initrd");
                }
            }
        }
index 2ef4f7e..76b47a4 100644 (file)
@@ -8,7 +8,8 @@ subdir = po
 top_builddir = ..
 
 # These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+# --keyword=__ etc are for Perl code using perl-libintl.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=__ --keyword=__x
 
 # This is the copyright holder that gets inserted into the header of the
 # $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
index 549506f..76e97e7 100644 (file)
@@ -1,3 +1,51 @@
+daemon/augeas.c
+daemon/blockdev.c
+daemon/checksum.c
+daemon/cmp.c
+daemon/command.c
+daemon/cpmv.c
+daemon/debug.c
+daemon/devsparts.c
+daemon/df.c
+daemon/dir.c
+daemon/dmesg.c
+daemon/dropcaches.c
+daemon/du.c
+daemon/ext2.c
+daemon/file.c
+daemon/find.c
+daemon/fsck.c
+daemon/glob.c
+daemon/grub.c
+daemon/guestfsd.c
+daemon/headtail.c
+daemon/hexdump.c
+daemon/initrd.c
+daemon/ls.c
+daemon/lvm.c
+daemon/mknod.c
+daemon/mount.c
+daemon/names.c
+daemon/ntfs.c
+daemon/pingdaemon.c
+daemon/proto.c
+daemon/readdir.c
+daemon/scrub.c
+daemon/sfdisk.c
+daemon/sleep.c
+daemon/stat.c
+daemon/strings.c
+daemon/stubs.c
+daemon/swap.c
+daemon/sync.c
+daemon/tar.c
+daemon/umask.c
+daemon/upload.c
+daemon/wc.c
+daemon/xattr.c
+daemon/zero.c
+daemon/zerofree.c
+df/virt-df.pl
 fish/alloc.c
 fish/cmds.c
 fish/completion.c
@@ -8,6 +56,23 @@ fish/fish.c
 fish/glob.c
 fish/lcd.c
 fish/more.c
+fish/rc.c
+fish/rc_protocol.c
+fish/reopen.c
+fish/tilde.c
 fish/time.c
-src/guestfs.c
+inspector/virt-inspector.pl
+java/com_redhat_et_libguestfs_GuestFS.c
+ocaml/guestfs_c_actions.c
+ocaml/guestfs_c.c
+perl/bindtests.pl
+perl/Guestfs.c
+perl/lib/Sys/Guestfs/Lib.pm
+perl/lib/Sys/Guestfs.pm
+python/guestfs-py.c
+ruby/ext/guestfs/_guestfs.c
 src/guestfs-actions.c
+src/guestfs-bindtests.c
+src/guestfs.c
+src/guestfs_protocol.c
+v2v/virt-v2v.pl
index 8770f32..0e74303 100644 (file)
@@ -9,7 +9,7 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
 "component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2009-07-14 14:51+0100\n"
+"POT-Creation-Date: 2009-07-15 14:22+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,6 +17,50 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#: df/virt-df.pl:258
+msgid "Virtual Machine"
+msgstr ""
+
+#: df/virt-df.pl:258
+msgid "Filesystem"
+msgstr ""
+
+#: df/virt-df.pl:261
+msgid "1K-blocks"
+msgstr ""
+
+#: df/virt-df.pl:263
+msgid "Size"
+msgstr ""
+
+#: df/virt-df.pl:265
+msgid "Used"
+msgstr ""
+
+#: df/virt-df.pl:266
+msgid "Available"
+msgstr ""
+
+#: df/virt-df.pl:267
+msgid "Use%"
+msgstr ""
+
+#: df/virt-df.pl:269
+msgid "Inodes"
+msgstr ""
+
+#: df/virt-df.pl:270
+msgid "IUsed"
+msgstr ""
+
+#: df/virt-df.pl:271
+msgid "IFree"
+msgstr ""
+
+#: df/virt-df.pl:272
+msgid "IUse%"
+msgstr ""
+
 #: fish/alloc.c:39
 #, c-format
 msgid "use 'alloc file size' to create an image\n"
@@ -134,7 +178,7 @@ msgstr ""
 msgid "guestfish: cannot use --listen and --file options at the same time\n"
 msgstr ""
 
-#: fish/fish.c:519
+#: fish/fish.c:520
 #, c-format
 msgid ""
 "\n"
@@ -146,77 +190,77 @@ msgid ""
 "\n"
 msgstr ""
 
-#: fish/fish.c:597
+#: fish/fish.c:600
 #, c-format
 msgid "guestfish: unterminated double quote\n"
 msgstr ""
 
-#: fish/fish.c:602 fish/fish.c:617
+#: fish/fish.c:605 fish/fish.c:620
 #, c-format
 msgid "guestfish: command arguments not separated by whitespace\n"
 msgstr ""
 
-#: fish/fish.c:612
+#: fish/fish.c:615
 #, c-format
 msgid "guestfish: unterminated single quote\n"
 msgstr ""
 
-#: fish/fish.c:657
+#: fish/fish.c:665
 #, c-format
 msgid "guestfish: internal error parsing string at '%s'\n"
 msgstr ""
 
-#: fish/fish.c:670
+#: fish/fish.c:682
 #, c-format
 msgid "guestfish: too many arguments\n"
 msgstr ""
 
-#: fish/fish.c:699
+#: fish/fish.c:711
 #, c-format
 msgid "guestfish: empty command on command line\n"
 msgstr ""
 
-#: fish/fish.c:826
+#: fish/fish.c:838
 msgid "display a list of commands or help on a command"
 msgstr ""
 
-#: fish/fish.c:828
+#: fish/fish.c:840
 msgid "quit guestfish"
 msgstr ""
 
-#: fish/fish.c:831
+#: fish/fish.c:843
 msgid "allocate an image"
 msgstr ""
 
-#: fish/fish.c:833
+#: fish/fish.c:845
 msgid "display a line of text"
 msgstr ""
 
-#: fish/fish.c:835
+#: fish/fish.c:847
 msgid "edit a file in the image"
 msgstr ""
 
-#: fish/fish.c:837
+#: fish/fish.c:849
 msgid "local change directory"
 msgstr ""
 
-#: fish/fish.c:839
+#: fish/fish.c:851
 msgid "expand wildcards in command"
 msgstr ""
 
-#: fish/fish.c:841
+#: fish/fish.c:853
 msgid "view a file in the pager"
 msgstr ""
 
-#: fish/fish.c:843
+#: fish/fish.c:855
 msgid "close and reopen libguestfs handle"
 msgstr ""
 
-#: fish/fish.c:845
+#: fish/fish.c:857
 msgid "measure time taken to run command"
 msgstr ""
 
-#: fish/fish.c:857
+#: fish/fish.c:869
 #, c-format
 msgid ""
 "alloc - allocate an image\n"
@@ -236,7 +280,7 @@ msgid ""
 "    <nn>sects        number of 512 byte sectors\n"
 msgstr ""
 
-#: fish/fish.c:873
+#: fish/fish.c:885
 #, c-format
 msgid ""
 "echo - display a line of text\n"
@@ -245,7 +289,7 @@ msgid ""
 "    This echos the parameters to the terminal.\n"
 msgstr ""
 
-#: fish/fish.c:880
+#: fish/fish.c:892
 #, c-format
 msgid ""
 "edit - edit a file in the image\n"
@@ -263,7 +307,7 @@ msgid ""
 "    (> 2 MB) or binary files containing \\0 bytes.\n"
 msgstr ""
 
-#: fish/fish.c:894
+#: fish/fish.c:906
 #, c-format
 msgid ""
 "lcd - local change directory\n"
@@ -274,7 +318,7 @@ msgid ""
 "    place.\n"
 msgstr ""
 
-#: fish/fish.c:901
+#: fish/fish.c:913
 #, c-format
 msgid ""
 "glob - expand wildcards in command\n"
@@ -285,7 +329,7 @@ msgid ""
 "    once for each expanded argument.\n"
 msgstr ""
 
-#: fish/fish.c:908
+#: fish/fish.c:920
 #, c-format
 msgid ""
 "help - display a list of commands or help on a command\n"
@@ -293,7 +337,7 @@ msgid ""
 "     help\n"
 msgstr ""
 
-#: fish/fish.c:913
+#: fish/fish.c:925
 #, c-format
 msgid ""
 "more - view a file in the pager\n"
@@ -311,14 +355,14 @@ msgid ""
 "    (> 2 MB) or binary files containing \\0 bytes.\n"
 msgstr ""
 
-#: fish/fish.c:929
+#: fish/fish.c:941
 #, c-format
 msgid ""
 "quit - quit guestfish\n"
 "     quit\n"
 msgstr ""
 
-#: fish/fish.c:932
+#: fish/fish.c:944
 #, c-format
 msgid ""
 "reopen - close and reopen the libguestfs handle\n"
@@ -329,7 +373,7 @@ msgid ""
 "exits.  However this is occasionally useful for testing.\n"
 msgstr ""
 
-#: fish/fish.c:939
+#: fish/fish.c:951
 #, c-format
 msgid ""
 "time - measure time taken to run command\n"
@@ -339,7 +383,7 @@ msgid ""
 "    time afterwards.\n"
 msgstr ""
 
-#: fish/fish.c:945
+#: fish/fish.c:957
 #, c-format
 msgid "%s: command not known, use -h to list all commands\n"
 msgstr ""
@@ -364,11 +408,165 @@ msgstr ""
 msgid "use '%s filename' to page a file\n"
 msgstr ""
 
+#: fish/rc.c:134
+#, c-format
+msgid "guestfish: protocol error: could not read 'hello' message\n"
+msgstr ""
+
+#: fish/rc.c:139
+#, c-format
+msgid ""
+"guestfish: protocol error: version mismatch, server version '%s' does not "
+"match client version '%s'.  The two versions must match exactly.\n"
+msgstr ""
+
+#: fish/rc.c:213 fish/rc.c:227
+#, c-format
+msgid "guestfish: remote: looks like the server is not running\n"
+msgstr ""
+
+#: fish/rc.c:237 fish/rc.c:251
+#, c-format
+msgid "guestfish: protocol error: could not send initial greeting to server\n"
+msgstr ""
+
+#: fish/rc.c:262
+#, c-format
+msgid "guestfish: protocol error: could not decode reply from server\n"
+msgstr ""
+
+#: fish/reopen.c:36
+#, c-format
+msgid "'reopen' command takes no parameters\n"
+msgstr ""
+
+#: fish/reopen.c:46
+#, c-format
+msgid "reopen: guestfs_create: failed to create handle\n"
+msgstr ""
+
 #: fish/time.c:35
 #, c-format
 msgid "use 'time command [args...]'\n"
 msgstr ""
 
+#: inspector/virt-inspector.pl:205
+msgid "virt-inspector: no image or VM names given"
+msgstr ""
+
+#: inspector/virt-inspector.pl:297
+msgid "--fish output is only possible with a single OS\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:323
+msgid "virt-inspector: no YAML support\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:358
+msgid "  Mountpoints:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:364
+msgid "  Filesystems:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:382
+msgid "  Modprobe aliases:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:393
+msgid "  Initrd modules:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:402
+msgid "  Applications:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:408
+msgid "  Kernels:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:419
+msgid "  Windows Registry entries:\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:135 perl/lib/Sys/Guestfs/Lib.pm:135
+msgid "open_guest: first parameter must be a string or an arrayref"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:142 perl/lib/Sys/Guestfs/Lib.pm:142
+#, perl-brace-format
+msgid "guest image {imagename} does not exist or is not readable"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:147 perl/lib/Sys/Guestfs/Lib.pm:147
+msgid ""
+"open_guest: no libvirt support (install Sys::Virt, XML::XPath and XML::"
+"XPath::XMLParser)"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:152 perl/lib/Sys/Guestfs/Lib.pm:152
+msgid "open_guest: too many domains listed on command line"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:156 perl/lib/Sys/Guestfs/Lib.pm:156
+msgid "open_guest: cannot connect to libvirt"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:175 perl/lib/Sys/Guestfs/Lib.pm:175
+#, perl-brace-format
+msgid "{imagename} is not the name of an inactive libvirt domain\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:178 perl/lib/Sys/Guestfs/Lib.pm:178
+#, perl-brace-format
+msgid "{imagename} is not the name of a libvirt domain\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:190 perl/lib/Sys/Guestfs/Lib.pm:190
+#, perl-brace-format
+msgid "{imagename} seems to have no disk devices\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:274 perl/lib/Sys/Guestfs/Lib.pm:274
+msgid "resolve_windows_path: path must start with a / character"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:756 perl/lib/Sys/Guestfs/Lib.pm:756
+#, perl-brace-format
+msgid "reged command failed: {errormsg}"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:765 perl/lib/Sys/Guestfs/Lib.pm:765
+#, perl-brace-format
+msgid "no output from reged command: {errormsg}"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:935 perl/lib/Sys/Guestfs/Lib.pm:935
+#, perl-brace-format
+msgid "unknown filesystem label {label}\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:945 perl/lib/Sys/Guestfs/Lib.pm:945
+#, perl-brace-format
+msgid "unknown filesystem UUID {uuid}\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:968 perl/lib/Sys/Guestfs/Lib.pm:968
+#, perl-brace-format
+msgid "unknown filesystem {fs}\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:1187 perl/lib/Sys/Guestfs/Lib.pm:1187
+#, perl-brace-format
+msgid "{path} doesn't match augeas pattern"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:1237 perl/lib/Sys/Guestfs/Lib.pm:1237
+#, perl-brace-format
+msgid "{filename}: could not read initrd format"
+msgstr ""
+
 #: src/guestfs.c:309
 #, c-format
 msgid "guestfs_close: called twice on the same handle\n"
@@ -617,3 +815,15 @@ msgstr ""
 #: src/guestfs.c:2540
 msgid "select_main_loop_run: this cannot be called recursively"
 msgstr ""
+
+#: v2v/virt-v2v.pl:174
+msgid "virt-v2v: no image or VM names given"
+msgstr ""
+
+#: v2v/virt-v2v.pl:208
+msgid "no root device found in this operating system image"
+msgstr ""
+
+#: v2v/virt-v2v.pl:209
+msgid "multiboot operating systems are not supported by v2v"
+msgstr ""
index edee3a8..a8d329b 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -6,7 +6,7 @@ msgstr ""
 "Project-Id-Version: pl\n"
 "Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
 "component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2009-07-14 14:51+0100\n"
+"POT-Creation-Date: 2009-07-15 14:22+0100\n"
 "PO-Revision-Date: 2009-06-22 21:16+0200\n"
 "Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
 "Language-Team: Polish <pl@li.org>\n"
@@ -14,6 +14,50 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#: df/virt-df.pl:258
+msgid "Virtual Machine"
+msgstr ""
+
+#: df/virt-df.pl:258
+msgid "Filesystem"
+msgstr ""
+
+#: df/virt-df.pl:261
+msgid "1K-blocks"
+msgstr ""
+
+#: df/virt-df.pl:263
+msgid "Size"
+msgstr ""
+
+#: df/virt-df.pl:265
+msgid "Used"
+msgstr ""
+
+#: df/virt-df.pl:266
+msgid "Available"
+msgstr ""
+
+#: df/virt-df.pl:267
+msgid "Use%"
+msgstr ""
+
+#: df/virt-df.pl:269
+msgid "Inodes"
+msgstr ""
+
+#: df/virt-df.pl:270
+msgid "IUsed"
+msgstr ""
+
+#: df/virt-df.pl:271
+msgid "IFree"
+msgstr ""
+
+#: df/virt-df.pl:272
+msgid "IUse%"
+msgstr ""
+
 #: fish/alloc.c:39
 #, c-format
 msgid "use 'alloc file size' to create an image\n"
@@ -155,7 +199,7 @@ msgstr "guestfish: nieoczekiwane polecenie wiersza poleceń 0x%x\n"
 msgid "guestfish: cannot use --listen and --file options at the same time\n"
 msgstr ""
 
-#: fish/fish.c:519
+#: fish/fish.c:520
 #, c-format
 msgid ""
 "\n"
@@ -174,78 +218,78 @@ msgstr ""
 "      \"quit\", aby zakończyć powłokę\n"
 "\n"
 
-#: fish/fish.c:597
+#: fish/fish.c:600
 #, c-format
 msgid "guestfish: unterminated double quote\n"
 msgstr "guestfish: niezakończony podwójny cudzysłów\n"
 
-#: fish/fish.c:602 fish/fish.c:617
+#: fish/fish.c:605 fish/fish.c:620
 #, c-format
 msgid "guestfish: command arguments not separated by whitespace\n"
 msgstr "guestfish: parametry poleceń nie są oddzielone spacjami\n"
 
-#: fish/fish.c:612
+#: fish/fish.c:615
 #, c-format
 msgid "guestfish: unterminated single quote\n"
 msgstr "guestfish: niezakończony pojedynczy cudzysłów\n"
 
-#: fish/fish.c:657
+#: fish/fish.c:665
 #, c-format
 msgid "guestfish: internal error parsing string at '%s'\n"
 msgstr "guestfish: wewnętrzny błąd analizowania łańcucha \"%s\"\n"
 
-#: fish/fish.c:670
+#: fish/fish.c:682
 #, c-format
 msgid "guestfish: too many arguments\n"
 msgstr "guestfish: za dużo parametrów\n"
 
-#: fish/fish.c:699
+#: fish/fish.c:711
 #, c-format
 msgid "guestfish: empty command on command line\n"
 msgstr "guestfish: puste polecenie wiersza poleceń\n"
 
-#: fish/fish.c:826
+#: fish/fish.c:838
 msgid "display a list of commands or help on a command"
 msgstr "wyświetla listę poleceń lub pomoc polecenia"
 
-#: fish/fish.c:828
+#: fish/fish.c:840
 msgid "quit guestfish"
 msgstr "kończy pracę guestfish"
 
-#: fish/fish.c:831
+#: fish/fish.c:843
 msgid "allocate an image"
 msgstr "przydziela obraz"
 
-#: fish/fish.c:833
+#: fish/fish.c:845
 msgid "display a line of text"
 msgstr "wyświetla wiersz tekstu"
 
-#: fish/fish.c:835
+#: fish/fish.c:847
 msgid "edit a file in the image"
 msgstr "modyfikuje plik w obrazie"
 
-#: fish/fish.c:837
+#: fish/fish.c:849
 msgid "local change directory"
 msgstr "zmienia lokalny folder"
 
-#: fish/fish.c:839
+#: fish/fish.c:851
 msgid "expand wildcards in command"
 msgstr "rozwija wieloznaczniki w poleceniach"
 
-#: fish/fish.c:841
+#: fish/fish.c:853
 #, fuzzy
 msgid "view a file in the pager"
 msgstr "modyfikuje plik w obrazie"
 
-#: fish/fish.c:843
+#: fish/fish.c:855
 msgid "close and reopen libguestfs handle"
 msgstr ""
 
-#: fish/fish.c:845
+#: fish/fish.c:857
 msgid "measure time taken to run command"
 msgstr ""
 
-#: fish/fish.c:857
+#: fish/fish.c:869
 #, c-format
 msgid ""
 "alloc - allocate an image\n"
@@ -281,7 +325,7 @@ msgstr ""
 "    <nn>G lub <nn>GB  liczba gigabajtów\n"
 "    <nn>sektory       liczba 512 bajtowych sektorów\n"
 
-#: fish/fish.c:873
+#: fish/fish.c:885
 #, c-format
 msgid ""
 "echo - display a line of text\n"
@@ -294,7 +338,7 @@ msgstr ""
 "\n"
 "    Wyświetla ostatnie parametry w terminalu.\n"
 
-#: fish/fish.c:880
+#: fish/fish.c:892
 #, c-format
 msgid ""
 "edit - edit a file in the image\n"
@@ -326,7 +370,7 @@ msgstr ""
 "    UWAGA: nie będzie działało poprawnie dla dużych plików\n"
 "    (> 2 MB) lub plików binarnych zawierających \\0 bajtów.\n"
 
-#: fish/fish.c:894
+#: fish/fish.c:906
 #, c-format
 msgid ""
 "lcd - local change directory\n"
@@ -343,7 +387,7 @@ msgstr ""
 "    przydatne, jeśli chcesz pobrać pliki do konkretnego\n"
 "    miejsca.\n"
 
-#: fish/fish.c:901
+#: fish/fish.c:913
 #, c-format
 msgid ""
 "glob - expand wildcards in command\n"
@@ -361,7 +405,7 @@ msgstr ""
 "    Zauważ, że polecenie jest wykonywane raz dla\n"
 "    każdego rozwiniętego parametru.\n"
 
-#: fish/fish.c:908
+#: fish/fish.c:920
 #, c-format
 msgid ""
 "help - display a list of commands or help on a command\n"
@@ -372,7 +416,7 @@ msgstr ""
 "     help polecenie\n"
 "     help\n"
 
-#: fish/fish.c:913
+#: fish/fish.c:925
 #, fuzzy, c-format
 msgid ""
 "more - view a file in the pager\n"
@@ -404,7 +448,7 @@ msgstr ""
 "    UWAGA: nie będzie działało poprawnie dla dużych plików\n"
 "    (> 2 MB) lub plików binarnych zawierających \\0 bajtów.\n"
 
-#: fish/fish.c:929
+#: fish/fish.c:941
 #, c-format
 msgid ""
 "quit - quit guestfish\n"
@@ -413,7 +457,7 @@ msgstr ""
 "quit - kończy pracę guestfish\n"
 "     quit\n"
 
-#: fish/fish.c:932
+#: fish/fish.c:944
 #, c-format
 msgid ""
 "reopen - close and reopen the libguestfs handle\n"
@@ -424,7 +468,7 @@ msgid ""
 "exits.  However this is occasionally useful for testing.\n"
 msgstr ""
 
-#: fish/fish.c:939
+#: fish/fish.c:951
 #, c-format
 msgid ""
 "time - measure time taken to run command\n"
@@ -434,7 +478,7 @@ msgid ""
 "    time afterwards.\n"
 msgstr ""
 
-#: fish/fish.c:945
+#: fish/fish.c:957
 #, c-format
 msgid "%s: command not known, use -h to list all commands\n"
 msgstr ""
@@ -460,11 +504,166 @@ msgstr ""
 msgid "use '%s filename' to page a file\n"
 msgstr "użyj \"%s nazwapliku\", aby zmodyfikować plik\n"
 
+#: fish/rc.c:134
+#, c-format
+msgid "guestfish: protocol error: could not read 'hello' message\n"
+msgstr ""
+
+#: fish/rc.c:139
+#, c-format
+msgid ""
+"guestfish: protocol error: version mismatch, server version '%s' does not "
+"match client version '%s'.  The two versions must match exactly.\n"
+msgstr ""
+
+#: fish/rc.c:213 fish/rc.c:227
+#, c-format
+msgid "guestfish: remote: looks like the server is not running\n"
+msgstr ""
+
+#: fish/rc.c:237 fish/rc.c:251
+#, c-format
+msgid "guestfish: protocol error: could not send initial greeting to server\n"
+msgstr ""
+
+#: fish/rc.c:262
+#, c-format
+msgid "guestfish: protocol error: could not decode reply from server\n"
+msgstr ""
+
+#: fish/reopen.c:36
+#, c-format
+msgid "'reopen' command takes no parameters\n"
+msgstr ""
+
+#: fish/reopen.c:46
+#, fuzzy, c-format
+msgid "reopen: guestfs_create: failed to create handle\n"
+msgstr "guestfs_create: utworzenie programu obsługi nie powiodło się\n"
+
 #: fish/time.c:35
 #, c-format
 msgid "use 'time command [args...]'\n"
 msgstr ""
 
+#: inspector/virt-inspector.pl:205
+msgid "virt-inspector: no image or VM names given"
+msgstr ""
+
+#: inspector/virt-inspector.pl:297
+msgid "--fish output is only possible with a single OS\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:323
+msgid "virt-inspector: no YAML support\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:358
+msgid "  Mountpoints:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:364
+msgid "  Filesystems:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:382
+msgid "  Modprobe aliases:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:393
+msgid "  Initrd modules:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:402
+msgid "  Applications:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:408
+msgid "  Kernels:\n"
+msgstr ""
+
+#: inspector/virt-inspector.pl:419
+msgid "  Windows Registry entries:\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:135 perl/lib/Sys/Guestfs/Lib.pm:135
+msgid "open_guest: first parameter must be a string or an arrayref"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:142 perl/lib/Sys/Guestfs/Lib.pm:142
+#, perl-brace-format
+msgid "guest image {imagename} does not exist or is not readable"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:147 perl/lib/Sys/Guestfs/Lib.pm:147
+msgid ""
+"open_guest: no libvirt support (install Sys::Virt, XML::XPath and XML::"
+"XPath::XMLParser)"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:152 perl/lib/Sys/Guestfs/Lib.pm:152
+#, fuzzy
+msgid "open_guest: too many domains listed on command line"
+msgstr "guestfish: puste polecenie wiersza poleceń\n"
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:156 perl/lib/Sys/Guestfs/Lib.pm:156
+msgid "open_guest: cannot connect to libvirt"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:175 perl/lib/Sys/Guestfs/Lib.pm:175
+#, perl-brace-format
+msgid "{imagename} is not the name of an inactive libvirt domain\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:178 perl/lib/Sys/Guestfs/Lib.pm:178
+#, perl-brace-format
+msgid "{imagename} is not the name of a libvirt domain\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:190 perl/lib/Sys/Guestfs/Lib.pm:190
+#, perl-brace-format
+msgid "{imagename} seems to have no disk devices\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:274 perl/lib/Sys/Guestfs/Lib.pm:274
+msgid "resolve_windows_path: path must start with a / character"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:756 perl/lib/Sys/Guestfs/Lib.pm:756
+#, fuzzy, perl-brace-format
+msgid "reged command failed: {errormsg}"
+msgstr "zewnętrzne polecenie nie powiodło się: %s"
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:765 perl/lib/Sys/Guestfs/Lib.pm:765
+#, perl-brace-format
+msgid "no output from reged command: {errormsg}"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:935 perl/lib/Sys/Guestfs/Lib.pm:935
+#, perl-brace-format
+msgid "unknown filesystem label {label}\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:945 perl/lib/Sys/Guestfs/Lib.pm:945
+#, perl-brace-format
+msgid "unknown filesystem UUID {uuid}\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:968 perl/lib/Sys/Guestfs/Lib.pm:968
+#, perl-brace-format
+msgid "unknown filesystem {fs}\n"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:1187 perl/lib/Sys/Guestfs/Lib.pm:1187
+#, perl-brace-format
+msgid "{path} doesn't match augeas pattern"
+msgstr ""
+
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:1237 perl/lib/Sys/Guestfs/Lib.pm:1237
+#, perl-brace-format
+msgid "{filename}: could not read initrd format"
+msgstr ""
+
 #: src/guestfs.c:309
 #, c-format
 msgid "guestfs_close: called twice on the same handle\n"
@@ -720,3 +919,15 @@ msgstr "fd %d nie zostało zarejestrowane"
 #: src/guestfs.c:2540
 msgid "select_main_loop_run: this cannot be called recursively"
 msgstr "select_main_loop_run: nie może zostać wywołane rekursywnie"
+
+#: v2v/virt-v2v.pl:174
+msgid "virt-v2v: no image or VM names given"
+msgstr ""
+
+#: v2v/virt-v2v.pl:208
+msgid "no root device found in this operating system image"
+msgstr ""
+
+#: v2v/virt-v2v.pl:209
+msgid "multiboot operating systems are not supported by v2v"
+msgstr ""
index d3fa647..fb1f220 100755 (executable)
@@ -28,6 +28,7 @@ use Getopt::Long;
 use Data::Dumper;
 use File::Temp qw/tempdir/;
 use XML::Writer;
+use Locale::TextDomain 'libguestfs';
 
 =encoding utf8
 
@@ -170,7 +171,7 @@ if ($version) {
     print "$h{major}.$h{minor}.$h{release}$h{extra}\n";
     exit
 }
-pod2usage ("$0: no image or VM names given") if @ARGV == 0;
+pod2usage (__"virt-v2v: no image or VM names given") if @ARGV == 0;
 
 # XXX This should be an option.  Disable for now until we get
 # downloads working reliably.
@@ -204,8 +205,8 @@ my $oses = inspect_operating_systems ($g, \%fses);
 # Only work on single-root operating systems.
 my $root_dev;
 my @roots = keys %$oses;
-die "no root device found in this operating system image" if @roots == 0;
-die "multiboot operating systems are not supported by v2v" if @roots > 1;
+die __"no root device found in this operating system image" if @roots == 0;
+die __"multiboot operating systems are not supported by v2v" if @roots > 1;
 $root_dev = $roots[0];
 
 # Mount up the disks and check for applications.