opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://smartregister.org
Apache License 2.0
50 stars 39 forks source link

i18N Bug: MLS for strings not picking special characters e.g. French Accents #3370

Closed ndegwamartin closed 1 day ago

ndegwamartin commented 6 days ago

Describe the bug

  1. When you change the app language to French - some of the app strings are not picking accents.
  2. There are some untranslated strings on the app still. image

To Reproduce

  1. Log into the app and complete sync.
  2. On the settings page, change the app language to French.
  3. Observe the different parts of the app.

Expected behavior

Additional context Add any other context about the problem here.

Implementation plan

ndegwamartin commented 5 days ago

Further investigations on the Eusm project where this was originally reported revealed that the French translations contained the malformed content on the server. Doing a fetch on POSTman gives us the response below(screenshot).

Screenshot

This property file needs to be re-uploaded again correctly. Note, the original properties file from Transifex has the correct content - https://github.com/onaio/fhir-resources/blob/1d0d8a0a7720e0c06acc77bfd39080e19c6c9ae4/eusm/configs/translations/strings_fr_config.properties#L37C34-L37C45

ndegwamartin commented 5 days ago

For the untranslated strings e.g. those reading ITEMS and CHECKED, the tooling needs to be updated to handle translations for primaryText and secondaryTexts in configs for automation.

    {
      "viewType": "CARD",
      "visible": "true",
      "contentPadding": 0,
      "header": {
        "viewType": "COMPOUND_TEXT",
        "primaryText": "Checked",
        "primaryTextColor": "#000000",
        "fontSize": 18.0,
        "padding": 16
      }
....

    {
      "viewType": "CARD",
      "visible": "true",
      "contentPadding": 0,
      "header": {
        "viewType": "COMPOUND_TEXT",
        "primaryText": "ITEMS",
        "primaryTextColor": "#000000",
        "fontSize": 18.0,
        "padding": 16
      }

These can also be manually translated (if they are urgent and are not many).

dubdabasoduba commented 5 days ago

@ndegwamartin https://github.com/onaio/fhir-tooling/issues/207

dubdabasoduba commented 2 days ago

@AnnieMungai Martin and I have looked into this. We think the app is still breaking for some reason. @ndegwamartin will review and provide a fix

ndegwamartin commented 1 day ago

@dubdabasoduba after troubleshooting found an issue with FHIR Core translations that needed a patch for languages that contain diacritical marks . The issue should now fixed - PR https://github.com/opensrp/fhircore/pull/3376 cc @AnnieMungai