mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
Only in end-user messages and documentation. This change was done mostly mechanically using the Perl script attached below. I also changed don't -> don’t etc and made some other simple fixes. See also: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html ---------- #!/usr/bin/perl -w use strict; use Locale::PO; my $re = qr{'([-\w%.,=?*/]+)'}; my %files = (); foreach my $filename ("po/libguestfs.pot", "po-docs/libguestfs-docs.pot") { my $poref = Locale::PO->load_file_asarray($filename); foreach my $po (@$poref) { if ($po->msgid =~ $re) { my @refs = split /\s+/, $po->reference; foreach my $ref (@refs) { my ($file, $lineno) = split /:/, $ref, 2; $file =~ s{^\.\./}{}; if (exists $files{$file}) { push @{$files{$file}}, $lineno; } else { $files{$file} = [$lineno]; } } } } } foreach my $file (sort keys %files) { unless (-w $file) { warn "warning: $file is probably generated\n"; # have to edit generator next; } my @lines = sort { $a <=> $b } @{$files{$file}}; #print "editing $file at lines ", join (", ", @lines), " ...\n"; open FILE, "<$file" or die "$file: $!"; my @all = (); push @all, $_ while <FILE>; close FILE; my $ext = $file; $ext =~ s/^.*\.//; foreach (@lines) { # Don't mess with verbatim sections in POD files. next if $ext eq "pod" && $all[$_-1] =~ m/^ /; unless ($all[$_-1] =~ $re) { # this can happen for multi-line strings, have to edit it # by hand warn "warning: $file:$_ does not contain expected content\n"; next; } $all[$_-1] =~ s/$re/‘$1’/g; } rename "$file", "$file.bak"; open FILE, ">$file" or die "$file: $!"; print FILE $_ for @all; close FILE; my $mode = (stat ("$file.bak"))[2]; chmod ($mode & 0777, "$file"); }
This commit is contained in:
@@ -159,12 +159,12 @@ suggest_filesystems (void)
|
||||
return;
|
||||
}
|
||||
|
||||
printf (_("This disk contains one or more filesystems, but we don't recognize any\n"
|
||||
printf (_("This disk contains one or more filesystems, but we don’t recognize any\n"
|
||||
"operating system. You can use these mount commands in virt-rescue (at the\n"
|
||||
"><rescue> prompt) to mount these filesystems.\n\n"));
|
||||
|
||||
for (i = 0; fses[i] != NULL; i += 2) {
|
||||
printf (_("# %s has type '%s'\n"), fses[i], fses[i+1]);
|
||||
printf (_("# %s has type ‘%s’\n"), fses[i], fses[i+1]);
|
||||
|
||||
if (TEST_MOUNTABLE (fses[i+1]))
|
||||
printf ("mount %s /sysroot\n", fses[i]);
|
||||
|
||||
Reference in New Issue
Block a user