nametemplate API does not apply locale translations to the displayText values

Description

Follow on from .

I have found that the nameMapping values - and consequently the displayText values of the ‘lines' property do not have locale translations applied. They are always returned with the names of the message properties, e.g. ‘personName.givenName’, 'personName.middleName’, etc.

For example, GET /openmrs/ws/rest/v1/nametemplate/short returns:

 

This impacts the suitability of this API for use in the O3 frontend; see code review comments for

Activity

xprlgjf 
April 9, 2025 at 1:22 AM

Pull request submitted

xprlgjf 
April 9, 2025 at 12:27 AM

As an aside, the addresstemplate API does apply locale translations, because it is implemented differently and follows a different code path…

Best to make the addresstemplate and nametemplate APIs consistent.

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created April 9, 2025 at 12:03 AM
Updated April 16, 2025 at 9:55 PM