Language Spanish not displaying correctly.

30 views
Skip to first unread message

wilmar...@gmail.com

unread,
Apr 3, 2014, 9:44:07 PM4/3/14
to open...@googlegroups.com
Hi Justin, I just want to thank you for the work you have done. App is amazing.

I wanted to report the issue on the https://openboxes.atlassian.net/wiki/questions, but its saying that i dont have permissions to create issues.

The problem I have, is that when I change the language to spanish, special characters show in a different encoding. I guess the default encoding is UTF-8 but for spanish the encoding is ISO-8859-1, but for some reason is not displaying correctly.

Please advise if you know how to solve this problem.

Thanks,

Wilmar

Justin Miranda

unread,
Apr 4, 2014, 12:43:20 AM4/4/14
to wilmar...@gmail.com, open...@googlegroups.com
Wilmar 

Thank you for the email.  I will look into the Confluence Questions permission issue.  In the meantime, I have added you to what I think is the appropriate group so feel free to try asking the question again.  

As for the Spanish translation issue, I've seen the problem you mentioned but I haven't had anyone interested in using OpenBoxes in Spanish so it hasn't been a priority to fix yet.  However, now that I know someone is interested in using the Spanish translations I will certainly look into it.  I believe it's probably going to be an issue with the encoding, as you mentioned.  

The second issue you will encounter is that I haven't translated all UI fields into Spanish, so you may notice missing translations throughout the app.  For example, here's a prime example on the Dashboard.

Inline image 1

There are a few files in the source code that contain the translated messages for all locales (English, French, Spanish).  The following two files represent the English and Spanish locales.  Notice that there are about 470 more lines in the English file, so about 25% of the translations are missing in the Spanish locale.

The good news is that you can help me translate! :)

There's a feature that allows you to see which fields may not be translated and then allows you to save your suggested translation to the database.  So if you find fields/messages that have not been translated, you can save your suggested translation to the database.  

In order to do that you need to log in as an administrator and click on the "Enable debug mode" feature in the user dropdown menu in the top right corner of the app (not the most intuitive name for a feature, but I'll fix that in a future version).  But once you enable this "translation" or "debug" mode you'll see icons next to each encoded message on the page (see screenshot below).  The "check" means that the message has been translated.  The "cross" means the message has not been translated (or in the case of messages like "Total", the translated message is the same in both English and Spanish).

Inline image 3

In order to save your own translation, click on the icon next to the message and the system will prompt you with an Edit Translation dialog window.  Enter your desired translation and click Save.  

NOTE: The {0} should be left as that is a placeholder for a piece of data that the application provides.

Inline image 4

The message will be saved to the database but unfortunately we are not displaying those translations to to the user (as you would expect).  I ran into a performance issue when using those translations to override the default translation in the messages.properties file so the translated messages are no longer being displayed back to the user after they are saved to the database.  When I find some time I'll figure out a way to cache those translations in order to avoid the performance issue.  For now I've been periodically exporting these messages from the database and adding them to the appropriate messages.properties file.  See below for a list of suggested translations on the OpenBoxes demo server.

Inline image 2

Thanks again for your interest in OpenBoxes and let me know if there's any other questions I can answer.

Justin



--
You received this message because you are subscribed to the Google Groups "OpenBoxes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openboxes+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wilmar Campos

unread,
Apr 4, 2014, 7:59:02 PM4/4/14
to Justin Miranda, open...@googlegroups.com
Hi Justing, thanks for the reply.
Off course I can help with translations, do you want me to do this on the demo site?

Thanks,

Justin Miranda

unread,
Apr 5, 2014, 9:49:55 AM4/5/14
to Wilmar Campos, open...@googlegroups.com
It doesn't matter. You could translate on the demo server or your own instance of OpenBoxes. If you choose the latter I'll provide you with a SQL statement that you can use to export the translations.

Thanks for your help.

Justin

Justin Miranda

unread,
Apr 6, 2014, 4:49:48 PM4/6/14
to Wilmar Campos, open...@googlegroups.com
Here's the SQL you can use to export the translations (if you end up doing translations in your own database).  The output file assumes you're using Linux -- you should change the path to the file if you're on Windows or Mac (or remove INTO OUTFILE '<filename>' altogether).

mysql> SELECT concat(code, ' = ', text) FROM localization ORDER BY code INTO OUTFILE '/tmp/messages_es.properties';

Justin Miranda

unread,
Apr 10, 2014, 10:18:42 AM4/10/14
to Wilmar Campos, open...@googlegroups.com
The messages_es.properties file had been saved as ISO-8859-15 for some reason.  I changed the encoding to ISO-8859-1 and it worked.  I should have a new release (https://github.com/openboxes/openboxes/releases) ready by the end of the day. 

Inline image 1

Wilmar Campos

unread,
Apr 10, 2014, 10:22:55 AM4/10/14
to Justin Miranda, open...@googlegroups.com
Hi Justing, Thats excellent news.
On my side, I notice file was encode as UTF-8, try to encode it in different values and compile again, but none of my attempts work.... Maybe I am not that good on grails!!

Anyway, I have begin translating the labels on my server, will send you the file once I have it.

Regards,

Wilmar

Justin Miranda

unread,
Apr 11, 2014, 12:49:38 AM4/11/14
to Wilmar Campos, open...@googlegroups.com
The latest release is now available (v0.6.3.2).  This includes a fix for the issue you brought up as well as a few other configuration issues, improvements, and bug fixes.  You can download the new WAR file here (https://github.com/openboxes/openboxes/releases) or play around on the demo server (http://demo.openboxes.com/openboxes).  

Thanks again for requesting that encoding change.

Justin
Reply all
Reply to author
Forward
0 new messages