summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-05-12 14:24:23 +0100
committerRichard Jones <rjones@redhat.com>2010-05-12 18:13:01 +0100
commitfeb0cd04822231f056c3086f322afbefc2e2467c (patch)
tree0566c4adba327da4886f8bb8b1807634e418afd4 /tools
parent48133118071a26950840fe33326c09130955c35e (diff)
downloadlibguestfs-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.am11
-rwxr-xr-xtools/virt-tar6
-rwxr-xr-xtools/virt-win-reg2
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) {