Salome HOME
PN bug notation scientifique
[tools/eficas.git] / Ihm / I_OBJECT.py
index dea18249367d7a3010cbd1d75ed048a81d7191d7..eb00f2a970116dcec99b27fbdbf29ae6f5cc0269 100644 (file)
@@ -1,17 +1,43 @@
+# -*- coding: utf-8 -*-
+#            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.
+#
+# 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.
+#
+# 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.
+#
+#
+# ======================================================================
 """
 """
 import string
 
 import Noyau
 
+try:
+  import prefs
+  lang=prefs.lang
+except:
+  lang='fr'
+  
+
 class OBJECT:
   from Noyau.N_CO import CO
   from Noyau.N_ASSD import assd
 
   def isMCList(self):
     """ 
-        Retourne 1 si self est une MCList (liste de mots-clés), 
-                 0 sinon (défaut) 
+        Retourne 1 si self est une MCList (liste de mots-clés), 0 sinon (défaut) 
     """
     return 0
 
@@ -81,8 +107,8 @@ class OBJECT:
         Evalue les conditions de tous les blocs fils possibles 
         (en fonction du catalogue donc de la définition) de self et
         retourne deux listes :
-        - la première contient les noms des blocs à rajouter
-        - la seconde contient les noms des blocs à supprimer
+          - la première contient les noms des blocs à rajouter
+          - la seconde contient les noms des blocs à supprimer
     """
     return [],[]
 
@@ -98,11 +124,13 @@ class OBJECT:
     else:
        return [string.strip(self.nom)]
 
-  def reparent(self,parent):
+  def get_fr(self):
      """
-         Cette methode sert a reinitialiser la parente de l'objet
+         Retourne la chaine d'aide contenue dans le catalogue
+         en tenant compte de la langue
      """
-     self.parent=parent
-     self.jdc=parent.jdc
-
+     try :
+        return getattr(self.definition,lang)
+     except:
+        return ''