From f8801a17e67148b3e5ee302bf8f91f30949d018a Mon Sep 17 00:00:00 2001
From: Takashi NATSUME <natsume.takashi@lab.ntt.co.jp>
Date: Tue, 24 Oct 2017 18:17:19 +0900
Subject: [PATCH] Fix missing marker functions

In some ValueError exceptions, marker functions are missing.
So fix them.

TrivialFix
Change-Id: I7db3a2a484f834c801aae48732aeff48c5b2ae71
---
 nova/api/openstack/placement/microversion.py | 7 ++++---
 nova/utils.py                                | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/nova/api/openstack/placement/microversion.py b/nova/api/openstack/placement/microversion.py
index 637ac1a3d..da46193d7 100644
--- a/nova/api/openstack/placement/microversion.py
+++ b/nova/api/openstack/placement/microversion.py
@@ -87,8 +87,9 @@ def parse_version_string(version_string):
         return Version(*(int(value) for value
                          in version_string.split('.', 1)))
     except (ValueError, TypeError) as exc:
-        raise TypeError('invalid version string: %s; %s' % (
-            version_string, exc))
+        raise TypeError(
+            _('invalid version string: %(version_string)s; %(exc)s') %
+                {'version_string': version_string, 'exc': exc})
 
 
 class MicroversionMiddleware(object):
@@ -178,7 +179,7 @@ def extract_version(headers):
     # version if we really need to.
     if (str(request_version) in VERSIONS and request_version.matches()):
         return request_version
-    raise ValueError('Unacceptable version header: %s' % version_string)
+    raise ValueError(_('Unacceptable version header: %s') % version_string)
 
 
 # From twisted
diff --git a/nova/utils.py b/nova/utils.py
index 242bbca36..7b5d79bfa 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -296,7 +296,7 @@ def last_completed_audit_period(unit=None, before=None):
     else:
         rightnow = timeutils.utcnow()
     if unit not in ('month', 'day', 'year', 'hour'):
-        raise ValueError('Time period must be hour, day, month or year')
+        raise ValueError(_('Time period must be hour, day, month or year'))
     if unit == 'month':
         if offset == 0:
             offset = 1