diff --git a/root/etc/e-smith/events/actions/navigation2-conf b/root/etc/e-smith/events/actions/navigation2-conf index ae7960f..97737a9 100644 --- a/root/etc/e-smith/events/actions/navigation2-conf +++ b/root/etc/e-smith/events/actions/navigation2-conf @@ -33,6 +33,8 @@ use esmith::I18N; use Data::Dumper; # activate if DEBUG +binmode(STDOUT, ":encoding(UTF-8)"); + my $navigation_ignore = "(\.\.?|Swttheme\.pm|Login\.pm|Request\.pm|Modules\.pm(-.*)?)"; @@ -46,131 +48,189 @@ my @files = grep (!/^${navigation_ignore}$/, readdir (FUNCTIONS)); closedir FUNCTIONS; my @langs = $i18n->availableLanguages(); -#my @langs = ('en', 'fr'); -#print Dumper(\@langs); +#my @langs = ('tr'); #Temp override foreach my $lang (@langs) { - my $long_lex = SMNGR_LIB.'/'.I18NMODULES."/General/general_$lang.lex"; - next unless ( -e $long_lex ); + my $long_lex = SMNGR_LIB.'/'.I18NMODULES."/General/general_$lang.lex"; + next unless ( -e $long_lex ); - open(LEX, '<:encoding(UTF-8)', $long_lex) - or die "Couldn't open ", $long_lex, " for reading.\n"; - my @gen_lex = ; - close LEX; + open(LEX, '<:encoding(UTF-8)', $long_lex) + or die "Couldn't open ", $long_lex, " for reading.\n"; + my @gen_lex = ; + close LEX; - foreach my $file (@files) - { - next if (-d SMNGR_LIB.'/'.WEBFUNCTIONS . "/$file"); -# next unless ( $file =~ m/D.*\.pm$/ ); - next unless ( $file =~ m/[A-Z].*\.pm$/ ); - - my $file2 = lc($file); - $file2 =~ s/\.pm$//; - - #-------------------------------------------------- - # extract heading, description and weight information - # from Mojo controller - #-------------------------------------------------- - open(SCRIPT, SMNGR_LIB.'/'.WEBFUNCTIONS . "/$file"); - my $heading = undef; - my $description = undef; - my $heading_weight = undef; - my $description_weight = undef; - my $menucat = undef; - my $routes = undef; - - while (