Salome HOME
premiere version
[tools/eficas.git] / Validation / V_MCBLOC.py
index e44b9d35f4e273d99c3adeaf26b043eece7e2bd4..c35eabec21598190ba3f6b634219b91b9740aee7 100644 (file)
@@ -1,26 +1,22 @@
-#@ MODIF V_MCBLOC Validation  DATE 07/09/2009   AUTEUR COURTOIS M.COURTOIS 
 # -*- coding: iso-8859-1 -*-
-# RESPONSABLE COURTOIS M.COURTOIS
-#            CONFIGURATION MANAGEMENT OF EDF VERSION
-# ======================================================================
-# COPYRIGHT (C) 1991 - 2002  EDF R&D                  WWW.CODE-ASTER.ORG
-# 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
-# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR   
-# (AT YOUR OPTION) ANY LATER VERSION.                                 
+# Copyright (C) 2007-2013   EDF R&D
 #
-# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT 
-# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF          
-# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU    
-# GENERAL PUBLIC LICENSE FOR MORE DETAILS.                            
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE   
-# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,       
-#    1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.      
-#                                                                       
-#                                                                       
-# ======================================================================
-
 
 """
    Ce module contient la classe mixin MCBLOC qui porte les méthodes
    Une classe mixin porte principalement des traitements et est
    utilisée par héritage multiple pour composer les traitements.
 """
-# Modules Python
-import string
-
 # Modules EFICAS
 import V_MCCOMPO
+from Noyau.strfunc import ufmt
 
 class MCBLOC(V_MCCOMPO.MCCOMPO):
    """
@@ -43,10 +37,10 @@ class MCBLOC(V_MCCOMPO.MCCOMPO):
       - txt_nat qui sert pour les comptes-rendus liés à cette classe
    """
 
-   txt_nat="Bloc :"
+   txt_nat = u"Bloc :"
 
    def isvalid(self,sd='oui',cr='non'):
-      """ 
+      """
          Methode pour verifier la validité du MCBLOC. Cette méthode
          peut etre appelée selon plusieurs modes en fonction de la valeur
          de sd et de cr.
@@ -70,11 +64,12 @@ class MCBLOC(V_MCCOMPO.MCCOMPO):
         # la validité des règles
         text_erreurs,test_regles = self.verif_regles()
         if not test_regles :
-          if cr == 'oui' : self.cr.fatal(string.join(("Règle(s) non respectée(s) :", text_erreurs)))
+          if cr == 'oui':
+              self.cr.fatal(_(u"Règle(s) non respectée(s) : %s"), text_erreurs)
           valid = 0
         self.valid = valid
         self.state = 'unchanged'
-        if not old_valid or old_valid != self.valid : 
+        if not old_valid or old_valid != self.valid :
            self.init_modif_up()
         return self.valid