[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] this is a better hack.



Update of /home2/or/cvsroot/website/include
In directory moria:/home/arma/work/onion/cvs/website/include

Modified Files:
	head.wmi perl-globals.wmi 
Log Message:
this is a better hack.
still need to fix layout / flag size.


Index: head.wmi
===================================================================
RCS file: /home2/or/cvsroot/website/include/head.wmi,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -d -r1.7 -r1.8
--- head.wmi	30 Dec 2005 09:07:26 -0000	1.7
+++ head.wmi	20 Jan 2006 06:46:18 -0000	1.8
@@ -54,10 +54,14 @@
         <td class="banner-right">
 	<:{
 	  my $page = $WML_SRC_FILENAME;
+	  my $numlangs = 0;
 	  $page =~ s/\.wml//;
 	  for my $dir (sort {$LANGUAGES{$a} cmp $LANGUAGES{$b}} @LANGUAGES) {
 	    next if $dir eq '$(LANG)';
-	    printf('<a href="%s.html.%s"><img src="$(IMGROOT)/%s.png" alt="%s" /></a>', $page, $dir, $dir, $LANGUAGES{$dir}) if (-e "$dir/$WML_SRC_FILENAME");
+	    if (-e "$dir/$WML_SRC_FILENAME") {
+	      printf('<a href="%s.html.%s"><img src="$(IMGROOT)/%s.png" alt="%s" /></a>', $page, $dir, $dir, $LANGUAGES{$dir});
+	      last if ++$numlangs >= 3;
+	    }
 	  };
 	}:>
         </td>

Index: perl-globals.wmi
===================================================================
RCS file: /home2/or/cvsroot/website/include/perl-globals.wmi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -d -r1.8 -r1.9
--- perl-globals.wmi	20 Jan 2006 06:35:05 -0000	1.8
+++ perl-globals.wmi	20 Jan 2006 06:46:18 -0000	1.9
@@ -2,13 +2,13 @@
 <:
 	# Change both.  The array is ordered (for pages like translation status).
 	# The order of flags in header is based on sort order of language name.
-	my @LANGUAGES = qw{en de it fr};
+	my @LANGUAGES = qw{en de it fr se};
 	my %LANGUAGES = (
 		'en' => "English",
 		'de' => "Deutsch",
 		'it' => "Italiano",
 		'fr' => "Fran&ccedil;ais",
-#		'se' => "Svenska",
+		'se' => "Svenska",
 		);
 	our $WML_SRC_FILENAME;