X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Flocales.pl;h=105ca7caefa8e605c38c84cc6551b466275fa687;hb=12b522fa1375e36d6985663f5679abd05303ee45;hp=922f042b3f475da771916ed9b17f554ae526d635;hpb=032056b31542fd4aeacfb313bb46467160ee3720;p=kivitendo-erp.git diff --git a/scripts/locales.pl b/scripts/locales.pl index 922f042b3..105ca7cae 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -10,8 +10,11 @@ use utf8; use strict; BEGIN { - unshift(@INC, 'modules/override'); # Use our own versions of various modules (e.g. YAML). - push (@INC, 'modules/fallback'); # Only use our own versions of modules if there's no system version. + use FindBin; + + 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,6 +31,7 @@ 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; $OUTPUT_AUTOFLUSH = 1; @@ -53,7 +57,7 @@ our $missing = {}; our @lost = (); my %ignore_unused_templates = ( - map { $_ => 1 } qw(ct/testpage.html generic/autocomplete.html oe/periodic_invoices_email.txt part/testpage.html t/render.html t/render.js task_server/failure_notification_email.txt + map { $_ => 1 } qw(ct/testpage.html oe/periodic_invoices_email.txt part/testpage.html t/render.html t/render.js task_server/failure_notification_email.txt failed_background_jobs_report/email.txt) ); @@ -546,7 +550,7 @@ sub scandbupgrades { # we only need to do this for auth atm, because only auth scripts can include new rights, which are translateable my $auth = 1; - my $dbu = SL::DBUpgrade2->new(auth => $auth, path => '../../sql/Pg-upgrade2-auth'); + my $dbu = SL::DBUpgrade2->new(auth => $auth, path => SL::System::Process->exe_dir . '/sql/Pg-upgrade2-auth'); for my $upgrade ($dbu->sort_dbupdate_controls) { for my $string (@{ $upgrade->{locales} || [] }) {