X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Flocales.pl;h=3ae38a3b13d3c09926b3afbe039aad578f2e6c93;hb=58bf2f27323e17e2f2e2f3c9470f041fe3ca520a;hp=9e6a4ae58ecfd6ec4fe91654a9853c2a1f6f79f4;hpb=24ea4061be2db0fba94ec117db2b737b758fb891;p=kivitendo-erp.git diff --git a/scripts/locales.pl b/scripts/locales.pl index 9e6a4ae58..3ae38a3b1 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -101,7 +101,7 @@ if ($opt_n) { } my @dbplfiles; -foreach my $sub_dir ("Pg-upgrade", "Pg-upgrade2", "Pg-upgrade2-auth") { +foreach my $sub_dir ("Pg-upgrade2", "Pg-upgrade2-auth") { my $dir = "$basedir/sql/$sub_dir"; tie %dir_h, 'IO::Dir', $dir; push @dbplfiles, map { [ $_, $dir ] } grep { /\.pl$/ } keys %dir_h; @@ -120,9 +120,6 @@ if (-f "$locales_dir/lost") { unlink "$locales_dir/lost"; } -my $charset = slurp("$locales_dir/charset") || 'utf-8'; -chomp $charset; - my %old_texts = %{ $self->{texts} || {} }; handle_file(@{ $_ }) for @progfiles; @@ -238,15 +235,20 @@ EOL sub parse_args { my ($help, $man); + my ($opt_no_c, $ignore_for_compatiblity); + GetOptions( 'no-custom-files' => \$opt_n, - 'check-files' => \$opt_c, + 'check-files' => \$ignore_for_compatiblity, + 'no-check-files' => \$opt_no_c, 'verbose' => \$opt_v, 'help' => \$help, 'man' => \$man, 'debug' => \$debug, ); + $opt_c = !$opt_no_c; + if ($help) { pod2usage(1); exit 0; @@ -712,10 +714,7 @@ sub generate_file { open my $fh, '>:encoding(utf8)', $file or die "$! : $file"; - $charset =~ s/\r?\n//g; - my $emacs_charset = lc $charset; - - print $fh "#!/usr/bin/perl\n# -*- coding: $emacs_charset; -*-\n# vim: fenc=$charset\n\nuse utf8;\n\n"; + print $fh "#!/usr/bin/perl\n# -*- coding: utf-8; -*-\n# vim: fenc=utf-8\n\nuse utf8;\n\n"; print $fh $header, "\n" if $header; print $fh "$data_name = $delim[0]\n" if $data_name;