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 | |
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.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile.am | 14 | ||||
-rw-r--r-- | inspector/Makefile.am | 9 | ||||
-rw-r--r-- | po/POTFILES.in | 24 | ||||
-rw-r--r-- | tools/Makefile.am | 11 | ||||
-rwxr-xr-x | tools/virt-tar | 6 | ||||
-rwxr-xr-x | tools/virt-win-reg | 2 |
7 files changed, 39 insertions, 29 deletions
@@ -113,6 +113,7 @@ images/test-grep.txt.gz initramfs initramfs.timestamp inspector/virt-inspector.1 +inspector/virt-inspector.pl inspector/stamp-inspector-generator install-sh *.jar @@ -230,6 +231,7 @@ test-tool/libguestfs-test-tool test-tool/libguestfs-test-tool-helper tools/test.img tools/virt-*.1 +tools/virt-*.pl /GNUmakefile /maint.mk /build-aux diff --git a/Makefile.am b/Makefile.am index 2fde7ffe..8472285b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -168,19 +168,7 @@ dist-hook: all-local: cd $(srcdir); \ find $(DIST_SUBDIRS) \ - -name '*.c' -o -name '*.pl' -o -name '*.pm' -o \ - -name 'virt-cat' -o \ - -name 'virt-df' -o \ - -name 'virt-edit' -o \ - -name 'virt-inspector' -o \ - -name 'virt-list-filesystems' -o \ - -name 'virt-list-partitions' -o \ - -name 'virt-ls' -o \ - -name 'virt-make-fs' -o \ - -name 'virt-rescue' -o \ - -name 'virt-resize' -o \ - -name 'virt-tar' -o \ - -name 'virt-win-reg' | \ + -name '*.c' -o -name '*.pl' -o -name '*.pm' | \ grep -v '^perl/blib/' | \ grep -v '^capitests/' | \ grep -v '^daemon/lib/' | \ diff --git a/inspector/Makefile.am b/inspector/Makefile.am index fc2bee36..e1fe44ab 100644 --- a/inspector/Makefile.am +++ b/inspector/Makefile.am @@ -58,3 +58,12 @@ TESTS_ENVIRONMENT = $(XMLLINT) --noout --relaxng virt-inspector.rng endif endif + +# Make symlink from virt-inspector.pl to virt-inspector. This is just +# to keep xgettext happy since it uses the file extension to determine +# the implementation language of a file. + +all-local: virt-inspector.pl + +virt-inspector.pl: virt-inspector + ln -sf $< $@ diff --git a/po/POTFILES.in b/po/POTFILES.in index b91bde07..b2f24d0f 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -84,7 +84,7 @@ fish/tilde.c fish/time.c fuse/dircache.c fuse/guestmount.c -inspector/virt-inspector +inspector/virt-inspector.pl java/com_redhat_et_libguestfs_GuestFS.c ocaml/guestfs_c.c ocaml/guestfs_c_actions.c @@ -101,14 +101,14 @@ src/guestfs-bindtests.c src/guestfs.c test-tool/helper.c test-tool/test-tool.c -tools/virt-cat -tools/virt-df -tools/virt-edit -tools/virt-list-filesystems -tools/virt-list-partitions -tools/virt-ls -tools/virt-make-fs -tools/virt-rescue -tools/virt-resize -tools/virt-tar -tools/virt-win-reg +tools/virt-cat.pl +tools/virt-df.pl +tools/virt-edit.pl +tools/virt-list-filesystems.pl +tools/virt-list-partitions.pl +tools/virt-ls.pl +tools/virt-make-fs.pl +tools/virt-rescue.pl +tools/virt-resize.pl +tools/virt-tar.pl +tools/virt-win-reg.pl 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) { |