[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8324 - in trunk/gnue-appserver/src: . gcd gld
From: |
reinhard |
Subject: |
[gnue] r8324 - in trunk/gnue-appserver/src: . gcd gld |
Date: |
Mon, 3 Apr 2006 18:24:18 -0500 (CDT) |
Author: reinhard
Date: 2006-03-31 12:20:08 -0600 (Fri, 31 Mar 2006)
New Revision: 8324
Modified:
trunk/gnue-appserver/src/gcd/readgcd.py
trunk/gnue-appserver/src/geasGsdGen.py
trunk/gnue-appserver/src/geasRpcServer.py
trunk/gnue-appserver/src/gld/readgld.py
Log:
Changed help texts to be unicode translations.
Modified: trunk/gnue-appserver/src/gcd/readgcd.py
===================================================================
--- trunk/gnue-appserver/src/gcd/readgcd.py 2006-03-31 18:19:16 UTC (rev
8323)
+++ trunk/gnue-appserver/src/gcd/readgcd.py 2006-03-31 18:20:08 UTC (rev
8324)
@@ -108,7 +108,7 @@
VERSION = VERSION
COMMAND = "readgcd"
USAGE = "%s %s" % (GClientApp.USAGE, " [OPTIONS] file")
- SUMMARY = _(
+ SUMMARY = u_(
"""Create or update a database schema from a GNUe Class Definition (gcd) file
and maintain data for all gnue_* classes""")
@@ -118,22 +118,22 @@
def __init__ (self, connections = None):
- self.addCommandOption ('connection', 'c', argument='connectionname',
- help = _("Use the connection <connectionname> for creating the
schema"))
+ self.addCommandOption ('connection', 'c', argument=u_('connectionname'),
+ help = u_("Use the connection <connectionname> for creating the
schema"))
- self.addCommandOption ('output','o', argument='filename',
- help = _("Also send the code for creating the schema to this file."))
+ self.addCommandOption ('output','o', argument=u_('filename'),
+ help = u_("Also send the code for creating the schema to this file."))
self.addCommandOption ('file-only', 'f', default = False,
- help = _("If this flag is set, only code is sent to the output file "
+ help = u_("If this flag is set, only code is sent to the output file "
"and the schema is not created automatically."))
- self.addCommandOption ('username', 'u', argument="user",
- help = _("Set the username for the database. If the database is to be "
+ self.addCommandOption ('username', 'u', argument=u_("user"),
+ help = u_("Set the username for the database. If the database is to be
"
"created, this username will be it's owner."))
- self.addCommandOption ('password', 'p', argument="password",
- help = _("Set the password for the database."))
+ self.addCommandOption ('password', 'p', argument=u_("password"),
+ help = u_("Set the password for the database."))
ConfigOptions = geasConfiguration.ConfigOptions
@@ -291,7 +291,7 @@
self.__getPropertyLookup ()
self.__getProcedureLookup ()
- print o (u_("Loading gcd files ..."))
+ print o(u_("Loading gcd files ..."))
while self._files:
self.__currentFile, stream = self._files.popitem ()
@@ -335,7 +335,7 @@
given output file (if requested by options).
"""
- print _("Updating schema ...")
+ print o(u_("Updating schema ..."))
code = self.__backend.writeSchema (self.schema, self._fileonly)
if self._dump is not None:
@@ -356,7 +356,7 @@
This function updates all parts of the class repository.
"""
- print _("Updating class repository ...")
+ print o(u_("Updating class repository ..."))
commit = self.__updateModules ()
commit |= self.__updateClasses ()
@@ -812,9 +812,9 @@
['gnue_name'])
self.__getModuleLookup ()
- print o (u_(" Modules : %(ins)3d inserted, %(upd)3d updated, "
- "%(kept)3d unchanged.") \
- % {'ins': stat [0], 'upd': stat [1], 'kept': stat [2]})
+ print o(u_(" Modules : %(ins)3d inserted, %(upd)3d updated, "
+ "%(kept)3d unchanged.") \
+ % {'ins': stat [0], 'upd': stat [1], 'kept': stat [2]})
return (stat [0] + stat [1]) > 0
@@ -873,9 +873,9 @@
fst = self.__processResultSet (self.__classRS, self.classes, cond)
filterChanged = fst [1] > 0
- print o (u_(" Classes : %(ins)3d inserted, %(upd)3d updated, "
- "%(kept)3d unchanged.") \
- % {'ins': stat [0], 'upd': stat [1], 'kept': stat [2]})
+ print o(u_(" Classes : %(ins)3d inserted, %(upd)3d updated, "
+ "%(kept)3d unchanged.") \
+ % {'ins': stat [0], 'upd': stat [1], 'kept': stat [2]})
return needCommit or filterChanged
@@ -904,9 +904,9 @@
stat = self.__processResultSet (self.__propRS, self.properties, cond)
self.__getPropertyLookup ()
- print o (u_(" Properties: %(ins)3d inserted, %(upd)3d updated, "
- "%(kept)3d unchanged.") \
- % {'ins': stat [0], 'upd': stat [1], 'kept': stat [2]})
+ print o(u_(" Properties: %(ins)3d inserted, %(upd)3d updated, "
+ "%(kept)3d unchanged.") \
+ % {'ins': stat [0], 'upd': stat [1], 'kept': stat [2]})
return (stat [0] + stat [1]) > 0
@@ -936,9 +936,9 @@
stat = self.__processResultSet (self.__procRS, self.procedures, cond)
self.__getProcedureLookup ()
- print o (u_(" Procedures: %(ins)3d inserted, %(upd)3d updated, "
- "%(kept)3d unchanged.") \
- % {'ins': stat [0], 'upd': stat [1], 'kept': stat [2]})
+ print o(u_(" Procedures: %(ins)3d inserted, %(upd)3d updated, "
+ "%(kept)3d unchanged.") \
+ % {'ins': stat [0], 'upd': stat [1], 'kept': stat [2]})
return (stat [0] + stat [1]) > 0
@@ -970,8 +970,8 @@
cond = ['gnue_procedure', 'gnue_name']
stat = self.__processResultSet (resultSet, self.parameters, cond)
- print o (u_(" Parameters: %(ins)3d inserted, %(upd)3d updated, "
- "%(kept)3d unchanged.") \
+ print o(u_(" Parameters: %(ins)3d inserted, %(upd)3d updated, "
+ "%(kept)3d unchanged.") \
% {'ins': stat [0], 'upd': stat [1], 'kept': stat [2]})
return (stat [0] + stat [1]) > 0
Modified: trunk/gnue-appserver/src/geasGsdGen.py
===================================================================
--- trunk/gnue-appserver/src/geasGsdGen.py 2006-03-31 18:19:16 UTC (rev
8323)
+++ trunk/gnue-appserver/src/geasGsdGen.py 2006-03-31 18:20:08 UTC (rev
8324)
@@ -65,8 +65,8 @@
VERSION = VERSION
COMMAND = "gnue-gsdgen"
USAGE = "%s %s" % (GClientApp.USAGE, " [classname] [classname] [...]")
- SUMMARY = _("A tool to dump data from a database into a GNUe Schema "
- "Definition (gsd) file.")
+ SUMMARY = u_("A tool to dump data from a database into a GNUe Schema "
+ "Definition (gsd) file.")
# ---------------------------------------------------------------------------
# Constructor
@@ -74,22 +74,22 @@
def __init__ (self, connections = None):
- self.addCommandOption ('database', 'd', argument = 'database',
- help = _("Depreciated: Set the Database to use for data to <name>. "
- "gnue-appserver will search for it in connections.conf. "
+ self.addCommandOption ('database', 'd', argument = u_('database'),
+ help = u_("Depreciated: Set the Database to use for data to <name>. "
+ "gnue-appserver will search for it in connections.conf. "
"Use '--connection' instead."))
- self.addCommandOption ('connection', 'c', argument = 'connectionname',
- help = _("Use the connection <connectionname> for data retrieval."))
+ self.addCommandOption ('connection', 'c', argument = u_('connectionname'),
+ help = u_("Use the connection <connectionname> for data retrieval."))
- self.addCommandOption ('output', 'o', argument = 'file',
- help = _("Name of the resulting gsd-file"))
+ self.addCommandOption ('output', 'o', argument = u_('file'),
+ help = u_("Name of the resulting gsd-file"))
self.addCommandOption ('system', 's', default = False,
- help = _("If flag is set include system classes ('gnue_*')"))
+ help = u_("If flag is set include system classes ('gnue_*')"))
self.addCommandOption ('include-details', 'i', default = False,
- help = _("If set all detail-classes of the requestd classes will be "
+ help = u_("If set all detail-classes of the requestd classes will be "
"exported too"))
ConfigOptions = geasConfiguration.ConfigOptions
Modified: trunk/gnue-appserver/src/geasRpcServer.py
===================================================================
--- trunk/gnue-appserver/src/geasRpcServer.py 2006-03-31 18:19:16 UTC (rev
8323)
+++ trunk/gnue-appserver/src/geasRpcServer.py 2006-03-31 18:20:08 UTC (rev
8324)
@@ -104,7 +104,7 @@
VERSION = VERSION
USAGE = GServerApp.USAGE
COMMAND = 'gnue-appserver'
- SUMMARY = _(
+ SUMMARY = u_(
"""The GNUe Application Server is the core of the n-tier variant of the
GNU Enterprise system. To the front end (be it GNUe Forms, GNUe Reports or
any other tool), it provides user-defineable business objects with arbitary
@@ -114,46 +114,46 @@
COMMAND_OPTIONS = [
- ['rpctype', None, 'rpc-type', 1, None, 'type', _(
+ ['rpctype', None, 'rpc-type', 1, None, 'type', u_(
"""Set the GNURPC connection type. The currently supported values for <type>
are 'xmlrpc', 'xmlrpc.py_xmlrpc', 'xmlrpc.pw_xmlrpc' and 'pyro'. For more
information on GNURPC connection types have a look at
common/doc/RPC-abstraction.""")],
- ['rpcport', None, 'rpc-port', 1, None, 'port', _(
+ ['rpcport', None, 'rpc-port', 1, None, 'port', u_(
"""Set the GNURPC port. For more information on GNURPC have a look at
common/doc/RPC-abstraction.""")],
- ['database', None, 'database', 1, None, 'name', _(
+ ['database', None, 'database', 1, None, 'name', u_(
"""Depreciated: Set the Database to use for loading and storing data to <name>.
gnue-appserver will search for it in connections.conf.""")],
- ['connection', 'c', 'connection', 1, None, 'name', _(
+ ['connection', 'c', 'connection', 1, None, 'name', u_(
"""Set the Database to use for loading and storing data to <name>.
gnue-appserver will search for it in connections.conf.""")],
- ['username', 'u', 'username', 1, None, 'user', _(
+ ['username', 'u', 'username', 1, None, 'user', u_(
"""Set the username for the used database.""")],
- ['password', 'p', 'password', 1, None, 'password', _(
+ ['password', 'p', 'password', 1, None, 'password', u_(
"""Set the password for the used database.""")],
- ['selftest', None, 'selftest', 0, None, None, _(
+ ['selftest', None, 'selftest', 0, None, None, u_(
"""Test appservers connection to the backend database, check correctness of
global settings, etc.""")],
- ['web-frontend', None, 'web-frontend', 0, None, None, _(
+ ['web-frontend', None, 'web-frontend', 0, None, None, u_(
"""Enable appservers web frontend. Just works for the rpc-type XMLRPC. The
webfrontend is at the same port as XMLRPC.""")],
- ['loglevel', None, 'loglevel', 1, None, 'loglevel', _(
+ ['loglevel', None, 'loglevel', 1, None, 'loglevel', u_(
"""If set to 1, provides information on data dispatched to the RPC
interface.""")],
['modulepath', 'm', 'modulepath', True, None, 'pathlist',
- _("Semicolon-separated list of paths to load modules from")],
+ u_("Semicolon-separated list of paths to load modules from")],
- ['startup', None, 'startup', 1, None, 'manual|auto|disabled', _(
+ ['startup', None, 'startup', 1, None, 'manual|auto|disabled', u_(
"""Special option for windows service install/update command.""")]
]
@@ -215,8 +215,8 @@
if rpctype in ('xmlrpc','xmlrpc.pw_xmlrpc','xmlrpc.py_xmlrpc'):
port = gConfig ("rpcport")
- print _("Exporting our services via %(rpctype)s (port %(port)s) ...") % \
- {"rpctype": rpctype, "port": port}
+ print o(u_("Exporting our services via %(rpctype)s (port %(port)s) ...")
% \
+ {"rpctype": rpctype, "port": port})
params = {'port': int (port),
'allowed_hosts': gConfig ('allowed_hosts'),
'bindto': gConfig ('bindto'),
@@ -235,8 +235,8 @@
elif rpctype == "pyro":
port = gConfig ("rpcport")
- print _("Exporting our services via %(rpctype)s (port %(port)s) ...") % \
- {"rpctype": rpctype, "port": port}
+ print o(u_("Exporting our services via %(rpctype)s (port %(port)s) ...")
% \
+ {"rpctype": rpctype, "port": port})
params = {'port': int (port),
'bindto': gConfig ('bindto'),
'allowed_hosts': gConfig ('allowed_hosts')}
@@ -244,12 +244,12 @@
elif rpctype == "sockets":
# Sockets not working yet
- print _("Exporting our services via sockets (EXPERIMENTAL!) ...")
+ print o(u_("Exporting our services via sockets (EXPERIMENTAL!) ..."))
self.setTransports ({'sockets':{}})
else:
# wrong transport protocol set. exiting
- print _("The protocol you've set is currently not supported.")
+ print o(u_("The protocol you've set is currently not supported."))
sys.exit (-1)
# ---------------------------------------------------------------------------
@@ -297,7 +297,7 @@
servers = server.bind (self._transports, service)
# be verbose
- print _("\n... GNUe Application Server up and running ...\n")
+ print o(u_("\n... GNUe Application Server up and running ...\n"))
# Daemonize (if appropriate)
GServerApp.run (self)
@@ -320,7 +320,7 @@
except KeyboardInterrupt:
adapter.shutdown ()
- print _("Appserver is shutting down....ok")
+ print o(u_("Appserver is shutting down....ok"))
# ---------------------------------------------------------------------------
@@ -360,28 +360,28 @@
def selftest (self):
## Starting Appserver selftest
- print _(
+ print o(u_(
"""
GNUe Application Server is running a simple self test
=====================================================
PREREQUISITE: You have to populate the backend db with
'the "address_person" example.
-""")
+"""))
- print _("Step 1: Starting Session Manager ...")
+ print o(u_("Step 1: Starting Session Manager ..."))
sm = self.requestSessionManager ()
- print _("Step 2: Opening session (user 'hacker', password 'secret') ...")
+ print o(u_("Step 2: Opening session (user 'hacker', password 'secret')
..."))
session=sm.open ({'user' : "hacker",
'password' : "secret",
'language' : i18n.language})
- print _("Step 3: Creating object list ...")
+ print o(u_("Step 3: Creating object list ..."))
list = session.request ("address_person", [], ["address_zip"],
["address_name", "address_street", "address_city"])
- print _("Step 4: Retrieving first instance ...")
+ print o(u_("Step 4: Retrieving first instance ..."))
rset = list.fetch (0,1)
if len (rset):
@@ -397,7 +397,7 @@
res = sm.getFilters (i18n.language)
print "Filters:", res
- print _('Selftest passed!')
+ print o(u_('Selftest passed!'))
# =============================================================================
Modified: trunk/gnue-appserver/src/gld/readgld.py
===================================================================
--- trunk/gnue-appserver/src/gld/readgld.py 2006-03-31 18:19:16 UTC (rev
8323)
+++ trunk/gnue-appserver/src/gld/readgld.py 2006-03-31 18:20:08 UTC (rev
8324)
@@ -90,7 +90,7 @@
VERSION = VERSION
COMMAND = "gnue-readgld"
USAGE = "%s %s" % (GClientApp.GClientApp.USAGE, "file file ...")
- SUMMARY = _("Read GNUe Language Definitions and update the class repository")
+ SUMMARY = u_("Read GNUe Language Definitions and update the class
repository")
# ---------------------------------------------------------------------------
# Constructor
@@ -98,15 +98,15 @@
def __init__ (self, connections = None):
- self.addCommandOption ('connection', 'c', argument='connectionname',
- help = _("Use the connection <connectionname> for creating the
schema"))
+ self.addCommandOption ('connection', 'c', argument=u_('connectionname'),
+ help = u_("Use the connection <connectionname> for creating the
schema"))
- self.addCommandOption ('username', 'u', argument="user",
- help = _("Set the username for the database. If the database is to be "
+ self.addCommandOption ('username', 'u', argument=u_("user"),
+ help = u_("Set the username for the database. If the database is to be
"
"created, this username will be it's owner."))
- self.addCommandOption ('password', 'p', argument="password",
- help = _("Set the password for the database."))
+ self.addCommandOption ('password', 'p', argument=u_("password"),
+ help = u_("Set the password for the database."))
ConfigOptions = geasConfiguration.ConfigOptions
@@ -241,7 +241,7 @@
self.labels.clear ()
self.messages.clear ()
- print _("Loading GNUe language definitions")
+ print o(u_("Loading GNUe language definitions"))
while self._files:
self.__currentFile, stream = self._files.popitem ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8324 - in trunk/gnue-appserver/src: . gcd gld,
reinhard <=