Translation for Community Testing App

Good afternoon,
I have created a flexible hierarchy for our current project on community testing and looking at the translations file content from the online documentation (translations/ | Community Health Toolkit).
Looking at the messages-en.properties file in the cht-core app, I see many attribute-value pairs.
My translation content is basic, proper names to appear on the app for the different hierarchy places and contacts, the language defaults to English and Swahili
Please advise if am missing something on the content of the translation settings
Regards

1 Like

Hello @oyierphil

Are you concerned that it looks like a lot of work to provide Swahili translation for your app? The cht-core comes with a messages-sw.properties file which provides a great deal of the translations by default. It is a goal to get this to 100% but we’re not quite there yet.

Furthermore, many of the translations in the messages-en.properties file may not ever be used by your app, depending on which features users are allowed to use. You only need to provide translations for the keys you actually use, so it may not be as daunting as it looks!

Does that help answer your question?

@gareth
Hi Gareth, thank you.
Yes, this provides some perspective on the translations in the messages-en.properties, I have seen the Swahili translation, but haven’t tried it yet.
App settings config when the hierarchy is sorted out is clear.
I see most translation config files from the cht-core app and other apps have many lines of code, looks like some code is automatically generated once you upload the forms, will try a config with basic settings and see what happens today, then share the experience.

We are using custom forms for most data entry (Places and contacts), as opposed to using generic places and persons

@gareth,
Still working on the data entry forms for the different places and contacts, then test.
Once the hierarchy and places configs are ready, what guides the App in choosing which form to load first, then the second, third etc?
This time,want to understand the app building blocks and flow by building components one at a time to consolidate our knowledge for future projects, thank you

I’m not sure what you mean by “which form to load first”. All forms are stored in the database and only loaded when the user selects an action. Does that help?

@gareth
Just wanted to know what guides the sequencing, especially for the admins who create places (Top level place in the hierarchy for example like a national office, then county etc), before users can select appropriate actions based on configuration.

The hierarchy is defined in the contact_types property of the settings doc. More information is available in the Configurable Hierarchy documentation.

Hello @oyierphil
I hope the documentation addressed your concerns. If not, please let us know.
Thanks

@simon
Trying to find out why my contact and app forms are not displaying when I load the application, after conversion with validation suppressed, and forms successfully converted.

I updated the translation file, and running upload-custom-translations brings the error below:

I have gone through targets.js where haven’t used the function passesIf, which is causing errors. We have used appliesIf function instead, not sure where the error is coming from, will appreciate any insights
Finally, I cant log into the app after restarting the containers

Will appreciate any insights?

Hi @oyierphil!
It looks like you have some targets with type: 'percent'. So either you need to provide the passesIf logic for them (numerator), or change their type to count.
Please have a look at this reference document and this tutorial on targets.

The error when logging in could be a different issue from the above. Please check if you have any errors reported in the browser log or the server log.

Hi @binod
Made the corrections on the percent type and managed to compile translations
concat(…/…/inputs/meta/location/lat, concat(’ ', …/…/inputs/meta/location/long))

I have seen online many versions of referencing geopoint location (latitude and longitude) as below:
Make sure we are storing all debug / output from android when trying to obtain GPS · Issue #5917 · medic/cht-core · GitHub

I have followed the thread and not clear on the correct way of writing, will appreciate your views

@gareth
I am stuck here since yesterday…
I have created forms in the database for both places and contacts, and have created hierarchy, configurable hierarchy.
I wanted to use the names as they appear on the app_settings/base_settings config, thus deleted everything from the message-en translation file, I have few XPath errors which I have skipped in some forms, the app doesn’t load the forms I expect, but loads the default starting with the New District, which setting could I have missed? Thank you

Hi @oyierphil

Can you please check that your hierarchy is indeed configured correctly? You can check this in the settings document, by inspecting the contact_types property.
If these do not match your desired hierarchy, I suspect an error in how you upload / compile your configuration.

@diana
I share the settings for the hierarchy for both the places and people, will review further to see if I there are issues with any of the contact_types