diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 2f8b1f95e1a..d0246304c23 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,10 +21,10 @@ */ /** - \file htdocs/comm/action/fiche.php - \ingroup commercial - \brief Page de la fiche action commercial - \version $Revision$ + \file htdocs/comm/action/fiche.php + \ingroup commercial + \brief Page de la fiche action commercial + \version $Revision$ */ require("./pre.inc.php"); @@ -546,7 +546,7 @@ function add_row_for_webcal_link() { print ''.$langs->trans("AddCalendarEntry").''; print ''; - print ' '.$langs->trans("ErrorWebcalLoginNotDefined","id."\">".$user->login.""); + print ' '.$langs->transnoentities("ErrorWebcalLoginNotDefined","id."\">".$user->login.""); print ''; print ''; } diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php index d4c179a6e1a..0837acc464b 100644 --- a/htdocs/translate.class.php +++ b/htdocs/translate.class.php @@ -122,9 +122,24 @@ class Translate { */ function trans($str, $param1='', $param2='', $param3='') { + return $this->transnoentities($str,htmlentities($param1),htmlentities($param2),htmlentities($param3)); + } + + /** + * \brief Retourne la version traduite du texte passé en paramètre + * Si il n'y a pas de correspondance pour ce texte, on cherche dans fichier alternatif + * et si toujours pas trouvé, il est retourné tel quel + * \param str chaine a traduire + * \param param1 chaine de param1 + * \param param2 chaine de param1 + * \param param3 chaine de param1 + * \return string chaine traduite + */ + + function transnoentities($str, $param1='', $param2='', $param3='') { if ($this->tab_translate[$str]) { // Si la traduction est disponible - return sprintf($this->tab_translate[$str],htmlentities($param1),htmlentities($param2),htmlentities($param3)); + return sprintf($this->tab_translate[$str],$param1,$param2,$param3); } return $str; }