From 473cb57a47715ad10c1d4eefc8a23aff5293006e Mon Sep 17 00:00:00 2001 From: Brian Read Date: Fri, 26 Jul 2024 16:31:20 +0100 Subject: [PATCH] More fix up for navigation2.conf --- root/etc/e-smith/events/actions/navigation2-conf | 16 ++++++++++------ smeserver-manager.spec | 5 ++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/root/etc/e-smith/events/actions/navigation2-conf b/root/etc/e-smith/events/actions/navigation2-conf index 97737a9..4bb2bb3 100644 --- a/root/etc/e-smith/events/actions/navigation2-conf +++ b/root/etc/e-smith/events/actions/navigation2-conf @@ -123,7 +123,7 @@ foreach my $lang (@langs) close LEX; } #Extract the prefix for this module - my @keys = values @panel_lex; # Get all values from the hash + my @keys = values @panel_lex; # Get all values from the array my $i = 0; # Initialize the index my $found = 0; # Flag to check if the prefix was found @@ -131,12 +131,13 @@ foreach my $lang (@langs) while ($i < @keys) { # Loop until we run out of entries my $extracted_value = $keys[$i] || ""; # The current entry + #print("Extracted val: ".$extracted_value."\n"); # Extract prefix from the second value (up to and including the first underscore) - my ($prefix) = $extracted_value =~ /^'(.*?_)/; # Match everything up to and including the first underscore + #my ($prefix) = $second_value =~ /^'(.*?_)/; # Match everything up to and including the first underscore + ($prefix) = $extracted_value =~ /^'(.*?_)/; # Match everything up to and including the first underscore if (defined $prefix) { - #print("Prefix: " . $prefix . "\n"); $found = 1; # Set found flag to true last; # Exit the loop if prefix is found } else { @@ -147,8 +148,11 @@ foreach my $lang (@langs) } if (!$found) { - print(STDERR "No valid prefix found in any entries: ".$file2." (".$lang.")\n") if DEBUG; + print(STDERR "No valid prefix found in any entries: ".$file2." (".$lang.")\n"); # if DEBUG; + $prefix = "xx_"; # Probably never match!! + } + print("Prefix: ".$prefix."".$file2." (".$lang.")\n"); my %Lexicon = (); push(@panel_lex, @gen_lex); @@ -202,11 +206,11 @@ foreach my $lang (@langs) sub localise { my ($lexicon, $string) = @_; -# print("Looking up:".$string."\n"); + #print("Looking up:".$string."\n"); $string = "" unless defined $string; my $lc_string = lc($string); my $res = $lexicon->{$lc_string} || $string; -# print("Returning:".$res."\n"); + #print("Returning:".$res."\n"); return $res; } diff --git a/smeserver-manager.spec b/smeserver-manager.spec index 02d9652..8bba1ef 100644 --- a/smeserver-manager.spec +++ b/smeserver-manager.spec @@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2 %define name smeserver-manager Name: %{name} %define version 11.0.0 -%define release 9 +%define release 10 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -108,6 +108,9 @@ true %defattr(-,root,root) %changelog +* Fri Jul 26 2024 Brian Read 11.0.0-10.sme +- fix navigation2.conf to more correctly translate menus [SME: 12714] + * Thu May 09 2024 Brian Read 11.0.0-9.sme - Add mojo logo to footer [SME: 12679] - Fix default for HeaderWeight to avoid noise in logs if no Nav header in file