Lines 306-312
sub translate_yaml {
Link Here
|
306 |
my $po_file = $self->po_filename( $target->{suffix} ); |
306 |
my $po_file = $self->po_filename( $target->{suffix} ); |
307 |
return $srcyml unless ( -e $po_file ); |
307 |
return $srcyml unless ( -e $po_file ); |
308 |
|
308 |
|
309 |
my $po_ref = Locale::PO->load_file_ashash( $po_file ); |
309 |
my $po_ref = Locale::PO->load_file_ashash( $po_file, 'utf8' ); |
310 |
|
310 |
|
311 |
my $dstyml = YAML::XS::LoadFile( $srcyml ); |
311 |
my $dstyml = YAML::XS::LoadFile( $srcyml ); |
312 |
|
312 |
|
Lines 400-408
sub install_installer {
Link Here
|
400 |
for my $file ( @files ) { |
400 |
for my $file ( @files ) { |
401 |
if ( $file =~ /yml$/ ) { |
401 |
if ( $file =~ /yml$/ ) { |
402 |
my $translated_yaml = translate_yaml( $self, $target, "$intradir/$dir/$file" ); |
402 |
my $translated_yaml = translate_yaml( $self, $target, "$intradir/$dir/$file" ); |
403 |
open(my $fh, ">:encoding(UTF-8)", "$intradir/$tdir/$file"); |
403 |
YAML::XS::DumpFile( "$intradir/$tdir/$file", $translated_yaml ); |
404 |
YAML::XS::DumpFile( $fh, $translated_yaml ); |
|
|
405 |
close($fh); |
406 |
} else { |
404 |
} else { |
407 |
File::Copy::copy( "$intradir/$dir/$file", "$intradir/$tdir/$file" ); |
405 |
File::Copy::copy( "$intradir/$dir/$file", "$intradir/$tdir/$file" ); |
408 |
} |
406 |
} |
409 |
- |
|
|