Merge "Add _LW for missing translations"
This commit is contained in:
commit
13f6830985
@ -299,7 +299,7 @@ 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: '
|
||||
logger.warn(_LW('Failed to load extension %(classpath)s: '
|
||||
'%(exc)s'),
|
||||
{'classpath': classpath, 'exc': exc})
|
||||
|
||||
@ -322,7 +322,7 @@ 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:'
|
||||
logger.warn(_LW('Failed to load extension %(ext_name)s:'
|
||||
'%(exc)s'),
|
||||
{'ext_name': ext_name, 'exc': exc})
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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':
|
||||
|
@ -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,7 +172,7 @@ class ResourceMonitorHandler(loadables.BaseLoader):
|
||||
metric_names = metric_names | metric_names_tmp
|
||||
good_monitors.append(monitor)
|
||||
else:
|
||||
msg = (_("Excluding monitor %(monitor_name)s due to "
|
||||
msg = (_LW("Excluding monitor %(monitor_name)s due to "
|
||||
"metric name overlap; overlapping "
|
||||
"metrics: %(overlap)s") %
|
||||
{'monitor_name': monitor_name,
|
||||
@ -180,7 +180,7 @@ class ResourceMonitorHandler(loadables.BaseLoader):
|
||||
LOG.warn(msg)
|
||||
bad_monitors.append(monitor_name)
|
||||
except Exception as ex:
|
||||
msg = (_("Monitor %(monitor_name)s cannot be used: %(ex)s") %
|
||||
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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user