Fix message i18n error

Partial-Bug: #1217100

Using tools/check_i18n.py to scan source directory, and fix most of
the errors.

- Message internationalization
- First letter must be capital
- Using comma instead of percent in LOG.xxx

Note: all extension's description are not touched in this patch,
can be fixed after discussing.
Note: all nicira/check_nvp_config.py print messages are not fixed.

Change-Id: I79ef06fd42f6780beb5019c592662536c2a51864
This commit is contained in:
ZhiQiang Fan 2013-08-27 08:02:04 +08:00
parent 7622b9894c
commit 82d3452124
5 changed files with 5 additions and 5 deletions

View File

@ -99,7 +99,7 @@ class ChanceScheduler(object):
candidates = plugin.get_lbaas_agents(context, active=True)
if not candidates:
LOG.warn(_('No active lbaas agents for pool %s') % pool['id'])
LOG.warn(_('No active lbaas agents for pool %s'), pool['id'])
return
chosen_agent = random.choice(candidates)

View File

@ -178,7 +178,7 @@ class LbaasAgentManager(periodic_task.PeriodicTasks):
self.agent_state)
self.agent_state.pop('start_flag', None)
except Exception:
LOG.exception("Failed reporting state!")
LOG.exception(_("Failed reporting state!"))
def initialize_service_hook(self, started_by):
self.sync_state()

View File

@ -117,7 +117,7 @@ class HaproxyNSDriver(object):
pool_stats['members'] = self._get_servers_stats(parsed_stats)
return pool_stats
else:
LOG.warn(_('Stats socket not found for pool %s') % pool_id)
LOG.warn(_('Stats socket not found for pool %s'), pool_id)
return {}
def _get_backend_stats(self, parsed_stats):

View File

@ -82,7 +82,7 @@ class LoadBalancerCallbacks(object):
if not agents:
return []
elif len(agents) > 1:
LOG.warning(_('Multiple lbaas agents found on host %s') % host)
LOG.warning(_('Multiple lbaas agents found on host %s'), host)
pools = self.plugin.list_pools_on_lbaas_agent(context,
agents[0].id)

View File

@ -94,4 +94,4 @@ msg_format_checkers = [
file_black_list = ["./neutron/tests/unit",
"./neutron/openstack",
"./quantum/plugins/bigswitch/tests"]
"./neutron/plugins/bigswitch/tests"]