Merge "Use localisation where user visible strings are used"

This commit is contained in:
Jenkins
2013-09-19 15:05:52 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 7 deletions

View File

@@ -45,8 +45,9 @@ def main():
app.VersionSelectorApplication())
LOG = log.getLogger(__name__)
LOG.info("Serving on http://%s:%s" % (host, port))
LOG.info("Configuration:")
LOG.info(_("Serving on http://%(host)s:%(port)s") %
{'host': host, 'port': port})
LOG.info(_("Configuration:"))
CONF.log_opt_values(LOG, logging.INFO)
try:

View File

@@ -177,14 +177,14 @@ def work_on_disk(dev, root_mb, swap_mb, image_path):
swap_part = "%s-part2" % dev
if not is_block_device(dev):
LOG.warn("parent device '%s' not found", dev)
LOG.warn(_("parent device '%s' not found") % dev)
return
make_partitions(dev, root_mb, swap_mb)
if not is_block_device(root_part):
LOG.warn("root device '%s' not found", root_part)
LOG.warn(_("root device '%s' not found") % root_part)
return
if not is_block_device(swap_part):
LOG.warn("swap device '%s' not found", swap_part)
LOG.warn(_("swap device '%s' not found") % swap_part)
return
dd(image_path, root_part)
mkswap(swap_part)
@@ -276,7 +276,7 @@ class BareMetalDeploy(object):
return 'Not Implemented'
def post(self, environ, start_response):
LOG.info("post: environ=%s", environ)
LOG.info(_("post: environ=%s") % environ)
inpt = environ['wsgi.input']
length = int(environ.get('CONTENT_LENGTH', 0))
@@ -317,7 +317,8 @@ class BareMetalDeploy(object):
if not self.worker.isAlive():
self.worker = Worker()
self.worker.start()
LOG.info("request is queued: node %s, params %s", node_id, params)
LOG.info(_("request is queued: node %(node_id)s, params %(params)s") %
{'node_id': node_id, 'params': params})
QUEUE.put((node_id, params))
# Requests go to Worker.run()
start_response('200 OK', [('Content-type', 'text/plain')])