Simplify log translations
Log messages are no longer being translated, which can simplify logging and avoid confusion with new contributions. OpenStack no longer supports log translation and depreciated since Pike release. Please refer: http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html Co-Authored-By: Manpreet Kaur kaurmanpreet2620@gmail.com Change-Id: Icd3977cf87feaea3d7883d260843ec4404cd17cb
This commit is contained in:
parent
9af55c83d1
commit
424cc36d52
@ -40,7 +40,7 @@ class TOSCAException(Exception):
|
||||
self.message = self.msg_fmt % kwargs
|
||||
except KeyError:
|
||||
exc_info = sys.exc_info()
|
||||
log.exception(_('Exception in string format operation: %s')
|
||||
log.exception('Exception in string format operation: %s'
|
||||
% exc_info[1])
|
||||
|
||||
if TOSCAException._FATAL_EXCEPTION_FORMAT_ERRORS:
|
||||
|
@ -43,10 +43,10 @@ class ScalarUnit(object):
|
||||
else:
|
||||
for key in self.SCALAR_UNIT_DICT.keys():
|
||||
if key.upper() == input_unit.upper():
|
||||
log.warning(_('The unit "%(unit)s" does not follow '
|
||||
'scalar unit standards; using "%(key)s" '
|
||||
'instead.') % {'unit': input_unit,
|
||||
'key': key})
|
||||
log.warning('The unit "%(unit)s" does not follow '
|
||||
'scalar unit standards; using "%(key)s" '
|
||||
'instead.' % {'unit': input_unit,
|
||||
'key': key})
|
||||
return key
|
||||
msg = (_('The unit "%(unit)s" is not valid. Valid units are '
|
||||
'"%(valid_units)s".') %
|
||||
|
@ -136,7 +136,7 @@ class ImportsLoader(object):
|
||||
|
||||
def _validate_import_keys(self, import_name, import_uri_def):
|
||||
if self.FILE not in import_uri_def.keys():
|
||||
log.warning(_('Missing keyname "file" in import "%(name)s".')
|
||||
log.warning('Missing keyname "file" in import "%(name)s".'
|
||||
% {'name': import_name})
|
||||
ExceptionCollector.appendException(
|
||||
MissingRequiredFieldError(
|
||||
@ -144,8 +144,8 @@ class ImportsLoader(object):
|
||||
required=self.FILE))
|
||||
for key in import_uri_def.keys():
|
||||
if key not in self.IMPORTS_SECTION:
|
||||
log.warning(_('Unknown keyname "%(key)s" error in '
|
||||
'imported definition "%(def)s".')
|
||||
log.warning('Unknown keyname "%(key)s" error in '
|
||||
'imported definition "%(def)s".'
|
||||
% {'key': key, 'def': import_name})
|
||||
ExceptionCollector.appendException(
|
||||
UnknownFieldError(
|
||||
@ -255,7 +255,7 @@ class ImportsLoader(object):
|
||||
return None, None
|
||||
|
||||
if not import_template:
|
||||
log.error(_('Import "%(name)s" is not valid.') %
|
||||
log.error('Import "%(name)s" is not valid.' %
|
||||
{'name': import_uri_def})
|
||||
ExceptionCollector.appendException(
|
||||
ImportError(_('Import "%s" is not valid.') %
|
||||
@ -264,7 +264,7 @@ class ImportsLoader(object):
|
||||
return import_template, YAML_LOADER(import_template, a_file)
|
||||
|
||||
if short_import_notation:
|
||||
log.error(_('Import "%(name)s" is not valid.') % import_uri_def)
|
||||
log.error('Import "%(name)s" is not valid.' % import_uri_def)
|
||||
ExceptionCollector.appendException(
|
||||
ImportError(_('Import "%s" is not valid.') % import_uri_def))
|
||||
return None, None
|
||||
|
@ -76,8 +76,8 @@ class TopologyTemplate(object):
|
||||
if (self.parsed_params and input.name not in self.parsed_params
|
||||
or self.parsed_params is None) and input.required \
|
||||
and input.default is None:
|
||||
log.warning(_('The required parameter %s '
|
||||
'is not provided') % input.name)
|
||||
log.warning('The required parameter %s '
|
||||
'is not provided' % input.name)
|
||||
|
||||
inputs.append(input)
|
||||
return inputs
|
||||
|
@ -179,7 +179,7 @@ class TOSCAVersionProperty(object):
|
||||
return
|
||||
ver = match.groupdict()
|
||||
if self.version in ['0', '0.0', '0.0.0']:
|
||||
log.warning(_('Version assumed as not provided'))
|
||||
log.warning('Version assumed as not provided')
|
||||
self.version = None
|
||||
self.minor_version = ver['minor_version']
|
||||
self.major_version = ver['major_version']
|
||||
@ -198,7 +198,7 @@ class TOSCAVersionProperty(object):
|
||||
|
||||
if self.minor_version is None and self.build_version is None and \
|
||||
value != '0':
|
||||
log.warning(_('Minor version assumed "0".'))
|
||||
log.warning('Minor version assumed "0".')
|
||||
self.version = '.'.join([value, '0'])
|
||||
return value
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user