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

(-)a/misc/translator/LangInstaller.pm (-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*<\/*\w+\s*>|\s*\[.*\]|\s*<.*\[.*\].*>|\s*)$/ );     # discard pure html, TT, empty
322
                        my @ttvar;
321
                        my @ttvar;
323
                        while ( $line =~ s/(<<.*?>>|\[\%.*?\%\]|<.*?>)/\%s/ ) {         # put placeholders, save matches
322
                        while ( $line =~ s/(<<.*?>>|\[\%.*?\%\]|<.*?>)/\%s/ ) {         # put placeholders, save matches
324
                            my $var = $1;
323
                            my $var = $1;
(-)a/misc/translator/xgettext-installer (-4 lines)
Lines 110-118 for my $file (@files) { Link Here
110
                    foreach my $line ( @{ $row->{$field} } ) {
110
                    foreach my $line ( @{ $row->{$field} } ) {
111
                        $mulc++;
111
                        $mulc++;
112
112
113
                        # discard pure html, TT, empty
114
                        next if ( $line =~ /^(\s*<\/*\w+\s*>|\s*\[.*\]|\s*<.*\[.*\].*>|\s*)$/ );
115
116
                        # put placeholders
113
                        # put placeholders
117
                        $line =~ s/(<<.*?>>|\[\%.*?\%\]|<.*?>)/\%s/g;
114
                        $line =~ s/(<<.*?>>|\[\%.*?\%\]|<.*?>)/\%s/g;
118
115
119
- 

Return to bug 31292