commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/common/src GDateTime.py GParser.py


From: Arturas Kriukovas
Subject: gnue/common/src GDateTime.py GParser.py
Date: Fri, 03 May 2002 13:26:08 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Arturas Kriukovas <address@hidden>      02/05/03 13:26:08

Modified files:
        common/src     : GDateTime.py GParser.py 

Log message:
        i18n changes.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GDateTime.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GParser.py.diff?tr1=1.37&tr2=1.38&r1=text&r2=text

Patches:
Index: gnue/common/src/GDateTime.py
diff -c gnue/common/src/GDateTime.py:1.4 gnue/common/src/GDateTime.py:1.5
*** gnue/common/src/GDateTime.py:1.4    Tue Jan  1 13:31:34 2002
--- gnue/common/src/GDateTime.py        Fri May  3 13:26:08 2002
***************
*** 67,72 ****
          self.hour >= 0 and self.hour <= 23 and \
          self.minute >= 0 and self.minute <= 59 and \
          self.second >= 0 and self.second <= 59 ):
!       raise InvalidDate, "Not a valid date"
  
  
--- 67,72 ----
          self.hour >= 0 and self.hour <= 23 and \
          self.minute >= 0 and self.minute <= 59 and \
          self.second >= 0 and self.second <= 59 ):
!       raise InvalidDate, _("Not a valid date")
  
  
Index: gnue/common/src/GParser.py
diff -c gnue/common/src/GParser.py:1.37 gnue/common/src/GParser.py:1.38
*** gnue/common/src/GParser.py:1.37     Sun Apr 28 21:52:53 2002
--- gnue/common/src/GParser.py  Fri May  3 13:26:08 2002
***************
*** 97,105 ****
    object = dh.getRoot()
  
    if not object:
!     raise MarkupError, "Error loading %s: empty definition file" % 
(xmlFileType)
    elif object._type != rootType:
!     raise MarkupError, "Error loading %s: not a valid %s definition 
(expected: %s, got: %s)" % (xmlFileType,
           xmlFileType, rootType, object._type)
  
    # Set the object's attributes
--- 97,105 ----
    object = dh.getRoot()
  
    if not object:
!     raise MarkupError, _("Error loading %s: empty definition file") % 
(xmlFileType)
    elif object._type != rootType:
!     raise MarkupError, _("Error loading %s: not a valid %s definition 
(expected: %s, got: %s)") % (xmlFileType,
           xmlFileType, rootType, object._type)
  
    # Set the object's attributes
***************
*** 206,212 ****
        try:
          baseAttrs = self.xmlElements[name].get('Attributes',{}) # 
default(self.xmlElements[name],'Attributes',{})
        except KeyError:
!         raise MarkupError, 'Error processing <%s> tag [I do not know what a 
<%s> tag does]' % (name, name)
  
  
        for qattr in saxattrs.keys():
--- 206,212 ----
        try:
          baseAttrs = self.xmlElements[name].get('Attributes',{}) # 
default(self.xmlElements[name],'Attributes',{})
        except KeyError:
!         raise MarkupError, _('Error processing <%s> tag [I do not know what a 
<%s> tag does]') % (name, name)
  
  
        for qattr in saxattrs.keys():
***************
*** 218,231 ****
            attrs[attr] = baseAttrs[attr].get('Typecast',char)(saxattrs[qattr]) 
# default(baseAttrs[attr],'Typecast',char)(saxattrs[qattr])
            loadedxmlattrs[attr] = attrs[attr]
          except KeyError:
!           raise MarkupError, 'Error processing <%s> tag [I do not recognize 
the "%s" attribute' % (name, attr)
          except:
!           raise MarkupError, 'Error processing <%s> tag [invalid type for 
"%s" attribute; value is "%s"]' % (name, attr, saxattrs[qattr])
  
          # If this attribute must be unique, check for duplicates
          if baseAttrs[attr].get('Unique',0): # default 
(baseAttrs[attr],'Unique',0):
            if self.uniqueIDs.has_key('%s' % (saxattrs[qattr])):
!             raise MarkupError, 'Error processing <%s> tag ["%s" attribute 
should be unique; duplicate value is "%s"]' % (name, attr, saxattrs[qattr])
  
        for attr in baseAttrs.keys():
          if not attrs.has_key(attr):
--- 218,231 ----
            attrs[attr] = baseAttrs[attr].get('Typecast',char)(saxattrs[qattr]) 
# default(baseAttrs[attr],'Typecast',char)(saxattrs[qattr])
            loadedxmlattrs[attr] = attrs[attr]
          except KeyError:
!           raise MarkupError, _('Error processing <%s> tag [I do not recognize 
the "%s" attribute') % (name, attr)
          except:
!           raise MarkupError, _('Error processing <%s> tag [invalid type for 
"%s" attribute; value is "%s"]') % (name, attr, saxattrs[qattr])
  
          # If this attribute must be unique, check for duplicates
          if baseAttrs[attr].get('Unique',0): # default 
(baseAttrs[attr],'Unique',0):
            if self.uniqueIDs.has_key('%s' % (saxattrs[qattr])):
!             raise MarkupError, _('Error processing <%s> tag ["%s" attribute 
should be unique; duplicate value is "%s"]') % (name, attr, saxattrs[qattr])
  
        for attr in baseAttrs.keys():
          if not attrs.has_key(attr):
***************
*** 236,242 ****
  
            # Check for missing required attributes
            elif baseAttrs.get('Required', 0): #default(baseAttrs[attr], 
'Required', 0):
!             raise MarkupError, 'Error processing <%s> tag [required attribute 
"%s" not present]' % (name, attr)
  
  
        if self.bootstrapflag:
--- 236,242 ----
  
            # Check for missing required attributes
            elif baseAttrs.get('Required', 0): #default(baseAttrs[attr], 
'Required', 0):
!             raise MarkupError, _('Error processing <%s> tag [required 
attribute "%s" not present]') % (name, attr)
  
  
        if self.bootstrapflag:
***************
*** 271,277 ****
        #
        # namespace qualifier and we are not masquerading
        #
!       print "WARNING: Markup includes namespaces, but the current tool does 
not include namespace support!"
        sys.exit()
  
  
--- 271,277 ----
        #
        # namespace qualifier and we are not masquerading
        #
!       print _("WARNING: Markup includes namespaces, but the current tool does 
not include namespace support!")
        sys.exit()
  
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]