Fix translated response
When request has ``Accept-Language`` header, keystone should response the translated message. Without oslo_i18n lazy translation feature, the message will be translated before the server knows the language. Actually this has been fixed previously, like 2167e3612cbb79003cc0b8a98607f346238d7be4 But seems the logic was broken after i18n refactor. Change-Id: Icb3d9dcd25a5dde0676fc4bd4eaad7b265a0c99d
This commit is contained in:
parent
7aa97f1712
commit
6abd44500f
@ -21,6 +21,8 @@ See https://docs.openstack.org/oslo.i18n/latest/user/usage.html .
|
||||
import oslo_i18n
|
||||
|
||||
|
||||
oslo_i18n.enable_lazy()
|
||||
|
||||
_translators = oslo_i18n.TranslatorFactory(domain='keystone')
|
||||
|
||||
# The primary translation function using the well-known name "_"
|
||||
|
Loading…
x
Reference in New Issue
Block a user