chiark / gitweb /
auditor wip before output
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Sep 2018 14:59:12 +0000 (15:59 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Sep 2018 14:59:12 +0000 (15:59 +0100)
i18n-diff-auditor

index 53819ca94f445c859f14a5dea54a2847694db5ed..b9bd4e50e17e1643c894ad961bfbe2e7771f594a 100755 (executable)
@@ -168,9 +168,10 @@ sub analyse_chunk_core () {
        $next_y->();
        next if $x->{E} eq $y->{E};
        my $string_changed;
-       if ($y->{E} eq '__' or $y->{E} eq '_f') {
+       my $ye = $y->{E};
+       if ($ye eq '__' or $ye eq 'f_') {
            $next_y->();
-           die "__ on non-string $y->{P}\n"     unless Sis_string->($y);
+           die "__ on non-string $y->{P}\n"     unless $is_string->($y);
            die "__ on was non-string $y->{P}\n" unless $is_string->($x);
            if ($y->{Q} ne "'") {
                die "var subst in new string\n"
@@ -182,13 +183,13 @@ sub analyse_chunk_core () {
            };
            $string_changed = $@;
        }
-       if ($y->{E} eq '__') {
+       if ($ye eq '__') {
            $_ = $y->{V};
            die "percent $& in __ ' string\n" if m{\%};
            die $string_changed if length $string_changed;
            next;
        }
-       if ($y->{E} eq 'f_') {
+       if ($ye eq 'f_') {
            my $fmt = $y->{V};
            die "no percent in _f string\n" unless $fmt =~ m{\%};
            next unless $string_changed;