Translating DIAGNOSTICS tab buttons

I am configuring the DIAGNOSIS tab within the Clinical App. I’ve been trying to figure out how to translate the button labels to spanish. For example: “Accept”, “PRIMARY”, “SECONDARY”, “CONFIRMED”, “PRESUMED”, etc.

There is not translation key on i18n folders,what is the file and location I have to look on?

Thank you

Hi @htorresb,

We can’t translate these words to Spanish as it needs a code change.

The code here shows that keywords “PRIMARY”, “SECONDARY” are hardcoded.

Binduak, I managed to translate those buttons, their labels are on the following file: bahmniapps/clinical/clinical.min.034c90c2.js.

However, once I translated them, I got an error message when I try to save the diagnosis. The error message is: [No enum constant org.openmrs.module.emrapi.diagnosis.Diagnosis.Order.PRIMARIO] (where PRIMARIO is the translation of PRIMARY).

As per the error message, I believe there should be a way to add the enum constant org.openmrs.module.emrapi.diagnosis.Diagnosis.Order.PRIMARIO, but I have no idea how to do it, so I would appreciate if someone in this forum can provide an answer.

Thank you !

Hello @htorresb,

Bahmni & OpenMRS require that the value is stored in the Database as “PRIMARY” and cannot be stored in DB as “PRIMARIO”. This is because all other screens/widgets and reports are written to search the DB for “Primary” concept.

Hence the code change you may need to make is to show “PRIMARIO” to the user (or the current language specific string), but still store PRIMARY in the database (or while making the call).

I hope this makes it clearer for you.