Merge "Add _LW for missing translations"

This commit is contained in:
Jenkins 2015-03-03 16:49:32 +00:00 committed by Gerrit Code Review
commit 13f6830985
6 changed files with 17 additions and 17 deletions

View File

@ -299,8 +299,8 @@ def load_standard_extensions(ext_mgr, logger, path, package, ext_list=None):
try:
ext_mgr.load_extension(classpath)
except Exception as exc:
logger.warn(_('Failed to load extension %(classpath)s: '
'%(exc)s'),
logger.warn(_LW('Failed to load extension %(classpath)s: '
'%(exc)s'),
{'classpath': classpath, 'exc': exc})
# Now, let's consider any subdirectories we may have...
@ -322,8 +322,8 @@ def load_standard_extensions(ext_mgr, logger, path, package, ext_list=None):
try:
ext(ext_mgr)
except Exception as exc:
logger.warn(_('Failed to load extension %(ext_name)s:'
'%(exc)s'),
logger.warn(_LW('Failed to load extension %(ext_name)s:'
'%(exc)s'),
{'ext_name': ext_name, 'exc': exc})
# Update the list of directories we'll explore...

View File

@ -1792,7 +1792,7 @@ class API(base.Base):
if bdm.delete_on_termination:
self.volume_api.delete(context, bdm.volume_id)
except Exception as exc:
err_str = _("Ignoring volume cleanup failure due to %s")
err_str = _LW("Ignoring volume cleanup failure due to %s")
LOG.warn(err_str % exc, instance=instance)
bdm.destroy()
cb(context, instance, bdms, local=True)

View File

@ -3129,7 +3129,7 @@ class ComputeManager(manager.Manager):
except exception.ImageNotFound:
instance.task_state = None
instance.save()
msg = _("Image not found during snapshot")
msg = _LW("Image not found during snapshot")
LOG.warn(msg, instance=instance)
def _post_interrupted_snapshot_cleanup(self, context, instance):
@ -6124,7 +6124,7 @@ class ComputeManager(manager.Manager):
# and power it off
self.driver.power_off(instance)
except Exception:
msg = _("Failed to power off instance")
msg = _LW("Failed to power off instance")
LOG.warn(msg, instance=instance, exc_info=True)
elif action == 'reap':

View File

@ -28,7 +28,7 @@ from oslo_log import log as logging
from oslo_utils import timeutils
import six
from nova.i18n import _, _LW
from nova.i18n import _LW
from nova import loadables
compute_monitors_opts = [
@ -172,16 +172,16 @@ class ResourceMonitorHandler(loadables.BaseLoader):
metric_names = metric_names | metric_names_tmp
good_monitors.append(monitor)
else:
msg = (_("Excluding monitor %(monitor_name)s due to "
"metric name overlap; overlapping "
"metrics: %(overlap)s") %
{'monitor_name': monitor_name,
'overlap': ', '.join(overlap)})
msg = (_LW("Excluding monitor %(monitor_name)s due to "
"metric name overlap; overlapping "
"metrics: %(overlap)s") %
{'monitor_name': monitor_name,
'overlap': ', '.join(overlap)})
LOG.warn(msg)
bad_monitors.append(monitor_name)
except Exception as ex:
msg = (_("Monitor %(monitor_name)s cannot be used: %(ex)s") %
{'monitor_name': monitor_name, 'ex': ex})
msg = (_LW("Monitor %(monitor_name)s cannot be used: %(ex)s") %
{'monitor_name': monitor_name, 'ex': ex})
LOG.warn(msg)
bad_monitors.append(monitor_name)

View File

@ -667,7 +667,7 @@ def floating_ip_get(context, id):
if not result:
raise exception.FloatingIpNotFound(id=id)
except db_exc.DBError:
msg = _("Invalid floating ip id %s in request") % id
msg = _LW("Invalid floating ip id %s in request") % id
LOG.warn(msg)
raise exception.InvalidID(id=id)
return result

View File

@ -983,7 +983,7 @@ def try_auto_configure_disk(session, vdi_ref, new_gb):
try:
_auto_configure_disk(session, vdi_ref, new_gb)
except exception.CannotResizeDisk as e:
msg = _('Attempted auto_configure_disk failed because: %s')
msg = _LW('Attempted auto_configure_disk failed because: %s')
LOG.warn(msg % e)