Automated CI plan that marks translations as reviewed

@ibatista, I finally got around to trying out the transifex REST API.

I set up an automated CI plan that will go through and mark all translations as “reviewed” once a day.

You can see the results of this by going to https://ci.openmrs.org/browse/TRAN-AREV/latest and clicking the Logs tab and then View. (There is nothing interesting there, just a message like DONE! Reviewed: 0 (ignored 65967 that were already reviewed.)

This is an unfortunate shortcut, but since we don’t have anyone doing regular reviews, I don’t want to hold back translations from being added to the modules.

One idea:

  • We could require human review for the most common languages (Spanish, French, Portuguese)
  • I could set up a script that will notify us if there are unreviewed translations in those languages.

Let me know if you want to pursue this idea. (That would mean finding reviewers.)

2 Likes

i think is ok,

i like this idea, we have to implement that.

Just to confirm, are we currently at the point where we need to reviews translations before they are automatically pulled in, or are we still automatically marking them as reviews? (It appears that for coreapps, at least, we are not automatically marking them).

Take care, Mark

@darius This is an interesting feature…Any way could of help ?

@ibatista did you get my Transifex account?

@mogoodrich everything should be reviewed automatically (task runs at 21:00) and then committed to github (task runs at 01:00).

E.g. these logs seem to show that coreapps translations into Pashto are being done automatically: https://ci.openmrs.org/browse/TRAN-AREV-182/log

Thanks @darius for the pointer… so things seem to not be working right, at least for coreapps… in the logs Darius sent I see:

build	24-Jul-2017 21:00:39	Marked as reviewed: coreapps-module de coreapps.close=Schließen
build	24-Jul-2017 21:00:39	Marked as reviewed: coreapps-module de coreapps.programsDashboardWidget.label=PATIENTENPROGRAMME
build	24-Jul-2017 21:00:39	Marked as reviewed: coreapps-module de coreapps.dashboardwidgets.programstatus.completed=Fertig
build	24-Jul-2017 21:00:39	Marked as reviewed: coreapps-module de coreapps.dashboardwidgets.programs.selectProgram=Programm auswählen
build	24-Jul-2017 21:00:39	Marked as reviewed: coreapps-module de coreapps.dashboardwidgets.programs.addProgram=Programm hinzufügen
build	24-Jul-2017 21:00:39	Marked as reviewed: coreapps-module de coreapps.dashboardwidgets.programstatus.history=Geschichte
build	24-Jul-2017 21:00:39	Marked as reviewed: coreapps-module de coreapps.date=Datum
build	24-Jul-2017 21:00:39	Marked as reviewed: coreapps-module de coreapps.dashboardwidgets.programs.current=Aktuell 

But yet if you in Transifex here, these translations are not marked as reviewed:

https://www.transifex.com/openmrs/OpenMRS/translate/#de/coreapps-module/111026902?reviewed=no

And, to confirm they are not translated in the source code:

(For what it’s worth, we don’t mind this functionality, and it actually might be helpful for us to have the ability to not commit until review, but it doesn’t seem to be working as intended).

Take care, Mark

Hmm, it turns out that sometimes transifex was returning 502 Bad Gateway and I wasn’t catching this. I don’t know why, because when I ran the script locally it got that same error a few times, but eventually marked everything as reviewed after I had put in my debugging code.

Maybe the API doesn’t like to be hit with so many requests?

I have pushed some changes to the script that will at least log errors in this case. I guess we’ll have to watch this to see if the actual problem continues, because right now my local testing has marked everything as reviewed.

Hmm, yeah, probably too many requests?

I saw that a bunch of then when through overnight… we will have to be careful about watching since it’s there’s no obvious sign of it.

Thanks! Mark