View | Details | Raw Unified | Return to bug 28707
Collapse All | Expand All

(-)a/misc/translator/LangInstaller.pm (-1 / +1 lines)
Lines 318-324 sub translate_yaml { Link Here
318
            for my $field ( @translatable ) {                                           # each translatable field
318
            for my $field ( @translatable ) {                                           # each translatable field
319
                if ( @multiline and grep { $_ eq $field } @multiline ) {                # multiline fields, only notices ATM
319
                if ( @multiline and grep { $_ eq $field } @multiline ) {                # multiline fields, only notices ATM
320
                    foreach my $line ( @{$row->{$field}} ) {
320
                    foreach my $line ( @{$row->{$field}} ) {
321
                        next if ( $line =~ /^(\s*<.*?>\s*$|^\s*\[.*?\]\s*|\s*)$/ );     # discard pure html, TT, empty
321
                        next if ( $line =~ /^(\s*<\/*\w+\s*>|\s*\[.*\]|\s*<.*\[.*\].*>|\s*)$/ );     # discard pure html, TT, empty
322
                        my @ttvar;
322
                        my @ttvar;
323
                        while ( $line =~ s/(<<.*?>>|\[\%.*?\%\]|<.*?>)/\%s/ ) {         # put placeholders, save matches
323
                        while ( $line =~ s/(<<.*?>>|\[\%.*?\%\]|<.*?>)/\%s/ ) {         # put placeholders, save matches
324
                            my $var = $1;
324
                            my $var = $1;
(-)a/misc/translator/xgettext-installer (-2 / +1 lines)
Lines 111-117 for my $file (@files) { Link Here
111
                        $mulc++;
111
                        $mulc++;
112
112
113
                        # discard pure html, TT, empty
113
                        # discard pure html, TT, empty
114
                        next if ( $line =~ /^(\s*<.*?>\s*$|^\s*\[.*?\]\s*|\s*)$/ );
114
                        next if ( $line =~ /^(\s*<\/*\w+\s*>|\s*\[.*\]|\s*<.*\[.*\].*>|\s*)$/ );
115
115
116
                        # put placeholders
116
                        # put placeholders
117
                        $line =~ s/(<<.*?>>|\[\%.*?\%\]|<.*?>)/\%s/g;
117
                        $line =~ s/(<<.*?>>|\[\%.*?\%\]|<.*?>)/\%s/g;
118
- 

Return to bug 28707