[interchange-cvs] interchange - racke modified 2 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Mon Dec 8 07:03:37 EST 2003


User:      racke
Date:      2003-12-08 12:03:37 GMT
Modified:  .        WHATSNEW
Modified:  lib/Vend/Table Shadow.pm
Log:
Use $Vend::Cfg->{DefaultLocale} as fallback locale. The UI destroys
the $Scratch->{mv_locale} setting and the catalog translation
became inconsistent.

Revision  Changes    Path
2.173     +4 -0      interchange/WHATSNEW


rev 2.173, prev_rev 2.172
Index: WHATSNEW
===================================================================
RCS file: /anon_cvs/repository/interchange/WHATSNEW,v
retrieving revision 2.172
retrieving revision 2.173
diff -u -r2.172 -r2.173
--- WHATSNEW	7 Dec 2003 02:00:01 -0000	2.172
+++ WHATSNEW	8 Dec 2003 12:03:37 -0000	2.173
@@ -145,6 +145,10 @@
 * Add stubs for commit and rollback methods, thanks to Thomas Weiss 
   <pater.noster at gmx.net> for report.
 
+* Use $Vend::Cfg->{DefaultLocale} as fallback locale. The UI destroys
+  the $Scratch->{mv_locale} setting and the catalog translation
+  became inconsistent.
+
 i18n
 ----
 



1.45      +7 -7      interchange/lib/Vend/Table/Shadow.pm


rev 1.45, prev_rev 1.44
Index: Shadow.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Table/Shadow.pm,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- Shadow.pm	4 Dec 2003 12:42:03 -0000	1.44
+++ Shadow.pm	8 Dec 2003 12:03:37 -0000	1.45
@@ -1,6 +1,6 @@
 # Vend::Table::Shadow - Access a virtual "Shadow" table
 #
-# $Id: Shadow.pm,v 1.44 2003/12/04 12:42:03 racke Exp $
+# $Id: Shadow.pm,v 1.45 2003/12/08 12:03:37 racke Exp $
 #
 # Copyright (C) 2002-2003 Stefan Hornburg (Racke) <racke at linuxia.de>
 #
@@ -20,7 +20,7 @@
 # MA  02111-1307  USA.
 
 package Vend::Table::Shadow;
-$VERSION = substr(q$Revision: 1.44 $, 10);
+$VERSION = substr(q$Revision: 1.45 $, 10);
 
 # CREDITS
 #
@@ -183,7 +183,7 @@
 	my ($column, $locale);
 	
 	$s = $s->import_db() if ! defined $s->[$OBJ];
-	$locale = $::Scratch->{mv_locale} || 'default';
+	$locale = $::Scratch->{mv_locale} || $Vend::Cfg->{DefaultLocale};
 	
 	my @row = $s->[$OBJ]->row($key);
 	if (@row) {
@@ -471,7 +471,7 @@
 sub _map_entries {
 	my ($s, $colsref, $entriesref) = @_;
 	my @matches;
-	my $locale = $::Scratch->{mv_locale};
+	my $locale = $::Scratch->{mv_locale} || $Vend::Cfg->{DefaultLocale};
 	
 	for (my $i = 0; $i < @$colsref; $i++) {
 		if (exists $s->[$CONFIG]->{MAP}->{$colsref->[$i]}->{$locale}) {
@@ -487,7 +487,7 @@
 	my ($s, $column) = @_;
 	my ($db, $sdb, $scol);
 	
-	my $locale = $::Scratch->{mv_locale} || 'default';
+	my $locale = $::Scratch->{mv_locale} || $Vend::Cfg->{DefaultLocale};
 
 	if (exists $s->[$CONFIG]->{MAP}->{$column}->{$locale}) {
 		my $map = $s->[$CONFIG]->{MAP}->{$column}->{$locale};
@@ -533,7 +533,7 @@
 	my ($s, $key, $column, $done, $orig, $mapentry) = @_;
 	my ($map, $db, $value);
 
-	my $locale = $::Scratch->{mv_locale} || 'default';
+	my $locale = $::Scratch->{mv_locale} || $Vend::Cfg->{DefaultLocale};
 
 	if (! $mapentry && ! $::Scratch->{mv_shadowpass}
 		&& exists $s->[$CONFIG]->{MAP}->{$column}->{$locale}) {
@@ -598,7 +598,7 @@
 	my ($s) = @_;
 	
 	if ($s->[$CONFIG]->{MAP_OPTIONS}->{share}) {
-		my $tables = $s->[$CONFIG]->{MAP_OPTIONS}->{share}->{$::Scratch->{mv_locale}};
+		my $tables = $s->[$CONFIG]->{MAP_OPTIONS}->{share}->{$::Scratch->{mv_locale} || $Vend::Cfg->{DefaultLocale}};
 		return split(/[\s,]+/, $tables);
 	}
 }








More information about the interchange-cvs mailing list