From 2b1c9190d15348b0309b624c70348f49d4f52ca3 Mon Sep 17 00:00:00 2001
From: ARNO* <arno@rezo.net>
Date: Sat, 4 Oct 2003 14:39:29 +0000
Subject: [PATCH] Modifs barre de raccourcis. Introduction de guillemets
 allemands

---
 .gitattributes                     |   1 +
 IMG/icones_barre/guillemets-de.png | Bin 0 -> 316 bytes
 ecrire/inc_barre.php3              |  15 +++++++++------
 ecrire/lang/spip_fr.php3           |   2 +-
 ecrire/spip_style.php3             |   6 ++++--
 5 files changed, 15 insertions(+), 9 deletions(-)
 create mode 100644 IMG/icones_barre/guillemets-de.png

diff --git a/.gitattributes b/.gitattributes
index e3e7509468..15032f5d37 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -51,6 +51,7 @@ IMG/icones_barre/eacute-maj.png -text
 IMG/icones_barre/espace.png -text
 IMG/icones_barre/euro.png -text
 IMG/icones_barre/gras.png -text
+IMG/icones_barre/guillemets-de.png -text
 IMG/icones_barre/guillemets-simples.png -text
 IMG/icones_barre/guillemets-uniques.png -text
 IMG/icones_barre/guillemets.png -text
