commit-gnue
[Top][All Lists]
Advanced

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

r5665 - in trunk/gnue-common/src: datasources rpc/drivers/soap/soappy rp


From: reinhard
Subject: r5665 - in trunk/gnue-common/src: datasources rpc/drivers/soap/soappy rpc/drivers/xmlrpc/pw_xmlrpc rpc/drivers/xmlrpc/py_xmlrpc schema schema/scripter schema/scripter/processors
Date: Wed, 7 Apr 2004 06:04:33 -0500 (CDT)

Author: reinhard
Date: 2004-04-07 06:04:32 -0500 (Wed, 07 Apr 2004)
New Revision: 5665

Modified:
   trunk/gnue-common/src/datasources/GConditions.py
   trunk/gnue-common/src/rpc/drivers/soap/soappy/Driver.py
   trunk/gnue-common/src/rpc/drivers/xmlrpc/pw_xmlrpc/ServerAdapter.py
   trunk/gnue-common/src/rpc/drivers/xmlrpc/py_xmlrpc/ServerAdapter.py
   trunk/gnue-common/src/schema/Objects.py
   trunk/gnue-common/src/schema/scripter/Scripter.py
   trunk/gnue-common/src/schema/scripter/processors/Base.py
   trunk/gnue-common/src/schema/scripter/processors/mysql.py
Log:
Fixed some broken translatable strings.


Modified: trunk/gnue-common/src/datasources/GConditions.py
===================================================================
--- trunk/gnue-common/src/datasources/GConditions.py    2004-04-07 10:01:40 UTC 
(rev 5664)
+++ trunk/gnue-common/src/datasources/GConditions.py    2004-04-07 11:04:32 UTC 
(rev 5665)
@@ -406,7 +406,7 @@
 
 def buildPrefixFromTree(conditionTree):
   if type(conditionTree) != types.InstanceType:
-    tmsg = _("No valid condition tree")
+    tmsg = u_("No valid condition tree")
     raise ConditionError, tmsg
   else:
     otype = string.lower(conditionTree._type[2:])
@@ -453,12 +453,12 @@
       #  check for integrity of condition
       #
       if len(conditionTree._children) < conditionElements[otype][0]:
-        tmsg = _('Condition element "%s" expects at least %s arguments; found 
%s') % \
+        tmsg = u_('Condition element "%s" expects at least %s arguments; found 
%s') % \
                  (otype, conditionElements[otype][0], 
len(conditionTree._children))
         raise ConditionError, tmsg
 
       if len(conditionTree._children) > conditionElements[otype][1]:
-        tmsg = _('Condition element "%s" expects at most %s arguments; found 
%s') % \
+        tmsg = u_('Condition element "%s" expects at most %s arguments; found 
%s') % \
                 (otype, conditionElements[otype][1], 
len(conditionTree._children))
         raise ConditionError, tmsg
 
@@ -467,7 +467,7 @@
       return result;
 
     else:
-      tmsg = _('Condition clause "%s" is not supported '+
-            'by the condition to prefix table conversion.') % otype
+      tmsg = u_('Condition clause "%s" is not supported '
+                'by the condition to prefix table conversion.') % otype
       raise ConditionNotSupported, tmsg
 

Modified: trunk/gnue-common/src/rpc/drivers/soap/soappy/Driver.py
===================================================================
--- trunk/gnue-common/src/rpc/drivers/soap/soappy/Driver.py     2004-04-07 
10:01:40 UTC (rev 5664)
+++ trunk/gnue-common/src/rpc/drivers/soap/soappy/Driver.py     2004-04-07 
11:04:32 UTC (rev 5665)
@@ -46,10 +46,10 @@
   import SOAP
 
 except ImportError:
-  print _("\nUnable to load SOAP.py.  To use the SOAP interface, \n") \
-      + _("please install SOAP.py from:\n") \
-      + "    http://sourceforge.net/projects/pywebsvcs\n"; \
-      + _("the appropriate DEBIAN package is python-soappy")
+  print _("\nUnable to load SOAP.py.  To use the SOAP interface,\n"
+          "please install SOAP.py from:\n"
+          "    http://sourceforge.net/projects/pywebsvcs\n";
+          "the appropriate DEBIAN package is python-soappy")
   sys.exit()
 
 from gnue.common.apps import GDebug
