Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b6ae20da

Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt

  • ID b6ae20da85f7c02f486dd7ba15713292b61017cb
  • Vorgänger 686cba23
  • Nachfolger 5d3d2de2

Alle Dateien in SL rekursiv nach Übersetzungen durchsuchen

Unterschiede anzeigen:

locale/de/all
862 862
  'Incoming Payments'           => 'Zahlungseingänge',
863 863
  'Incoming invoice number'     => 'Eingangsrechnungsnummer',
864 864
  'Incorrect Password!'         => 'Ungültiges Passwort!',
865
  'Incorrect password!.'        => 'Ungültiges Passwort!.',
865 866
  'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!',
866 867
  'Increase'                    => 'Erhöhen',
867 868
  'Individual Items'            => 'Einzelteile',
......
1552 1553
  'Supplies'                    => 'Lieferungen',
1553 1554
  'Switch Menu on / off'        => 'Menü ein- / ausklappen',
1554 1555
  'System'                      => 'System',
1556
  'System currently down for maintenance!' => 'Lx-Office ist momentan zwecks Wartungsarbeiten nicht zugänglich.',
1555 1557
  'TODO list'                   => 'Aufgabenliste',
1556 1558
  'TODO list options'           => 'Aufgabenlistenoptionen',
1557 1559
  'TOP100'                      => 'Top 100',
......
1969 1971
  '[email]'                     => '[email]',
1970 1972
  'account_description'         => 'Beschreibung',
1971 1973
  'accrual'                     => 'Bilanzierung (Soll-Versteuerung)',
1974
  'action= not defined!'        => 'action= nicht definiert!',
1972 1975
  'active'                      => 'aktiv',
1973 1976
  'all entries'                 => 'alle Einträge',
1974 1977
  'ap_aging_list'               => 'liste_offene_verbindlichkeiten',
scripts/locales.pl
31 31
my $basedir      = "../..";
32 32
my $locales_dir  = ".";
33 33
my $bindir       = "$basedir/bin/mozilla";
34
my @progdirs     = ( "$basedir/SL/Controller", "$basedir/SL/Template/Plugin", "$basedir/SL/Auth" );
34
my @progdirs     = ( "$basedir/SL" );
35 35
my $dbupdir      = "$basedir/sql/Pg-upgrade";
36 36
my $dbupdir2     = "$basedir/sql/Pg-upgrade2";
37 37
my $menufile     = "menu.ini";
......
42 42

  
43 43
init();
44 44

  
45
opendir DIR, "$bindir" or die "$!";
46
my @progfiles = map { [ $_, $bindir ] } grep { /\.pl$/ && !/(_custom|^\.)/ } readdir DIR;
47
seekdir DIR, 0;
48
my @customfiles = grep /_custom/, readdir DIR;
49
closedir DIR;
45
sub find_files {
46
  my ($dir_name, $files) = @_;
50 47

  
51
foreach my $dir (@progdirs) {
52
  opendir DIR, $dir or die "$!";
53
  push @progfiles, map { [ $_, $dir ] } grep { /\.pm$/ } readdir DIR;
54
  closedir DIR;
48
  $files ||= [];
49

  
50
  my @dirs_to_check;
51

  
52
  opendir my $dir, $dir_name or die "$! $dir_name";
53

  
54
  foreach my $name (readdir $dir) {
55
    next if $name eq '.' || $name eq '..';
56

  
57
    my $full_name = "${dir_name}/${name}";
58
    if (-d $full_name) {
59
      push @dirs_to_check, $full_name;
60
    } else {
61
      push @{ $files }, $full_name;
62
    }
63
  }
64

  
65
  closedir $dir;
66

  
67
  map { find_files($_, $files) } @dirs_to_check;
68

  
69
  return @{ $files };
55 70
}
56 71

  
72
my @bindir_files = find_files($bindir);
73
my @progfiles    = map { m:^(.+)/([^/]+)$:; [ $2, $1 ]  } grep { /\.pl$/ && !/_custom/ } @bindir_files;
74
my @customfiles  = grep /_custom/, @bindir_files;
75

  
76
push @progfiles, map { m:^(.+)/([^/]+)$:; [ $2, $1 ] } grep { /\.pm$/ } map { find_files($_) } @progdirs;
77

  
57 78
# put customized files into @customfiles
58 79
my @menufiles;
59 80

  

Auch abrufbar als: Unified diff