diff --git a/IMG/icones_barre/guillemets-de.png b/IMG/icones_barre/guillemets-de.png
new file mode 100644
index 0000000000000000000000000000000000000000..d5967a9c6adb17fab69bd0a06201f99d052153e8
GIT binary patch
literal 316
zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl;=8&~`zjDUQ}64!{5
z;QX|b^2DN42FH~Aq*MjZ+{E<Mpwz^a%EFVWHb6xZ0X`wFFJHc7V`J;<>)X0@Yf({=
zi;K&dGiTntd)MPTFB7PSqa?^L_&)?N+-u$&2^5>=>EaktaVsgootc60NP`}OfP)7U
z&zU!Ga&j0LTLco46BE*tlGr&ES{RfAc(tvq9T*fjHy9WjZ`#1fBH+}}I&tdUsS`OB
z8Yb|hrZLRq7I2Wb#>67f#^AtUxWUlSz*v!!fkl8>TUlFKc@hUu(7?cO)5Z--EDTH?
yj8CLeY=O2OICJR0k){+jpe(~$$Bmo{2N>Lv**NAk_xuLBkipZ{&t;ucLK6T2G-Egb

literal 0
HcmV?d00001

diff --git a/ecrire/inc_barre.php3 b/ecrire/inc_barre.php3
index 5ae024461c..e8b36be00b 100644
--- a/ecrire/inc_barre.php3
+++ b/ecrire/inc_barre.php3
@@ -12,7 +12,7 @@ function test_barre() {
 	if ($browser_name == '') verif_butineur();
 
 	if (
-	(eregi("msie", $browser_name) AND $browser_version >= 5 AND $HTTP_UA_OS != 'MacOS')
+	(eregi("msie", $browser_name) AND $browser_version >= 5.5)
 	|| (eregi("mozilla", $browser_name) AND $browser_version >= 5 AND $browser_rev >= 1.3)
 	)
 		return true;
@@ -47,14 +47,14 @@ function bouton_barre_racc($action, $img, $help, $formulaire, $texte) {
 }
 
 function afficher_barre($formulaire='',$texte='', $forum=false) {
-	global $spip_lang, $flag_ecrire, $options;
+	global $spip_lang, $flag_ecrire, $options, $spip_lang_right, $spip_lang_left;
 
 	if (test_barre()) {
 		$ret = afficher_script_barre();
 		$champ = "document.$formulaire.$texte";
 		$ret .= "<table cellpadding='0' cellspacing='0' border='0' width='100%'>";
 		$ret .= "<tr width='100%'>";
-		$ret .= "<td align='left' style='padding-top: 4px; padding-bottom: 2px;'>";
+		$ret .= "<td align='$spip_lang_left' style='padding-top: 4px; padding-bottom: 2px;'>";
 		$col++;
 
 		// Italique, gras, intertitres
@@ -86,11 +86,14 @@ function afficher_barre($formulaire='',$texte='', $forum=false) {
 		$ret .= "</td>";
 
 		// Insertion de caracteres difficiles a taper au clavier (guillemets, majuscules accentuees...)
-		$ret .= "<td align='right' style='padding-top: 4px; padding-bottom: 2px;'>";
+		$ret .= "<td align='$spip_lang_right' style='padding-top: 4px; padding-bottom: 2px;'>";
 		$col++;
-		if ($spip_lang == "fr" OR $spip_lang == "eo" OR $spip_lang == "cpf") {
+		if ($spip_lang == "fr" OR $spip_lang == "eo" OR $spip_lang == "cpf" OR $spip_lang == "ar") {
 			$ret .= bouton_barre_racc ("javascript:barre_raccourci('&laquo;','&raquo;',$champ)", "guillemets.png", _T('barre_guillemets'), $formulaire, $texte);
 		}
+		else if ($spip_lang == "de" OR $spip_lang == "pl" OR $spip_lang == "hr" OR $spip_lang == "src") {
+			$ret .= bouton_barre_racc ("javascript:barre_raccourci('&bdquo;','&ldquo;',$champ)", "guillemets-de.png", _T('barre_guillemets_de'), $formulaire, $texte);
+		}
 		else {
 			$ret .= bouton_barre_racc ("javascript:barre_raccourci('&ldquo;','&rdquo;',$champ)", "guillemets-simples.png", _T('barre_guillemets_simples'), $formulaire, $texte);
 		}
@@ -109,7 +112,7 @@ function afficher_barre($formulaire='',$texte='', $forum=false) {
 			$ret .= "<td> &nbsp; </td>";
 			$col++;
 
-			$ret .= "<td align='right' onMouseOver=\"helpline(_T('barre_aide_rac'),helpbox$texte)\" onMouseOut=\"helpline('Utilisez les raccourcis typographiques pour enrichir votre mise en page', $champhelp)\">";
+			$ret .= "<td align='$spip_lang_right' onMouseOver=\"helpline(_T('barre_aide_rac'),helpbox$texte)\" onMouseOut=\"helpline('Utilisez les raccourcis typographiques pour enrichir votre mise en page', $champhelp)\">";
 			$col++;
 			$ret .= "&nbsp;&nbsp;&nbsp;";
 			$ret .= aide("raccourcis");
diff --git a/ecrire/lang/spip_fr.php3 b/ecrire/lang/spip_fr.php3
index 0bbb2887b6..cc48641b39 100644
--- a/ecrire/lang/spip_fr.php3
+++ b/ecrire/lang/spip_fr.php3
@@ -85,7 +85,7 @@ $GLOBALS['i18n_spip_fr'] = array(
 'barre_note' => 'Transformer en [[Note de bas de page]]',
 'barre_quote' => '<quote>Citer un message</quote>',
 'barre_guillemets' => 'Entourer de &laquo; guillemets fran&ccedil;ais &raquo;',
-'barre_guillemets_simples' => 'Entourer de &ldquo;guillemets&rdquo;',
+'barre_guillemets_de' => 'Entourer de &bdquo;guillemets&ldquo;',
 'barre_a_accent_grave' => 'Ins&eacute;rer un A accent grave majuscule',
 'barre_e_accent_aigu' => 'Ins&eacute;rer un E accent aigu majuscule',
 'barre_eo' => 'Ins&eacute;rer un E dans l\'O',
diff --git a/ecrire/spip_style.php3 b/ecrire/spip_style.php3
index 4a3d502182..5ba95d8cf1 100644
--- a/ecrire/spip_style.php3
+++ b/ecrire/spip_style.php3
@@ -139,13 +139,15 @@ a.icone:hover { text-decoration: none; }
 a.spip_barre {
 	border: 0px solid #666666;
 	padding: 4px;
-	margin-right: 3px;
+	margin-right: 1px;
+	margin-left: 1px;
 	background: url(img_pack/pave-gris-16.png);
 }
 a.spip_barre:hover {
 	border: 0px solid #666666;
 	padding: 4px;
-	margin-right: 3px;
+	margin-right: 1px;
+	margin-left: 1px;
 	background: url(img_pack/pave-blanc-16.png);
 }
 
-- 
GitLab