Interactive Builder for Form Translations within the Form Builder (Interactive Translation Builder?)
Problem Statement
Right now, in order to add translations to a form, the way to do this to add it to a configuration folder that can be picked up by Iniz. This is annoying because
You’d need a developer’s help to know what to do and where to do it
The JSON file format is quite different from that of a form, so its not very intuitive for a non-techy person to do
There’s no a dynamic and user-friendly way to do it
Project Size
Large
Why we need it?
In the day and age of content packages, this would be a method for people to re-use forms but customize it to their language in a user-friendly way.
Project Idea
Similar to the interactive builder, a UI that would enable users to add the translations for a form for any language.
Here’s a (very high level) flow of how that might look like:
A separate UI editor(from the interactive builder) to manage translations
Preview the form in selected language and add language options
Adding the translation strings
Implementation
A UI editor needs to be implemented to manage the translation strings for each question
This can get tricky because we also need to consider the translations for answers
The JSON editor needs to contain the translations within the JSON to support dynamically viewing the translations
We need to figure out how to preview a form in a certain language
Once a user clicks
Save Translations
the translation files should be saved in the backend as a form resource.Users should be able to download the translation resource file (check the reference materials to see what the file format should be) for a specific language
Reference materials
An example form translation file in English - https://github.com/openmrs/openmrs-distro-referenceapplication/blob/main/distro/configuration/ampathformstranslations/Ampath%20POC%20adult%20return%20visit%20form_translations_en-core_demo.json
An example form translation in French - https://github.com/openmrs/openmrs-distro-referenceapplication/blob/main/distro/configuration/ampathformstranslations/Ampath%20POC%20adult%20return%20visit%20form_translations_fr-core_demo.json
The original form itself - https://github.com/openmrs/openmrs-distro-referenceapplication/blob/main/distro/configuration/ampathforms/ampath_poc_adult_return_visit_form_v1.6_core-demo.json