From 4975cb4fed38c682eeeb7907d0700a5edab1157d Mon Sep 17 00:00:00 2001
From: Fil <fil@rezo.net>
Date: Sun, 4 Sep 2005 15:10:03 +0000
Subject: [PATCH] il faut surcharger tous les modules, pas seulement le premier
 qui repond

---
 ecrire/inc_lang.php3 | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/ecrire/inc_lang.php3 b/ecrire/inc_lang.php3
index e027e16bb3..0107d78cc6 100644
--- a/ecrire/inc_lang.php3
+++ b/ecrire/inc_lang.php3
@@ -128,27 +128,24 @@ function traduire_chaine($code, $args) {
 	}
 
 	// parcourir tous les modules jusqu'a ce qu'on trouve
-	$new = "";
 	while (list(,$module) = each ($modules)) {
 		$var = "i18n_".$module."_".$spip_lang;
-		if (empty($GLOBALS[$var]))
-		  {
+		if (empty($GLOBALS[$var])) {
 			charger_langue($spip_lang, $module);
-			$new = $var;
-		  }
+
+			// surcharge perso -- on cherche local(_xx).php3 dans le chemin
+			if ($f = find_in_path('local.php3'))
+				surcharger_langue($f);
+			if ($f = find_in_path('local_'.$spip_lang.'.php3'))
+				surcharger_langue($f);
+			// compatibilite ascendante : chercher aussi dans ecrire/lang/
+			else if (@is_readable($f = _DIR_LANG . 'local_'.$spip_lang.'.php3'))
+				surcharger_langue($f);
+
+		}
 		if (isset($GLOBALS[$var][$code])) break;
 	}
 
-	if ($new) {
-	// surcharge perso -- on cherche le fichier local(_xx).php3 dans le chemin
-	  if ($f = (find_in_path('local.php3')))
-		surcharger_langue($f);
-	  if ($f = (find_in_path('local_'.$lang.'.php3')))
-		surcharger_langue($f);
-	// compatibilite ascendante : chercher aussi local_xx.php3 dans ecrire/lang/
-	  else if (@is_readable($f = _DIR_LANG . 'local_'.$lang.'.php3'))
-		surcharger_langue($f);
-	}
 	$text = $GLOBALS[$var][$code];
 
 	// fallback langues pas finies ou en retard (eh oui, c'est moche...)
-- 
GitLab