From 9f63cef14f7581cabba2ccfd4ac4d23ccabe5042 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 30 Sep 2018 15:59:12 +0100 Subject: [PATCH] auditor wip before output --- i18n-diff-auditor | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; -- 2.30.2