X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=i18n-diff-auditor;fp=i18n-diff-auditor;h=b9bd4e50e17e1643c894ad961bfbe2e7771f594a;hb=9f63cef14f7581cabba2ccfd4ac4d23ccabe5042;hp=53819ca94f445c859f14a5dea54a2847694db5ed;hpb=25665dabae423ecc15a0c8cf46861e2bf7b3b0b2;p=dgit-junk.git diff --git a/i18n-diff-auditor b/i18n-diff-auditor index 53819ca..b9bd4e5 100755 --- a/i18n-diff-auditor +++ b/i18n-diff-auditor @@ -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;