Merge "Fix broken i18n support"

This commit is contained in:
Jenkins 2014-01-13 02:47:40 +00:00 committed by Gerrit Code Review
commit e3db08fdff
2 changed files with 5 additions and 5 deletions

View File

@ -73,7 +73,7 @@ class NotificationService(service.DispatchedService, rpc_service.Service):
),
)
LOG.debug('loading event definitions')
LOG.debug(_('Loading event definitions'))
self.event_converter = event_converter.setup_events(
extension.ExtensionManager(
namespace='ceilometer.event.trait_plugin'))
@ -148,7 +148,7 @@ class NotificationService(service.DispatchedService, rpc_service.Service):
event = self.event_converter.to_event(body)
if event is not None:
LOG.debug('Saving event "%s"', event.event_type)
LOG.debug(_('Saving event "%s"'), event.event_type)
problem_events = []
for dispatcher in self.dispatcher_manager:
problem_events.extend(dispatcher.obj.record_events(event))

View File

@ -198,13 +198,13 @@ class RPCPublisher(publisher.PublisherBase):
try:
rpc.cast(context, topic, msg)
except (SystemExit, rpc.common.RPCException):
samples = sum([len(m['args']['data']) for _, _, m in queue])
samples = sum([len(m['args']['data']) for n, n, m in queue])
if policy == 'queue':
LOG.warn("Failed to publish %s samples, queue them",
LOG.warn(_("Failed to publish %d samples, queue them"),
samples)
return queue
elif policy == 'drop':
LOG.warn("Failed to publish %d samples, dropping them",
LOG.warn(_("Failed to publish %d samples, dropping them"),
samples)
return []
# default, occur only if rabbit_max_retries > 0