Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs to fix for the JMAG tool for translation #406

Closed
4 of 5 tasks
dubdabasoduba opened this issue Apr 8, 2020 · 8 comments
Closed
4 of 5 tasks

Bugs to fix for the JMAG tool for translation #406

dubdabasoduba opened this issue Apr 8, 2020 · 8 comments
Assignees
Labels
bug Size - XS half day - a day

Comments

@dubdabasoduba
Copy link
Member

dubdabasoduba commented Apr 8, 2020

Still noticeable bugs on the MLS works

All widgets

  • any of the text with the property keys with special characters that are not _ don't get resolved correctly e,g

    • anc_close.step1.delivery_complications.options.Pre-eclampsia.text = Pre-eclampsia
    • anc_close.step1.delivery_complications.options.Perineal_tear_(2nd,_3rd_or_4th_degree).text = Perineal tear (2nd, 3rd or 4th degree)

e.g

{
            "key": "Perineal tear (2nd, 3rd or 4th degree)",
            "text": "{{anc_close.step1.delivery_complications.options.Perineal tear (2nd, 3rd or 4th degree).text}}",
            "value": false,
            "openmrs_choice_id": "165247AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          }

for keys written with spaces can we replace the spaces with underscores e.g for the piece above we could have had something like {{anc_close.step1.delivery_complications.options.Perineal_tear_2nd_3rd_or_4th_degree.text}}


  • also interpolate the following on the edit_text & native_edit_text
"v_numeric_integer": {  
  "value": "true",  
  "err": "Enter valid cervical dilation in cm"  
},  
    - "v_min": {  
  "value": "0",  
  "err": "Cervical dilation must be greater than or equal to 0"  
},  
    - "v_max": {  
  "value": "10",  
  "err": "Cervical dilation must be equal to or less than 10"  
}

  • Translate the "specify_info" attribute in native radio buttons
 "key": "ultrasound_done",  
 "openmrs_entity_parent": "",  
 "openmrs_entity": "concept",  
 "openmrs_entity_id": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",  
 "type": "native_radio",  
 "label": "{{anc_profile.step2.ultrasound_done.label}}",  
 "label_info_text": "{{anc_profile.step2.ultrasound_done.label_info_text}}",  
 "label_info_title": "{{anc_profile.step2.ultrasound_done.label_info_title}}",  
 "label_text_style": "bold",  
 "options": [  
{  "key": "yes",  
 "text": "{{anc_profile.step2.ultrasound_done.options.yes.text}}",  
 "openmrs_entity_parent": "",  
 "openmrs_entity": "concept",  
 "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",  
 "specify_info": "ultrasound date",  
 "specify_widget": "date_picker",  
 "max_date": "today",  
 "min_date": "today-9m"  
 },  
 {  
 "key": "no",  
 "text": "{{anc_profile.step2.ultrasound_done.options.no.text}}",  
 "openmrs_entity_parent": "",  
 "openmrs_entity": "concept",  
 "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"  
 }  
],  
 "v_required": {  
 "value": true,  
 "err": "{{anc_profile.step2.ultrasound_done.v_required.err}}"  
 }  
}

  • Translate the uploadButtonText attribute on the choose_image widget
{  
  "key": "wom_image",  
  "openmrs_entity_parent": "",  
  "openmrs_entity": "",  
  "openmrs_entity_id": "",  
  "type": "choose_image",  
  "uploadButtonText": "Take a picture of the woman"  
}

  • Translate the scanButtonText attribute on the barcode widget
{  
  "key": "anc_id",  
  "openmrs_entity_parent": "",  
  "openmrs_entity": "person_identifier",  
  "openmrs_entity_id": "ANC_ID",  
  "type": "barcode",  
  "barcode_type": "qrcode",  
  "hint": "{{anc_register.step1.anc_id.hint}}",  
  "value": "0",  
  "scanButtonText": "Scan QR Code",  
  "v_numeric": {  
  "value": "true",  
  "err": "{{anc_register.step1.anc_id.v_numeric.err}}"  
  },  
  "v_required": {  
  "value": "true",  
  "err": "{{anc_register.step1.anc_id.v_required.err}}"  
  }  
}
@vincent-karuri
Copy link
Contributor

@dubdabasoduba

I think we'll still need a comprehensive list of all characters we wish to replace with _.

For instance, I see some weird options like + and ++ which we'd want to preserve. Hence a blanket rule like replace all non-alphanumeric characters won't work.

Could you please help with compiling this list based on ANC?

@cafootitt
Copy link

cafootitt commented Apr 16, 2020

@dubdabasoduba @vincent-karuri Feedback/QA so far:

Main register page

  • Let's just show the age as a number, let's not show the year or month unit (a and m in French).

ANC Reg form

  • The two button labels are not translated, and these are not showing up in Transifex
  • The constraint messages are not translated, and these strings are not showing up in Transifex
  • I need to find the string file in Transifex where "Terminé" is translated, as this is not correct. I can't find this in the ANC project in Transifex.

Screenshot_20200416-190941_WHO ANC
Screenshot_20200416-191120_WHO ANC
Screenshot_20200416-191645_WHO ANC

