Implementing the use of _L’x’/i18n markers

Placing the _Lx markers back into the code. No other cleaner solution has
has been implemented. Patches will be submitted in a series of sub
directories and in a fashion that is manageable.

Partial-Bug: #1384312

Change-Id: I3974b58bd9b8b9e3c34d5a609228e30c6a08a3c3
This commit is contained in:
Mike Mason
2014-11-25 15:57:24 +00:00
parent 5f5cf928cf
commit f69c40ebb4
17 changed files with 102 additions and 101 deletions

View File

@@ -27,7 +27,7 @@ from oslo.utils import excutils
from cinder.db import base
from cinder import exception
from cinder.i18n import _
from cinder.i18n import _, _LE, _LI
from cinder.openstack.common import log as logging
from cinder import quota
from cinder.volume import api as volume_api
@@ -184,8 +184,8 @@ class API(base.Base):
gigabytes=-vol_ref['size'])
except Exception:
donor_reservations = None
LOG.exception(_("Failed to update quota donating volume"
" transfer id %s") % transfer_id)
LOG.exception(_LE("Failed to update quota donating volume"
" transfer id %s") % transfer_id)
try:
# Transfer ownership of the volume now, must use an elevated
@@ -201,7 +201,7 @@ class API(base.Base):
QUOTAS.commit(context, reservations)
if donor_reservations:
QUOTAS.commit(context, donor_reservations, project_id=donor_id)
LOG.info(_("Volume %s has been transferred.") % volume_id)
LOG.info(_LI("Volume %s has been transferred.") % volume_id)
except Exception:
with excutils.save_and_reraise_exception():
QUOTAS.rollback(context, reservations)