Revision ac84fb0e
Von Sven Schöling vor mehr als 14 Jahren hinzugefügt
locale/de/all | ||
---|---|---|
1 | 1 |
#!/usr/bin/perl |
2 |
# -*- coding: iso-8859-15; -*- |
|
2 |
# -*- coding: ISO-8859-15; -*- |
|
3 |
# vim: fenc=ISO-8859-15 |
|
3 | 4 |
|
4 | 5 |
# These are all the texts to build the translations files. |
5 | 6 |
# The file has the form of 'english text' => 'foreign text', |
scripts/locales.pl | ||
---|---|---|
85 | 85 |
unlink "$locales_dir/lost"; |
86 | 86 |
} |
87 | 87 |
|
88 |
my $charset = slurp("$locales_dir/charset") || 'utf-8'; |
|
89 |
chomp $charset; |
|
90 |
|
|
88 | 91 |
my %old_texts = %{ $self->{texts} || {} }; |
89 | 92 |
|
90 | 93 |
map({ handle_file($_, $bindir); } @progfiles); |
... | ... | |
598 | 601 |
|
599 | 602 |
open my $fh, '>', $file or die "$! : $file"; |
600 | 603 |
|
601 |
print $fh "#!/usr/bin/perl\n# -*- coding: iso-8859-15; -*-\n\n";
|
|
604 |
print $fh "#!/usr/bin/perl\n# -*- coding: $charset; -*-\n# vim: fenc=$charset\n\n";
|
|
602 | 605 |
print $fh $header, "\n" if $header; |
603 | 606 |
print $fh "$data_name = $delim[0]\n" if $data_name; |
604 | 607 |
|
... | ... | |
608 | 611 |
close $fh; |
609 | 612 |
} |
610 | 613 |
|
614 |
sub slurp { |
|
615 |
my $file = shift; |
|
616 |
do { local ( @ARGV, $/ ) = $file; <> } |
|
617 |
} |
|
618 |
|
|
611 | 619 |
__END__ |
612 | 620 |
|
613 | 621 |
=head1 NAME |
Auch abrufbar als: Unified diff
locale files nicht mit hardcoded latin markieren sondern mit dem language charset.
Ausserdem Markierungen auf vim ausgeweitet.