Comment 10 for bug 1224329

Revision history for this message
Luis A. Garcia (luisg-8) wrote :

Just wanted to clarify that I was not proposing translating the actual "state" value, because that has to be constant in order for consumers to be able to reliably parse it and use the value. I was proposing adding a second field called "stateLabel" that returns the translated value and that gets sent back in addition to the actual "state". The value of "stateLabel" would get transalted to whatever the value of HTTP Accept-Language is. We can re-use logic currently in wsgi to figure out the desired langauge for the user and just translate the corresponding attribute in the response. I think this solution is actually more reusable than a horizon specific solution, because it can be used by other API consumers like the CLI.