@@ -154,7 +154,7 @@
 
 
   def OnErr(self,server,source):
-    print _("Internal server error occured:\n"+
+    print _("Internal server error occured:\n"
             " server %s \n on source %s.") % (server,source)
     return xmlrpc.ONERR_KEEP_WORK
     

Modified: trunk/gnue-common/src/rpc/drivers/xmlrpc/pw_xmlrpc/ServerAdapter.py
===================================================================
--- trunk/gnue-common/src/rpc/drivers/xmlrpc/pw_xmlrpc/ServerAdapter.py 
2004-04-07 10:01:40 UTC (rev 5664)
+++ trunk/gnue-common/src/rpc/drivers/xmlrpc/pw_xmlrpc/ServerAdapter.py 
2004-04-07 11:04:32 UTC (rev 5665)
@@ -144,10 +144,10 @@
 #        self._httpserver=MyAsyncoreDispatcher
       else:
         raise server.AdapterConfigurationError, \
-              _('Value %s for parameter "servertype" is not supported.') \
-              % params['servertype'] + _('Valid values are: threading,'+ \
-              'forking.')  #  ',asyncore.')
-      
+              u_("Value %(value)s for parameter 'servertype' is not supported. 
"
+                 "Valid values are: %(valid)s") \
+              % {'value': params ['servertype'],
+                 'valid': 'threading, forking'}
 
     DirectoryServer.DirectoryServer.__init__(self, rpcdef, bindings, params)
     

Modified: trunk/gnue-common/src/rpc/drivers/xmlrpc/py_xmlrpc/ServerAdapter.py
===================================================================
--- trunk/gnue-common/src/rpc/drivers/xmlrpc/py_xmlrpc/ServerAdapter.py 
2004-04-07 10:01:40 UTC (rev 5664)
+++ trunk/gnue-common/src/rpc/drivers/xmlrpc/py_xmlrpc/ServerAdapter.py 
2004-04-07 11:04:32 UTC (rev 5665)
@@ -41,10 +41,10 @@
 try:
   import xmlrpc
 except ImportError:
-  tmsg = _("\nUnable to load xmlrpc.  To use the XML-RPC interface, \n"
-           "please install xmlrpc from:\n"
-           "    http://sourceforge.net/projects/py-xmlrpc\n";
-           "the appropriate DEBIAN package is python-xmlrpc.deb")
+  tmsg = u_("\nUnable to load xmlrpc.  To use the XML-RPC interface, \n"
+            "please install xmlrpc from:\n"
+            "    http://sourceforge.net/projects/py-xmlrpc\n";
+            "the appropriate DEBIAN package is python-xmlrpc.deb")
   raise server.AdapterInitializationError, tmsg
 
 import typeconv
@@ -112,7 +112,7 @@
 
   def OnErr (self, server, source):
 
-    print _("Internal server error occured:\n"+
+    print _("Internal server error occured:\n"
             " server %s \n on source %s.") % (server, source)
     return xmlrpc.ONERR_KEEP_WORK
     

Modified: trunk/gnue-common/src/schema/Objects.py
===================================================================
--- trunk/gnue-common/src/schema/Objects.py     2004-04-07 10:01:40 UTC (rev 
5664)
+++ trunk/gnue-common/src/schema/Objects.py     2004-04-07 11:04:32 UTC (rev 
5665)
@@ -166,8 +166,8 @@
     tbFields = table.findChildrenOfType ('GSField', True, True)
 
     if len (cFields) > len (tbFields):
-      raise Exception (_("Constraint '%s' has more fields than the " + \
-                         "table '%s'") % (self.name, table.name))
+      raise gException, u_("Constraint '%s' has more fields than the "
+                           "table '%s'") % (self.name, table.name)
 
     for check in cFields:
       try:
@@ -204,8 +204,8 @@
     for ix in range (0, len (csFields)):
       if myFields [csFields [ix].name].type != \
          rfFields [refFields [ix].name].type:
-        raise Exception (_("Constraint '%s': typemismatch in reference " + \
-                           "field '%s'.") % (self.name, csFields [ix].name))
+        raise gException u_("Constraint '%s': typemismatch in reference "
+                            "field '%s'.") % (self.name, csFields [ix].name)
 
 
 class GSConstraintField(GSObject):

Modified: trunk/gnue-common/src/schema/scripter/Scripter.py
===================================================================
--- trunk/gnue-common/src/schema/scripter/Scripter.py   2004-04-07 10:01:40 UTC 
(rev 5664)
+++ trunk/gnue-common/src/schema/scripter/Scripter.py   2004-04-07 11:04:32 UTC 
(rev 5665)
@@ -44,7 +44,7 @@
   COMMAND         = "gnue-schema"
   NAME            = "GNUe Schema Scripter"
   USAGE           = "[options] file [old-schema]"
-  SUMMARY = _("GNUe Schema Scripter creates SQL files based on GNUe " + \
+  SUMMARY = _("GNUe Schema Scripter creates SQL files based on GNUe "
               "Schema Definitions.")
 
   _PROC_PATH = "gnue.common.schema.scripter.processors.%s"
@@ -126,13 +126,13 @@
 
     # we need at least one thing to do :)
     if self.OPTIONS ["ignore_schema"] and self.OPTIONS ["ignore_data"]:
-      self.handleStartupError (_("--no-schema and --no-data cannot be used " +
+      self.handleStartupError (_("--no-schema and --no-data cannot be used "
                                  "together. What to export?"))
 
     # check for unsupported options
     if self.OPTIONS ["drop_tables"] or self.OPTIONS ["upgrade_schema"] or \
        self.OPTIONS ["upgrade_data"]:
-      self.handleStartupError (_("--drop-tables, --upgrade-schema and " +
+      self.handleStartupError (_("--drop-tables, --upgrade-schema and "
                                  "--upgrade-data\n are not implemented yet."))
 
 
@@ -157,7 +157,7 @@
     if len (self.__vendors) > 1 and self.__output is not None:
       if not os.path.isdir (self.__output):
         self.handleStartupError ( \
-          _("If multiply vendors are specified --output must be a " + \
+          _("If multiply vendors are specified --output must be a "
             "directory or\n left empty."))
 
 

Modified: trunk/gnue-common/src/schema/scripter/processors/Base.py
===================================================================
--- trunk/gnue-common/src/schema/scripter/processors/Base.py    2004-04-07 
10:01:40 UTC (rev 5664)
+++ trunk/gnue-common/src/schema/scripter/processors/Base.py    2004-04-07 
11:04:32 UTC (rev 5665)
@@ -473,7 +473,7 @@
     """
     Depreciated - use datatype 'datetime' instead
     """
-    print _("WARNING: datatype 'timestamp' is depreciated. " + \
+    print _("WARNING: datatype 'timestamp' is depreciated. "
             "Use datetime instead.")
     return self.datetime (gsField)
 
@@ -486,7 +486,7 @@
     """
     Depreciated - use datatype 'string' without a length attribute instead
     """
-    print _("WARNING: datatype 'text' is depreciated. " + \
+    print _("WARNING: datatype 'text' is depreciated. "
             "Use 'string' without length instead.")
     gsField.type = "string"
     return self.string (gsField)

Modified: trunk/gnue-common/src/schema/scripter/processors/mysql.py
===================================================================
--- trunk/gnue-common/src/schema/scripter/processors/mysql.py   2004-04-07 
10:01:40 UTC (rev 5664)
+++ trunk/gnue-common/src/schema/scripter/processors/mysql.py   2004-04-07 
11:04:32 UTC (rev 5665)
@@ -51,8 +51,8 @@
         gsField.type = "timestamp"
         field = "  %s" % self._qualify (gsField)
 
-        print _("WARNING: changing column type of '%s.%s' to 'timestamp'" % \
-                (tableDef.name, gsField.name))
+        print _("WARNING: changing column type of '%s.%s' to 'timestamp'") % \
+                (tableDef.name, gsField.name)
 
     elif hasattr (gsField, "default") and gsField.default is not None:
       field += " DEFAULT %s" % gsField.default





reply via email to

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