chiark / gitweb /
i18n: i18n-diff-auditor: recognise tail concatenation
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Sep 2018 23:28:26 +0000 (00:28 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Sep 2018 23:54:38 +0000 (00:54 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
i18n-diff-auditor

index 73c77eca50db5055eb095eb33e187c6d30fbc645..8ec5e9f436ab3b5831d376096b76e49f6adccc8e 100755 (executable)
@@ -273,6 +273,15 @@ sub analyse_chunk_core () {
                elsif ($& ne '%s') { die "unhandled %-subst $&\n"; }
                $next_y->();
                die "expected comma, got $y->{P}\n" unless $y->{E} eq ',';
+               if (!length $fmt and
+                   !length $xs and
+                   @xs and
+                   $xs[0]{E} eq '.') {
+                   # X has   "<earlier>" .                <something>
+                   # Y has   "<earlier>%s" [other args] , <something>
+                   $next_x->(); # eat the '.'
+                   next;
+               }
                if ($xs =~ m{^\@}) {
                    $next_y->();
                    die "\@... => not string" unless is_string($y);