diff options
author | Richard Jones <rjones@redhat.com> | 2010-05-12 14:24:23 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-05-12 18:13:01 +0100 |
commit | feb0cd04822231f056c3086f322afbefc2e2467c (patch) | |
tree | 0566c4adba327da4886f8bb8b1807634e418afd4 /tools | |
parent | 48133118071a26950840fe33326c09130955c35e (diff) | |
download | libguestfs-feb0cd04822231f056c3086f322afbefc2e2467c.tar.gz libguestfs-feb0cd04822231f056c3086f322afbefc2e2467c.tar.xz libguestfs-feb0cd04822231f056c3086f322afbefc2e2467c.zip |
po: Include strings from Perl programs in the PO files (RHBZ#559963).
xgettext will only recognize '*.pl' as being a Perl file (otherwise
it treats it as a C file and does not correctly find any strings
in it).
This commit also fixes two actual bugs that xgettext found in the
strings in our Perl programs.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 11 | ||||
-rwxr-xr-x | tools/virt-tar | 6 | ||||
-rwxr-xr-x | tools/virt-win-reg | 2 |
3 files changed, 15 insertions, 4 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index 9cc61399..ab14fe0f 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,5 +1,5 @@ # libguestfs virt-* tools -# Copyright (C) 2009 Red Hat Inc. +# Copyright (C) 2009-2010 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -89,3 +89,12 @@ TESTS = test-virt-cat.sh \ test-virt-tar.sh endif + +# Make symlinks from virt-foo.pl to virt-foo. This is just to keep +# xgettext happy since it uses the file extension to determine the +# implementation language of a file. + +all-local: $(tools:%=virt-%.pl) + +virt-%.pl: virt-% + ln -sf $< $@ diff --git a/tools/virt-tar b/tools/virt-tar index 612b5008..839ff8eb 100755 --- a/tools/virt-tar +++ b/tools/virt-tar @@ -202,9 +202,11 @@ if ($mode eq "x") { } else { # $mode eq "u" $directory = pop @ARGV; $tarball = pop @ARGV; - die __"virt-tar: $tarball: file not found\n" unless -f $tarball; + die __x("virt-tar: {tarball}: file not found\n", + tarball => $tarball) unless -f $tarball; } -die __"virt-tar: $directory: directory name must start with '/' character\n" +die __x("virt-tar: {dir}: directory name must start with '/' character\n", + dir => $directory) unless substr ($directory, 0, 1) eq "/"; my @args = (\@ARGV); diff --git a/tools/virt-win-reg b/tools/virt-win-reg index 91a16731..74881b67 100755 --- a/tools/virt-win-reg +++ b/tools/virt-win-reg @@ -338,7 +338,7 @@ else { # Import mode. %hives = (); # Look in the tmpdir for all the hive files which have been - # downloaded / modified by the import mapper, and upload + # downloaded / modified by the import mapper, and upload # each one. opendir my $dh, $tmpdir or die "$tmpdir: $!"; foreach (readdir $dh) { |