Close ANC Record

No issues so far - good job!

Quick Check

  • What is the discrepancy between the transifex form name here (Vérification Rapide - note the capital "R" on Rapide) vs. what's in the app (lowercase R)? How is this different?
  • Info icon for central cyanosis is not translated, and the string does not show up in Transifex
  • Where can I find the string for the red refer button and the pop up message after hitting the red refer button? I need to change these translations, and I cannot find them on Transifex.

Screen Shot 2020-04-16 at 7 21 41 PM

![Screenshot_20200416-192319_WHO ANC](https://user-images.githubusercontent.com/3488986/79492353-c8d18980-8017-11ea-80e8-b55c8d9ead0e.jpg) ![Screenshot_20200416-192421_WHO ANC](https://user-images.githubusercontent.com/3488986/79492484-f9b1be80-8017-11ea-99d1-afe54247c0a2.jpg) ![Screenshot_20200416-192541_WHO ANC](https://user-images.githubusercontent.com/3488986/79492658-32ea2e80-8018-11ea-91d8-c86008de7002.jpg)

Main Contact Container Page

  • Where can I find these translations on Transifex? I need to update them, and I cannot find them
  • The complete check mark is not working on the French version. On this screenshot, the Quick Check should have the Complete check mark here, but it's absent.

Screenshot_20200416-192759_WHO ANC

Exit widget

  • Where can I find these translations on Transifex? I need to update them, and I cannot find them
    Screenshot_20200416-193001_WHO ANC

Tests

  • I was unable to check HIV test, as it wasn't showing up when it should have been. We need to look into this. I think it's because some of the pop characteristics have disappeared (will create separate issue for this).
  • The Done today, done earlier, ordered, not done options are not translated for any of the tests; nor are the strings showing up in Transifex

Screenshot_20200416-194917_WHO ANC

@dubdabasoduba
Copy link
Member Author

dubdabasoduba commented Apr 17, 2020

@cafootitt the other translations (that aren't native forms & YAML files) should be on the strings.xml file on transifex.
@vincent-karuri the validation errors, the two buttons i.e the image & barcode buttons are listed at the top of the issues description. The only new addition it the radio button which shows the Done Today options as shown in the screenshot above. I have attached a sample of the same. Its type is an extended_radio_button which is an extension of the native_radio_button

 {
      "key": "hepb_test_status",
      "openmrs_entity_parent": "161475AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
      "openmrs_entity": "concept",
      "openmrs_entity_id": "163725AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
      "label": "{{tests_hepatitis_b_sub_form.step1.hepb_test_status.label}}",
      "label_text_style": "bold",
      "text_color": "#000000",
      "type": "extended_radio_button",
      "options": [
        {
          "key": "done_today",
          "text": "Done today",
          "type": "done_today",
          "openmrs_entity_parent": "",
          "openmrs_entity": "concept",
          "openmrs_entity_id": "165383AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
        },
        {
          "key": "done_earlier",
          "text": "Done earlier",
          "type": "done_earlier",
          "openmrs_entity_parent": "",
          "openmrs_entity": "concept",
          "openmrs_entity_id": "165385AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
        },
        {
          "key": "ordered",
          "text": "Ordered",
          "type": "ordered",
          "openmrs_entity_parent": "",
          "openmrs_entity": "concept",
          "openmrs_entity_id": "165384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
        },
        {
          "key": "not_done",
          "text": "Not done",
          "type": "not_done",
          "openmrs_entity_parent": "",
          "openmrs_entity": "concept",
          "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
        }
      ],
      "v_required": {
        "value": true,
        "err": "{{tests_hepatitis_b_sub_form.step1.hepb_test_status.v_required.err}}"
      }
    }

@cafootitt
Copy link

Hi @dubdabasoduba

Here is the link to the strings.xml on Transifex: https://www.transifex.com/opensrp/opensrp-client-anc/translate/#fr/strings-xml--master/182818330

As you can see, there are only 2 translations done in this folder. Specifically, things like age and GA are not translated yet, yet they appear translated in the app:

Screen Shot 2020-04-17 at 9 32 05 AM

Can you look into this further please?

@dubdabasoduba
Copy link
Member Author

This PR shows that they were merged from transifex some time back. I can try find out why they don't appear on transifex but I am not sure why that would happen.

@cafootitt
Copy link

@dubdabasoduba Thanks for helping me figure this out. This seems to be due to the "suggestions" feature in Transifex, so Transifex is using the suggested string from another repo in the absence of an inputted string.

@vincent-karuri vincent-karuri added the Size - XS half day - a day label Apr 20, 2020
@vincent-karuri
Copy link
Contributor

@vincent-karuri the validation errors, the two buttons i.e the image & barcode buttons are listed at the top of the issues description. The only new addition it the radio button which shows the Done

Thanks @dubdabasoduba, will add the fixes.

@vincent-karuri
Copy link
Contributor

@dubdabasoduba I recommend renaming the problematic keys in the ANC app rather than adding rules in JMAG that are not easily generalizable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Size - XS half day - a day
Projects
None yet
Development

No branches or pull requests

3 participants