delete unused log translations
recent discussions on the ML have led to the decision to eliminate all translations for messages that are destined for log files but retain them for messages that are going to be returned as exceptions and potentially shown to end users via an API. see [1], [2]. This change does that as follows. 1. If a string is being used to generate an exception, it will still be translated. Still congress used _ for these translations 2. If a string is used for a logging message, remove the use of _ [1] http://lists.openstack.org/pipermail/openstack-operators/2017-March/012887.html [2] http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html Change-Id: Ib17cf0f326cc833fc71b4d2966cc16f350698860
This commit is contained in:
parent
c759521b7e
commit
24c9549754
|
@ -38,7 +38,7 @@ class CongressKeystoneContext(wsgi.Middleware):
|
|||
# Determine the user ID
|
||||
user_id = req.headers.get('X_USER_ID')
|
||||
if not user_id:
|
||||
LOG.debug(_("X_USER_ID is not found in request"))
|
||||
LOG.debug("X_USER_ID is not found in request")
|
||||
return webob.exc.HTTPUnauthorized()
|
||||
|
||||
# Determine the tenant
|
||||
|
|
|
@ -154,7 +154,7 @@ def find_paste_config():
|
|||
raise cfg.ConfigFilesNotFoundError(
|
||||
config_files=[cfg.CONF.api_paste_config])
|
||||
config_path = os.path.abspath(config_path)
|
||||
LOG.info(_("Config paste file: %s"), config_path)
|
||||
LOG.info(("Config paste file: %s"), config_path)
|
||||
return config_path
|
||||
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ class APIServer(service.ServiceBase):
|
|||
if self.socket is not None:
|
||||
raise Exception(_('Server can only listen once.'))
|
||||
|
||||
LOG.info(_('Starting %(arg0)s on %(host)s:%(port)s'),
|
||||
LOG.info(('Starting %(arg0)s on %(host)s:%(port)s'),
|
||||
{'arg0': sys.argv[0],
|
||||
'host': self.host,
|
||||
'port': self.port})
|
||||
|
|
|
@ -72,8 +72,8 @@ class RequestContext(common_context.RequestContext):
|
|||
# Log only once the context has been configured to prevent
|
||||
# format errors.
|
||||
if kwargs:
|
||||
LOG.debug(_('Arguments dropped when creating '
|
||||
'context: %s'), kwargs)
|
||||
LOG.debug(('Arguments dropped when creating '
|
||||
'context: %s'), kwargs)
|
||||
|
||||
@property
|
||||
def project_id(self):
|
||||
|
|
|
@ -53,7 +53,7 @@ def tempdir(**kwargs):
|
|||
try:
|
||||
shutil.rmtree(tmpdir)
|
||||
except OSError as e:
|
||||
LOG.error(_('Could not remove tmpdir: %s'), e)
|
||||
LOG.error(('Could not remove tmpdir: %s'), e)
|
||||
|
||||
|
||||
def value_to_congress(value):
|
||||
|
|
Loading…
Reference in New Issue