Should REST Resource return Message key or its value?

Hi everyone.

I’m working on the following task: https://issues.openmrs.org/browse/RESTWS-821

It consists of adding a new REST Resource that will return a map of administration links for installed modules. The map looks like this:

"module/webservices/rest/settings.form": "webservices.rest.manage.settings",
"module/webservices/rest/test.htm": "webservices.rest.test",
"module/webservices/rest/apiDocs.htm": "webservices.rest.swaggerDocumentation"

As you can see, values in this map are Openmrs Message keys.

And here’s my question: Should the REST module translate those keys into actual messages based on the Locale, or should it leave them as they are?

For your context, that’s how the map would like after the translation:

"module/webservices/rest/settings.form": "Settings",
"module/webservices/rest/test.htm": "Test ",
"module/webservices/rest/apiDocs.htm": "API Documentation"

cc: @dkayiwa @gcliff