diff --git a/ecrire/inc/traduire.php b/ecrire/inc/traduire.php index ae5ef27ca8b207e8389c8c4d4f3a84fd62a6b51d..c889e21bbbbbe77e1101db564edc46156acd7d98 100644 --- a/ecrire/inc/traduire.php +++ b/ecrire/inc/traduire.php @@ -204,9 +204,11 @@ function inc_traduire_dist($ori, $lang) { if (strpos($ori,':')) { list($modules,$code) = explode(':',$ori,2); $modules = explode('|', $modules); + $ori_complet = $ori; } else { $modules = array('spip', 'ecrire'); $code = $ori; + $ori_complet = implode('|', $modules) . ':' . $ori; } $text = ''; @@ -234,6 +236,7 @@ function inc_traduire_dist($ori, $lang) { } if (isset($GLOBALS[$var][$code])) { + $module_retenu = $module; $text = $GLOBALS[$var][$code]; break; } @@ -268,7 +271,9 @@ function inc_traduire_dist($ori, $lang) { if (_request('var_mode') == 'traduction') { if ($text) { - $text = '<span lang=' . $langue_retenue . ' class=debug-traduction title=' . $ori . '(' . $langue_retenue . ')>' . $text . '</span>'; + $classe = 'debug-traduction' . ($module_retenu == 'ecrire' ? '-prive' : ''); + $text = '<span lang=' . $langue_retenue . ' class=' . $classe . ' title=' . $ori_complet . '(' . $langue_retenue . ')>' . $text . '</span>'; + $text = str_replace($module_retenu, "*$module_retenu*", $text); } } else { diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php index 328dbe663195bc99d1e3751b44eeb09f6da9c8d6..6501cb90666b68bc521efc125517ad0d86d9c2a3 100644 --- a/ecrire/inc/utils.php +++ b/ecrire/inc/utils.php @@ -618,7 +618,7 @@ function _T($texte, $args=array(), $options=array()) { $text = $texte; // pour les chaines non traduites, assurer un service minimum - if (!$GLOBALS['test_i18n']) + if (!$GLOBALS['test_i18n'] AND (_request('var_mode') != 'traduction')) $text = str_replace('_', ' ', (($n = strpos($text,':')) === false ? $texte : substr($texte, $n+1))); @@ -667,7 +667,7 @@ function _L($text, $args=array(), $class=null) { } if (($GLOBALS['test_i18n'] OR (_request('var_mode') == 'traduction')) AND $class===null) - return "<span class=erreur-traduction>$text</span>"; + return "<span class=debug-traduction-erreur>$text</span>"; else return $text; } diff --git a/prive/spip_admin.css b/prive/spip_admin.css index 739aafaee6f182d3a4aa68fcae9b0677a6ac2e0f..24aa73019ba63cdac0fe02530e6bf2517a18ad8c 100644 --- a/prive/spip_admin.css +++ b/prive/spip_admin.css @@ -88,5 +88,6 @@ spip-debug-toggle {position:absolute; top:4px; right:80px; width:24px;height:20p .spip-previsu { background-color: #333; color: #eeeeee;font-size: 18px; text-transform: uppercase;position: absolute; top: 0px; left: 0px;padding: 10px 50px; background-position: 5px 5px;background-repeat: no-repeat;display:block;opacity: 0.8;-moz-opacity: 0.8;filter: alpha(opacity=80);} /* Debug des traductions */ -.debug-traduction {background-color: #cde0ed; color:#0000ff;} -.erreur-traduction {background-color: #fbe3e4; color: #8a1f11;} +.debug-traduction {color: #264409;background-color:#E6EFC2;} +.debug-traduction-prive {color: #514721;background-color:#FFF6BF;} +.debug-traduction-erreur {background-color: #fbe3e4; color: #8a1f11;}