Open kahummer opened 3 years ago
After discussing with @kelvin-muchiri it seems the site-config section fell through the cracks on the plan above. This config is responsible for driving the entire site and overriding the chained objects based on indexes inside the Layers might not work as I envisioned. This may require more time and research than I anticipated cc @ukanga @engwiri
After going through the Menu and Layers component we definitely can have translations driven from the site config. I think we can have an object that holds the English literal for all categories and subcategories on the menu with the language-specific translation as the value. We can check the language persisted to store and overwrite the text rendered on the Menu and Layers respectively
Technical plan On the site-config, we can have
"translations": {
"khmer": {
"Domain 2: Capacity of the child protection system": " វិស័យទី៣៖ ការបង្ការ និងការពារ"
},
"french": {
}
....
}
Check if current language prop and translations exist on the Menu and Layers component, then use them instead of the provided categories. Components that require translations
Utils
https://www.awesomescreenshot.com/video/3475088?key=306f4e075bf463bd4fe7842809afb5e7 @bkimondiu Here is the current progress on the translation issue. Hoping to have something deployed to stage tommorrow
I've added the translationHook on various translation components. I will need assistance from the data side to add translation configs that will drive the translation work. The translations config can be added to this or for testing https://github.com/onaio/gisida-cambodia/pull/24. Here is some documentation to help with the configuration https://github.com/onaio/gisida/tree/staging/docs/translations
Techincal plan
Additional detail on how this will work
NB* The language label on the layer specification should match the param added on the site config