[Help] Interactive Builder for Form Translations within the Form Builder UI

Hii @nethmi, My name is Atul Yadav. I am a final year Computer Science and engineering student at IIT (BHU) Varanasi, India. I am interested to contribute to OpenMRS through this project [Interactive Builder for Form Translations within the Form Builder] .

I have completed the setup and already went through the project description and requirements. Now I am able to understand the current workflow of translation and what we need to implement.

As a part of the project, I have few doubts:

  1. When we translate strings like form name, label of a question, etc in the form, then this need to be saved to server as a new form or can be updated as an existing form. Am i right?

  2. This says “we also need to consider the translations for answers”, Is it mean, (during filling of the form) for example: to translate the strings in the dropdown shown in the below image?

  3. Suppose we translate a form, from english to french, then the json in schema editor should also be updated and the schema editor will contain the updated json in french. Right?

Looking for your help and guidance.

Thank You!

Hey @atulyadav745 ,

  1. When we translate strings like form name, label of a question, etc in the form, then this need to be saved to server as a new form or can be updated as an existing form. Am i right?

Translations are saved separate from the form itself. Please see the project’s wiki for a more detailed explaination.

This says “we also need to consider the translations for answers ”, Is it mean, (during filling of the form) for example: to translate the strings in the dropdown shown in the below image?

Yes.

  1. Suppose we translate a form, from english to french, then the json in schema editor should also be updated and the schema editor will contain the updated json in french. Right?

The form itself doesn’t change when we translate a form because form translations are separate from the form.

I updated the wiki to better answer your questions, and I regularly update it based on different questions that people ask. Please give it a read, and feel free to update your questions if anything needs further explaination.

1 Like

Ok.

Thanks @nethmi so much.

Hi @Nethmi,

I have a few doubts and would appreciate your assistance.

In the project description (wiki), it states:

The current scope of the project isn’t to save these translations to the backend. It’s to allow users to download the JSON document of translations that they can add to their Initializer configuration.

Since translations aren’t stored, I wanted to confirm my understanding. Suppose a user creates French translations for a form with form_id_1 and downloads the JSON document. After logging out and logging in again, if the user returns to the same form (form_id_1) and wants to download the JSON in French again, they would need to recreate the translations from scratch before downloading the JSON.

Is that correct?

Seeking for your help. Thanks!

@atulyadav745 Yes.Once the user is logged from the session he need to create the translations again..!

how can i set up the environment for the project and start contributing

1 Like

Hey @gilbertkoomson00 You can check this :Setting up a frontend module – O3 Docs

Thanks @shettybharath for clarifying.

@nethmi need your clarification also regarding this.

1 Like

Hey @gilbertkoomson00 , speaking about this particular project, You can find the repo here Repo Link. Set up instructions are there in Readme File. After this you can start contributing.

Okay I will try

1 Like

After logging out and logging in again, if the user returns to the same form (form_id_1 ) and wants to download the JSON in French again, they would need to recreate the translations from scratch before downloading the JSON.

Yes, if they are not already available in the backend. When loading the form, as described in the wiki, if there are translations for the locale, the backend should return it with the form, we should load those in by default. As for any new translations or edits they can make, I guess we can try saving them in local storage or adding an option where they can load in a translation JSON file (similar to how you can load a form as a file in to the schema editor). You guys can look into it a bit more and propose a solution for that too @shettybharath.

1 Like

Hi @Nethmi,

Thank you for the clarification!

We’ll explore the options of saving translations in local storage and providing a feature to load translation JSON files.

Thanks again for your insights! :blush: @shettybharath

1 Like

Yeah sure @nethmi I will look into it..!Thanks

Hi @nethmi,

I’m facing an issue while trying to log in to http://localhost:8080/openmrs/spa/login using the following credentials:

  • Username: admin
  • Password: Admin123

These credentials were working earlier, but now I’m receiving an “Invalid Credentials” error. I’ve tried restarting the server, but the issue persists. Could you please assist me in resolving this?

Looking forward to your help.

Thanks!

1 Like

Thank you so much @chintu !!

It worked. :grinning: