[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src GDataSource.py GDateTime.py GPa...
From: |
Arturas Kriukovas |
Subject: |
gnue/common/src GDataSource.py GDateTime.py GPa... |
Date: |
Tue, 07 Jan 2003 11:49:42 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Arturas Kriukovas <address@hidden> 03/01/07 11:49:42
Modified files:
common/src : GDataSource.py GDateTime.py GParser.py
Log message:
gettext updates
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GDataSource.py.diff?tr1=1.57&tr2=1.58&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GDateTime.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GParser.py.diff?tr1=1.59&tr2=1.60&r1=text&r2=text
Patches:
Index: gnue/common/src/GDataSource.py
diff -c gnue/common/src/GDataSource.py:1.57 gnue/common/src/GDataSource.py:1.58
*** gnue/common/src/GDataSource.py:1.57 Wed Jan 1 19:45:41 2003
--- gnue/common/src/GDataSource.py Tue Jan 7 11:49:42 2003
***************
*** 146,153 ****
if hasattr(rset,'callFunc'):
rset.callFunc(name,params)
else:
! raise StandardError, \
! _("Backend doesn't support the trigger 'call' function")
#
# get/set the static condition assosiated with a datasource
--- 146,153 ----
if hasattr(rset,'callFunc'):
rset.callFunc(name,params)
else:
! tmsg = _("Backend doesn't support the trigger 'call' function")
! raise StandardError, tmsg
#
# get/set the static condition assosiated with a datasource
***************
*** 176,192 ****
from gnue.common.dbdrivers._empty import DBdriver
GDebug.printMesg (7, 'Using empty data driver')
dataObject = DBdriver.supportedDataObjects['object']()
!
else:
from gnue.common.dbdrivers._static import DBdriver
GDebug.printMesg (7, 'Using static data driver')
dataObject = DBdriver.supportedDataObjects['static']()
!
for child in self._children:
if isinstance(child, GStaticSet):
dataObject._staticSet = child
break
!
elif self._connections:
self.connection = string.lower(self.connection)
--- 176,192 ----
from gnue.common.dbdrivers._empty import DBdriver
GDebug.printMesg (7, 'Using empty data driver')
dataObject = DBdriver.supportedDataObjects['object']()
!
else:
from gnue.common.dbdrivers._static import DBdriver
GDebug.printMesg (7, 'Using static data driver')
dataObject = DBdriver.supportedDataObjects['static']()
!
for child in self._children:
if isinstance(child, GStaticSet):
dataObject._staticSet = child
break
!
elif self._connections:
self.connection = string.lower(self.connection)
***************
*** 323,331 ****
.getDataObject().addDetailDataObject(self.getDataObject(),
self)
else:
! raise StandardError, \
! _("Detail source '%s' references non-existant master '%s'") \
% (self.name, self.master)
def tertiaryInit(self):
if hasattr(self, 'prequery'):
--- 323,331 ----
.getDataObject().addDetailDataObject(self.getDataObject(),
self)
else:
! tmsg = _("Detail source '%s' references non-existant master '%s'") \
% (self.name, self.master)
+ raise StandardError, tmsg
def tertiaryInit(self):
if hasattr(self, 'prequery'):
Index: gnue/common/src/GDateTime.py
diff -c gnue/common/src/GDateTime.py:1.6 gnue/common/src/GDateTime.py:1.7
*** gnue/common/src/GDateTime.py:1.6 Wed Jan 1 19:45:41 2003
--- gnue/common/src/GDateTime.py Tue Jan 7 11:49:42 2003
***************
*** 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,73 ----
self.hour >= 0 and self.hour <= 23 and \
self.minute >= 0 and self.minute <= 59 and \
self.second >= 0 and self.second <= 59 ):
! tmsg = _("Not a valid date")
! raise InvalidDate, tmsg
Index: gnue/common/src/GParser.py
diff -c gnue/common/src/GParser.py:1.59 gnue/common/src/GParser.py:1.60
*** gnue/common/src/GParser.py:1.59 Wed Jan 1 19:45:41 2003
--- gnue/common/src/GParser.py Tue Jan 7 11:49:42 2003
***************
*** 109,118 ****
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)
dh.finalValidation()
--- 109,120 ----
object = dh.getRoot()
if not object:
! tmsg = _("Error loading %s: empty definition file") % (xmlFileType)
! raise MarkupError, tmsg
elif object._type != rootType:
! tmsg = _("Error loading %s: not a valid %s definition (expected: %s, got:
%s)") % \
! (xmlFileType, xmlFileType, rootType, object._type)
! raise MarkupError, tmsg
dh.finalValidation()
***************
*** 225,231 ****
for element in self._requiredTags:
if self._tagCounts[element] < 1:
! raise MarkupError, "File is missing required tag <%s>" % (element)
#
--- 227,234 ----
for element in self._requiredTags:
if self._tagCounts[element] < 1:
! tmsg = _("File is missing required tag <%s>") % (element)
! raise MarkupError, tmsg
#
***************
*** 246,252 ****
try:
baseAttrs = self.xmlElements[name].get('Attributes',{})
except KeyError:
! raise MarkupError, 'Error processing <%s> tag [I do not know what a
<%s> tag does]' % (name, name)
xmlns = {}
--- 249,257 ----
try:
baseAttrs = self.xmlElements[name].get('Attributes',{})
except KeyError:
! tmsg = _("Error processing <%s> tag [I do not know what a <%s> tag
does]") \
! % (name, name)
! raise MarkupError, tmsg
xmlns = {}
***************
*** 263,269 ****
if attrns:
if not self.xmlNamespaceAttributesAsPrefixes:
! raise "Unexpected namespace on attribute"
prefix = attrns.split(':')[-1]
attrs[prefix + '__' + attr] = saxattrs[qattr]
xmlns[prefix] = attrns
--- 268,275 ----
if attrns:
if not self.xmlNamespaceAttributesAsPrefixes:
! tmsg = _("Unexpected namespace on attribute")
! raise tmsg
prefix = attrns.split(':')[-1]
attrs[prefix + '__' + attr] = saxattrs[qattr]
xmlns[prefix] = attrns
***************
*** 275,288 ****
attrs[attr] =
baseAttrs[attr].get('Typecast',GTypecast.text)(saxattrs[qattr].encode(encoding))
# default(baseAttrs[attr],'Typecast',GTypecast.text)(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):
--- 281,300 ----
attrs[attr] =
baseAttrs[attr].get('Typecast',GTypecast.text)(saxattrs[qattr].encode(encoding))
# default(baseAttrs[attr],'Typecast',GTypecast.text)(saxattrs[qattr])
loadedxmlattrs[attr] = attrs[attr]
except KeyError:
! tmsg = _('Error processing <%s> tag [I do not recognize the "%s"
attribute')\
! % (name, attr)
! raise MarkupError, tmsg
except:
! tmsg = _('Error processing <%s> tag [invalid type for "%s"
attribute; value is "%s"]')\
! % (name, attr, saxattrs[qattr])
! raise MarkupError, tmsg
# 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])):
! tmsg = _('Error processing <%s> tag ["%s" attribute should be
unique; duplicate value is "%s"]')\
! % (name, attr, saxattrs[qattr])
! raise MarkupError, tmsg
for attr in baseAttrs.keys():
if not attrs.has_key(attr):
***************
*** 293,299 ****
# Check for missing required attributes
elif baseAttrs[attr].get('Required', 0): #default(baseAttrs[attr],
'Required', 0):
! raise MarkupError, 'Error processing <%s> tag [required attribute
"%s" not present]' % (name, attr)
attrs['_xmlnamespaces'] = xmlns
--- 305,313 ----
# Check for missing required attributes
elif baseAttrs[attr].get('Required', 0): #default(baseAttrs[attr],
'Required', 0):
! tmsg = _('Error processing <%s> tag [required attribute "%s" not
present]')\
! % (name, attr)
! raise MarkupError, tmsg
attrs['_xmlnamespaces'] = xmlns
***************
*** 429,435 ****
GDebug.printMesg (5, ">>> Moving %s" % key)
rv._buildObject()
else:
! raise "Unable to find an importable object named %s in %s" %
(self.name, self.library)
#
# __findImportItem
--- 443,451 ----
GDebug.printMesg (5, ">>> Moving %s" % key)
rv._buildObject()
else:
! tmsg = _("Unable to find an importable object named %s in %s") \
! % (self.name, self.library)
! raise tmsg
#
# __findImportItem
***************
*** 451,457 ****
return rv
else:
return None
!
class GImport(GObj):
def __init__(self, parent=None):
--- 467,473 ----
return rv
else:
return None
!
class GImport(GObj):
def __init__(self, parent=None):
***************
*** 460,466 ****
self._form = None
self._inits = [self.primaryInit]
self._xmlParser = self.findParentOfType(None)._xmlParser
!
def primaryInit(self):
handle = openResource(self.library)
form = self._xmlParser.loadFile(handle, self.findParentOfType(None)._app,
initialize=0)
--- 476,482 ----
self._form = None
self._inits = [self.primaryInit]
self._xmlParser = self.findParentOfType(None)._xmlParser
!
def primaryInit(self):
handle = openResource(self.library)
form = self._xmlParser.loadFile(handle, self.findParentOfType(None)._app,
initialize=0)
***************
*** 472,478 ****
importNames =
string.split(string.replace(self._loadedxmlattrs[attribute],' ',''),',')
instanceType =
self._xmlParser.getXMLelements()[string.lower(attribute)]['BaseClass']
!
if importAll or len(importNames):
for child in form._children:
if isinstance(child,instanceType) and \
--- 488,494 ----
importNames =
string.split(string.replace(self._loadedxmlattrs[attribute],' ',''),',')
instanceType =
self._xmlParser.getXMLelements()[string.lower(attribute)]['BaseClass']
!
if importAll or len(importNames):
for child in form._children:
if isinstance(child,instanceType) and \
***************
*** 499,505 ****
},
'ParentTags': rootTag,
}
!
for key in elements.keys():
if elements[key].has_key('Importable') and elements[key]['Importable']:
name = "import-%s" % key
--- 515,521 ----
},
'ParentTags': rootTag,
}
!
for key in elements.keys():
if elements[key].has_key('Importable') and elements[key]['Importable']:
name = "import-%s" % key
***************
*** 509,515 ****
p = copy.deepcopy(elements[key])
p['BaseClass'] = GImportItem
!
if not p.has_key('Attributes'):
p['Attributes'] = {}
--- 525,531 ----
p = copy.deepcopy(elements[key])
p['BaseClass'] = GImportItem
!
if not p.has_key('Attributes'):
p['Attributes'] = {}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/common/src GDataSource.py GDateTime.py GPa...,
Arturas Kriukovas <=