]> wagnertech.de Git - mfinanz.git/blobdiff - scripts/locales.pl
locales-Skript: POD update
[mfinanz.git] / scripts / locales.pl
index 105ca7caefa8e605c38c84cc6551b466275fa687..c81f7b41cf71cae939a72f3bbbff540528912a20 100755 (executable)
@@ -1,9 +1,6 @@
 #!/usr/bin/perl
 
-# -n do not include custom_ scripts
-# -v verbose mode, shows progress stuff
-
-# this version of locles processes not only all required .pl files
+# this version of locales processes not only all required .pl files
 # but also all parse_html_templated files.
 
 use utf8;
@@ -14,7 +11,6 @@ BEGIN {
 
   unshift(@INC, $FindBin::Bin . '/../modules/override'); # Use our own versions of various modules (e.g. YAML).
   push   (@INC, $FindBin::Bin . '/..');
-  push   (@INC, $FindBin::Bin . '/../modules/fallback'); # Only use our own versions of modules if there's no system version.
 }
 
 use Carp;
@@ -28,15 +24,13 @@ use IO::Dir;
 use List::MoreUtils qw(apply);
 use List::Util qw(first);
 use Pod::Usage;
-use YAML ();
-use YAML::Loader (); # YAML tries to load Y:L at runtime, but can't find it after we chdir'ed
 use SL::DBUpgrade2;
 use SL::System::Process;
+use SL::YAML;
 
 $OUTPUT_AUTOFLUSH = 1;
 
 my $opt_v  = 0;
-my $opt_n  = 0;
 my $opt_c  = 0;
 my $opt_f  = 0;
 my $debug  = 0;
@@ -102,7 +96,6 @@ my @customfiles  = grep /_custom/, @bindir_files;
 
 push @progfiles, map { m:^(.+)/([^/]+)$:; [ $2, $1 ] } grep { /\.pm$/ } map { find_files($_) } @progdirs;
 
-# put customized files into @customfiles
 my %dir_h;
 
 my @dbplfiles;
@@ -268,7 +261,6 @@ sub parse_args {
   my ($opt_no_c, $ignore_for_compatiblity);
 
   GetOptions(
-    'no-custom-files' => \$opt_n,
     'check-files'     => \$ignore_for_compatiblity,
     'no-check-files'  => \$opt_no_c,
     'verbose'         => \$opt_v,
@@ -534,7 +526,7 @@ sub scanfile {
 sub scanmenu {
   my $file = shift;
 
-  my $menu = YAML::LoadFile($file);
+  my $menu = SL::YAML::LoadFile($file);
 
   for my $node (@$menu) {
     # possible for override files
@@ -773,8 +765,8 @@ locales.pl - Collect strings for translation in kivitendo
 locales.pl [options] lang_code
 
  Options:
-  -n, --no-custom-files  Do not process files whose name contains "_"
-  -c, --check-files      Run extended checks on HTML files
+  -c, --check-files      Run extended checks on HTML files (default)
+  -n, --no-check-files   Do not run extended checks on HTML files
   -f, --filenames        Show the filenames where new strings where found
   -v, --verbose          Be more verbose
   -h, --help             Show this help
@@ -783,15 +775,16 @@ locales.pl [options] lang_code
 
 =over 8
 
-=item B<-n>, B<--no-custom-files>
-
-Do not process files whose name contains "_", e.g. "custom_io.pl".
-
 =item B<-c>, B<--check-files>
 
 Run extended checks on the usage of templates. This can be used to
 discover HTML templates that are never used as well as the usage of
-non-existing HTML templates.
+non-existing HTML templates. This is enabled by default.
+
+=item B<-n>, B<--no-check-files>
+
+Do not run extended checks on the usage of templates. See
+C<--no-check-files>.
 
 =item B<-v>, B<--verbose>