/[smeserver]/rpms/e-smith-manager/sme7/e-smith-manager-1.14.0-generalnav.patch
ViewVC logotype

Annotation of /rpms/e-smith-manager/sme7/e-smith-manager-1.14.0-generalnav.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Wed Mar 26 18:28:45 2008 UTC (16 years, 7 months ago) by slords
Branch: MAIN
CVS Tags: e-smith-manager-1_14_0-17_el4_sme, e-smith-manager-1_14_0-14_el4_sme, e-smith-manager-1_14_0-16_el4_sme, e-smith-manager-1_14_0-20_el4_sme, e-smith-manager-1_14_0-19_el4_sme, e-smith-manager-1_14_0-15_el4_sme, e-smith-manager-1_14_0-18_el4_sme
* Wed Mar 26 2008 Shad L. Lords <slords@mail.com> 1.14.0-14
- Include general lexicons in nav-config [SME: 4113]

1 slords 1.1 diff -Nur -x '*.orig' -x '*.rej' e-smith-manager-1.14.0/root/etc/e-smith/events/actions/navigation-conf mezzanine_patched_e-smith-manager-1.14.0/root/etc/e-smith/events/actions/navigation-conf
2     --- e-smith-manager-1.14.0/root/etc/e-smith/events/actions/navigation-conf 2008-03-26 12:25:22.000000000 -0600
3     +++ mezzanine_patched_e-smith-manager-1.14.0/root/etc/e-smith/events/actions/navigation-conf 2008-03-26 12:25:02.000000000 -0600
4     @@ -90,36 +90,39 @@
5    
6     my $lexicon = {};
7    
8     - my $lfile = "/etc/e-smith/locale/$lang/etc/e-smith/web/functions/$file";
9     - if (-f $lfile)
10     + foreach my $lfile ( "/etc/e-smith/locale/$lang/FormMagick/general",
11     + "/etc/e-smith/locale/$lang/etc/e-smith/web/functions/$file" )
12     {
13     - # Do a quick and dirty parse of the lexicon file
14     - my $xml = $parser->parsefile($lfile);
15     - my @lexicon = @{$xml->[1]};
16     - shift @lexicon; # Remove lexicon attributes
17     - while (@lexicon)
18     + if (-f $lfile)
19     {
20     - my ($tag, $data) = splice(@lexicon, 0, 2);
21     - next unless $tag eq 'entry';
22     - my %entry_hash = ('attributes', @$data);
23     - my $base = $entry_hash{base};
24     - $base = @{$base}[2];
25     - my $trans = $entry_hash{trans};
26     - $trans = @{$trans}[2];
27     - next unless defined $base && defined $trans;
28     - $lexicon->{$base} = $trans;
29     + # Do a quick and dirty parse of the lexicon file
30     + my $xml = $parser->parsefile($lfile);
31     + my @lexicon = @{$xml->[1]};
32     + shift @lexicon; # Remove lexicon attributes
33     + while (@lexicon)
34     + {
35     + my ($tag, $data) = splice(@lexicon, 0, 2);
36     + next unless $tag eq 'entry';
37     + my %entry_hash = ('attributes', @$data);
38     + my $base = $entry_hash{base};
39     + $base = @{$base}[2];
40     + my $trans = $entry_hash{trans};
41     + $trans = @{$trans}[2];
42     + next unless defined $base && defined $trans;
43     + $lexicon->{$base} = $trans;
44     + }
45     }
46     - }
47     + }
48    
49     - my $loc_heading = localise($lexicon, $heading);
50     - $loc_heading =~ s/^\s*(\w.*?)\s*$/$1/;
51     - my $loc_description = localise($lexicon, $description);
52     - $loc_description =~ s/^\s*(\w.*?)\s*$/$1/;
53     - $rec->merge_props(
54     - Heading => $loc_heading,
55     - Description => $loc_description,
56     - HeadingWeight => localise($lexicon, $heading_weight),
57     - DescriptionWeight => localise($lexicon, $description_weight));
58     + my $loc_heading = localise($lexicon, $heading);
59     + $loc_heading =~ s/^\s*(\w.*?)\s*$/$1/;
60     + my $loc_description = localise($lexicon, $description);
61     + $loc_description =~ s/^\s*(\w.*?)\s*$/$1/;
62     + $rec->merge_props(
63     + Heading => $loc_heading,
64     + Description => $loc_description,
65     + HeadingWeight => localise($lexicon, $heading_weight),
66     + DescriptionWeight => localise($lexicon, $description_weight));
67     }
68     }
69     foreach my $lang (@langs)

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed