Portuguese character encoding issue

28 views
Skip to first unread message

dyu

unread,
Nov 10, 2015, 3:21:31 AM11/10/15
to OpenLMIS Dev, chai-openlmis
Hi all,

We are going through translations in Openlmis and have encountered some problems with character encoding.

On the web portal, when we choose Portuguese as the language, we noticed some unreadable characters: for example, on configuration tabs "Supervisory Nodes" is shown as Supƒç©˙˚∆odes

We also noticed that in file messages_pt.properties in the codebase, there are some entries of portuguese translations shown as ineligible characters, for example:

(line 1273) menu.header.supervisory.nodes = Supƒç©˙˚∆odes

We tried a few different encodings for this file and still could not make it show properly.

By looking at git history for this line in the terminal, it was added like this originally.

$ git blame -L1273,1273 -- modules/openlmis-web/src/main/resources/messages_pt.properties

01cc8414 (Anshul Rastogi 2014-05-02 15:28:04 +0530 1273) menu.header.supervisory.nodes = Supƒç©˙˚∆odes


Did anyone else see this issue?

Thanks!

-Danni

Josh Zamor

unread,
Nov 10, 2015, 7:04:34 PM11/10/15
to OpenLMIS Dev, chai-o...@thoughtworks.com
Hi Danny,

I have seen this before when deploying pre v.1.  The TW team at that time was simply taking the messages_en.properties file and using Google Translate to convert to PT.  At some point they were, if I remember correctly, converting back and forth between UTF-8 and the default ResourceBundle encoding of ISO-8859-1 with Unicode Escapes:  http://docs.oracle.com/javase/7/docs/api/java/util/PropertyResourceBundle.html

This at some point got quite bungled.

As part of their work to develop "push program" functionality we switched to using UTF-8 encoding's across (almost) the board, and so we used a mixture of Google Translate and professional translators to translate that pre-v1.0 work on the selv-dev branch:  https://github.com/OpenLMIS/open-lmis/blob/selv-dev/modules/openlmis-web/src/main/resources/messages_pt.properties

Keep in mind however that the SELV project is an implementation and so some of the translations are for the DLS program that VillageReach is running.  It's also pre-v1.0 (as 1.0 has not made it into VIMS) and therefore that supervisory node menu item doesn't exist.

At this point I'd recommend re-translating either with Google Translate (Google spreadsheets can help) or with a human translator with a target of using UTF-8 encodings.  Transifex is something we've expirmented with here

Hopefully this helps!

Josh Zamor

unread,
Nov 11, 2015, 1:37:30 AM11/11/15
to OpenLMIS Dev, chai-o...@thoughtworks.com
Sorry Danni,

Firefox almost lost my post so I posted before proof-reading.  The Transifex project we have is at:  https://www.transifex.com/openlmis/openlmis-global/

It doesn't have the more recent tags from VIMS however.  If you'd like to collaborate here I'd be glad to help you out.  I'm still not clear on all of Transifex's settings so I'm not sure if I can make it more public or not just yet.

Best,
Josh

Danni Yu

unread,
Nov 11, 2015, 5:28:15 AM11/11/15
to Josh Zamor, OpenLMIS Dev, chai-openlmis
Thank you very much for all the information, Josh! We'll work with CHAI to hopefully come up with updated translations in Portuguese. 

We are also thinking of using Transifex, is it possible that we can use the same project you have set up for Portuguese? Renee - what's your thought on this?

--
You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev...@googlegroups.com.
To post to this group, send email to openlm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openlmis-dev/abcde355-2add-4588-932d-a806dd383587%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Renee Orser

unread,
Nov 11, 2015, 7:30:27 AM11/11/15
to Danni Yu, Josh Zamor, OpenLMIS Dev, chai-openlmis
Hi - it would be great to consolidate OpenLMIS translation to a single account. I have a couple of questions. Given that the Mozambique project will be doing translations on Transifex for both the stock management mobile app and for the OpenLMIS "web portal". 

1) Are the translations dependent upon each other with the way the development is occurring? For example, if we change a translation on the app, will anything in the web portal change?

2) Given how we are architecting the various codebases in the background to help distinguish between product and project customisation, should we reflect a similar separation in where translations are stored and managed?

My understanding of all of this is that we are going to need two separate Transifex projects to meet our needs. One for the app, and one for OpenLMIS translations. If we can do those OpenLMIS translations as part of the community's account, that would be ideal.

Thanks!

Renee
--
Renee Orser
Solution Strategist
Emailror...@thoughtworks.com
Telephone+1-646-632-7926, +27-720841843
ThoughtWorks

Josh Zamor

unread,
Nov 12, 2015, 5:30:34 PM11/12/15
to OpenLMIS Dev, d...@thoughtworks.com, josh....@villagereach.org, chai-o...@thoughtworks.com
A couple of quick thoughts:  we can certainly share projects (I'm not a transifex expert though so I'll need to figure that out).  In terms of product compared to implementation project, we have encountered that with our implementations, and we do run them in Transifex as different projects as sometimes there are translations that are more project based (e.g. not translating "Program Period" to Portuguese, but rather call it "Month" as there is only one schedule in a given implementation and therefore it's more clear).  Further at the end of the day these are exported back to a properties file that is Git versioned in a branch/repo that's for the implementation.

I'm not sure what translations/messages are shared between OpenLMIS server/web and the Android app.  OpenLMIS does expose the property file (I believe it's in JSON?) so it could be utilized though I'm not sure if that would solve any problems for you?

Best,
Josh

Rich Magnuson

unread,
Nov 13, 2015, 6:45:36 PM11/13/15
to Josh Zamor, OpenLMIS Dev, d...@thoughtworks.com, Josh Zamor, chai-o...@thoughtworks.com

I poked around the Transifex tool.  It has the concept of an Organization, which contain one or more Teams, and each Team can work on multiple translation Projects.  It looks pretty easy to add individuals to a team.  Danni/Renee, please send me the Transifex account names of those who will work on translation files.  Alternately, send me the email addresses and I will invite them within Transifex.

 

There are two Projects:  “OpenLMIS Global” and “SELV”.  Please do not modify the SELV project.

 

Thanks - Rich

Rich Magnuson

unread,
Dec 9, 2015, 1:32:18 PM12/9/15
to OpenLMIS Dev, josh....@villagereach.org, d...@thoughtworks.com, chai-o...@thoughtworks.com
Danni, Renee, 

If you still wish to collaborate on translations using Transifex, each individual will first need to create an account on Transifex.  We can then add the user to the translation project. While I haven't looked into it, I am hoping we could have multiple owners/administrators so this sort of maintenance isn't dependent upon one org.  Let me know!

Rich
Reply all
Reply to author
Forward
0 new messages