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; |