chiark / gitweb /
i18n: dgit: mark some messages (5)
[dgit.git] / i18n-diff-auditor
index 13454197c7a4be61f62dddce2f2a57bbe3f29435..d0b6e07074a96e620b8b491506b03861d2c27c15 100755 (executable)
@@ -145,8 +145,9 @@ sub semiparse ($) {
                 }{ $1 }xe) {
                $o[$#o]{V} = $2;
             } else {
-               s{ \n (.*) }{ \n }s;
-               $o[$#o]{V} = $1;
+               m{^.*\n} or confess;
+               $_ = $&;
+               $o[$#o]{V} = $';
                $o[$#o]{Invented} = 1;
            }
        } elsif (s{^ (["'])( (?: [^\\'"]
@@ -229,6 +230,7 @@ sub analyse_chunk_core () {
        next if $x->{E} eq $y->{E};
        next if $x->{E} eq 'sprintf' and $y->{E} eq 'f_';
        next if $x->{E} eq 'die'     and $y->{E} eq 'confess';
+       next if $x->{E} eq 'die'     and $y->{E} eq 'fail';
        if ($y->{E} eq '+'
            and @ys >= 3
            and $ys[0]{E} eq '('
@@ -273,7 +275,7 @@ sub analyse_chunk_core () {
        }
        if ($ye eq 'f_') {
            my $fmt = $y->{V};
-           die "no percent in _f string\n" unless $fmt =~ m{\%};
+           die "no percent in f_ string\n" unless $fmt =~ m{\%};
            next unless $string_changed;
            die "f_ old string '-quoted\n" if $x->{Q} ne '"';
            my $xs = $x->{V};